├── Q_Learning_Stock_Trading.ipynb └── README.md /README.md: -------------------------------------------------------------------------------- 1 | # StockTradingAI 2 | This project is a Stock Trader trained to trade stocks from the S&P 500. It was made using a Deep Q-Learning model and libraries such as TensorFlow, Keras, and OpenAI Gym. It was trained on data from 2006-2016, cross validated on data from 2016-2018, and tested on data from 2018-2021. 3 | 4 | # Installation 5 | All of the code is in Google Colab Notebook. Simply download it and upload it into your Google Drive. 6 | 7 | # Cross Validation Results 8 | ![image](https://user-images.githubusercontent.com/62225369/119423386-2a5f2f80-bcd1-11eb-9316-77c9e9fe3308.png) 9 | 10 | ![image](https://user-images.githubusercontent.com/62225369/119423412-36e38800-bcd1-11eb-8eec-1c8771937f46.png) 11 | 12 | ![image](https://user-images.githubusercontent.com/62225369/119423450-49f65800-bcd1-11eb-99d8-6a466697cc5d.png) 13 | 14 | ![image](https://user-images.githubusercontent.com/62225369/119423467-57abdd80-bcd1-11eb-887a-b94ce662575e.png) 15 | 16 | ![image](https://user-images.githubusercontent.com/62225369/119423484-672b2680-bcd1-11eb-90aa-1eb9f91e892e.png) 17 | 18 | Based on the data shown above, model 3 was determined to be the best. 19 | 20 | # Test Results 21 | ![image](https://user-images.githubusercontent.com/62225369/119423691-def95100-bcd1-11eb-81a9-d8f6a2f1e2c0.png) 22 | 23 | ![image](https://user-images.githubusercontent.com/62225369/119423699-e587c880-bcd1-11eb-81ba-75a5c4244cdb.png) 24 | --------------------------------------------------------------------------------