Skip to content

Instantly share code, notes, and snippets.

@jsrimr jsrimr/TradingEnv.py
Last active Sep 6, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.