stefan-jansen / machine-learning-for-trading

Code for Machine Learning for Algorithmic Trading, 2nd edition.
https://ml4trading.io
13.3k stars 4.2k forks source link

In chapter 22, all of the hyperparameter and even stock symbol are hard coded in the gym environment #212

Closed jimmyland22 closed 2 years ago

jimmyland22 commented 2 years ago

Describe the bug In the trading_env.py gym environment, all of the hyperparameters are hard coded as well as the stock symbol used.

To Reproduce Make any changes in the 04_q_learning_for_trading.ipynb file, it doesn't do anything as it'll still use AAPL and all of the default hyperparameters.

stefan-jansen commented 2 years ago

You can set a different ticker using:

trading_environment = gym.make('trading-v0', ticker='IBM')

I'll update the notebook accordingly.