-
Notifications
You must be signed in to change notification settings - Fork 57
/
__init__.py
28 lines (26 loc) · 1.01 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from gym.wrappers import TimeLimit
from gym.envs.registration import register
import pandas as pd
file ="./data/split/GBPUSD/weekly/GBPUSD_2017_2.csv"
df = pd.read_csv(file)
register(
id='TradingGym-v0',
entry_point='env.env_fx:tgym',
kwargs={'df': df,
'env_config_file':'./env/config/gdbusd-test-1.json'
},
max_episode_steps = 1440, # (Optional[int]): The maximum number of steps that an episode can consist of
reward_threshold=20000.0, # (Optional[int]): The reward threshold before the task is considered solved
nondeterministic=False, # (bool): Whether this environment is non-deterministic even after seeding
# order_enforce = True, # (Optional[int]): Whether to wrap the environment in an orderEnforcing wrapper
)
register(
id='TradingGym-v1',
entry_point='env.env_fx:tgym',
kwargs={'df': df,
'env_config_file':'./env/config/gdbusd-test-1.json'
},
max_episode_steps = 1440 * 5,
reward_threshold=30000.0,
nondeterministic=False,
)