Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. class TradingEnv:
  2. def _long(self,): # buy
  3. ...
  4. def _long_cover(self, current_price_mean, current_mkt_position, action): # sell possession
  5. ...
  6. def step(self, action):
  7. ...
  8. # process buy and sell action
  9. # update position of the agent
  10. # return next_state and reward
  11. return self.obs_return, self.chg_reward[0], done, self.info
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement