Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement