Stock trading bot using deep Q-learning
Top 35.3% on sourcepulse
This project provides a stock trading bot implemented using Deep Q-Learning, suitable for individuals interested in learning about reinforcement learning applications in finance. It offers a simplified, educational approach to building an RL trading agent, demonstrating core concepts and allowing for experimentation with different DQN variants.
How It Works
The bot operates as a model-free reinforcement learning agent. At each step, it observes the stock's recent price history (represented as normalized differences) as its state. Based on this state, it chooses an action: buy, sell, or hold. After executing the action, it receives a reward (change in portfolio value) and updates its internal Q-network parameters using techniques like Vanilla DQN and Double DQN to learn an optimal trading policy through trial and error.
Quick Start & Requirements
pip3 install -r requirements.txt
python3 train.py data/GOOG.csv data/GOOG_2018.csv --strategy t-dqn
python3 eval.py data/GOOG_2019.csv --model-name model_GOOG_50 --debug
Highlighted Details
Maintenance & Community
No specific community channels, roadmap, or notable contributors are mentioned in the README.
Licensing & Compatibility
The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.
Limitations & Caveats
The agent's decision-making is limited to trading a single stock at a time, simplifying the complex problem of portfolio redistribution. The project is presented for learning purposes, and performance may vary significantly with different stocks or market conditions.
1 year ago
1 day