Skip to content

Instantly share code, notes, and snippets.

@jsrimr
Last active September 6, 2019 03:05
Show Gist options
  • Save jsrimr/bfdf2364e7aaf02567485f548f56144c to your computer and use it in GitHub Desktop.
Save jsrimr/bfdf2364e7aaf02567485f548f56144c to your computer and use it in GitHub Desktop.
concept of trading env
class TradingEnv:
def _long(self,): # buy
...
def _long_cover(self, current_price_mean, current_mkt_position, action): # sell possession
...
def step(self, action):
...
# process buy and sell action
# update position of the agent
# return next_state and reward
return self.obs_return, self.chg_reward[0], done, self.info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment