A gym environment for reinforcement training on forex historical data.
Project description
# gym-gopherfx
A gym environment for reinforcement training on forex historical data.
Historical data is no way a predictor of future behaviour in forex, but can be used as challenging science experiment :).
## How to run
Clone the repo
```bash
docker-compose up -d
```
Access [http://127.0.0.1:8050/](http://127.0.0.1:8050/) to access the dashboard.
To start a random agent and see live evolutions:
```bash
python random_agent.py
```
## About the environment
### Gopherfx-v0
Observation:
A tuple of the current datetime and rate
The available actions are:
* 0 - wait
* 1 - buy
* 2 - sell
Reward:
* 0 - for waiting/buying
* trade_result - for selling
* -1 - when depleting the budget
The episodes ends when the trading day is over or the budget is depleted.
### Gopherfx-v1
Observation:
Candle rate data representing the market state at the step moment
Example:
```json
{
"complete": true,
"volume": 45,
"time": "2018-06-01T00:00:00.000000000Z",
"bid": {
"o": "1.16916",
"h": "1.16929",
"l": "1.16908",
"c": "1.16915"
},
"ask": {
"o": "1.16933",
"h": "1.16946",
"l": "1.16924",
"c": "1.16930"
}
}
```
The available actions are:
* 0 - wait
* 1 - buy
* 2 - sell
Reward:
* 0 - for waiting/buying
* trade_result - for selling
* -1 - when depleting the budget
The episodes ends when the trading day is over or the budget is depleted.
A gym environment for reinforcement training on forex historical data.
Historical data is no way a predictor of future behaviour in forex, but can be used as challenging science experiment :).
## How to run
Clone the repo
```bash
docker-compose up -d
```
Access [http://127.0.0.1:8050/](http://127.0.0.1:8050/) to access the dashboard.
To start a random agent and see live evolutions:
```bash
python random_agent.py
```
## About the environment
### Gopherfx-v0
Observation:
A tuple of the current datetime and rate
The available actions are:
* 0 - wait
* 1 - buy
* 2 - sell
Reward:
* 0 - for waiting/buying
* trade_result - for selling
* -1 - when depleting the budget
The episodes ends when the trading day is over or the budget is depleted.
### Gopherfx-v1
Observation:
Candle rate data representing the market state at the step moment
Example:
```json
{
"complete": true,
"volume": 45,
"time": "2018-06-01T00:00:00.000000000Z",
"bid": {
"o": "1.16916",
"h": "1.16929",
"l": "1.16908",
"c": "1.16915"
},
"ask": {
"o": "1.16933",
"h": "1.16946",
"l": "1.16924",
"c": "1.16930"
}
}
```
The available actions are:
* 0 - wait
* 1 - buy
* 2 - sell
Reward:
* 0 - for waiting/buying
* trade_result - for selling
* -1 - when depleting the budget
The episodes ends when the trading day is over or the budget is depleted.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gym_gopherfx-0.2.0.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for gym_gopherfx-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 117d05925b7640ae4bda464d8423fbe1cd3682dd4ddc19d878f38300705c2c1a |
|
MD5 | 34da1d6008d00d6f3125c4e8dd861e57 |
|
BLAKE2b-256 | c2fe952119cbca609e8e63d517eeae6454ebc323e60636bee1235fde9a8f2b12 |