Yvictor / TradingGym

Trading and Backtesting environment for training reinforcement learning agent or simple rule base algo.
MIT License
1.54k stars 349 forks source link

Update training_v1.py #11

Open jsrimr opened 5 years ago

jsrimr commented 5 years ago

enter_price = self.chg_price[0] -> enter_price = self.chg_price[-1]

Since actual trading occurs at the last time step, the enter_price should point to the last entry of the price array