Unnecessary lines in Base4, and changes for box space, to fit better for our needs.

This commit is contained in:
richardjozsa 2022-08-31 14:42:52 +02:00
parent 5980431b91
commit 1fa20b884d
2 changed files with 1 additions and 5 deletions

View File

@ -66,10 +66,6 @@ class Base4ActionRLEnv(BaseEnvironment):
self._position = Positions.Neutral
trade_type = "neutral"
self._last_trade_tick = None
elif action == Actions.Exit.value:
self._position = Positions.Neutral
trade_type = "neutral"
self._last_trade_tick = None
else:
print("case not defined")

View File

@ -57,7 +57,7 @@ class BaseEnvironment(gym.Env):
self.shape = (window_size, self.signal_features.shape[1] + 3)
self.set_action_space()
self.observation_space = spaces.Box(
low=-np.inf, high=np.inf, shape=self.shape, dtype=np.float32)
low=-1, high=1, shape=self.shape, dtype=np.float32)
# episode
self._start_tick: int = self.window_size