An advanced reinforcement learning crypto trading system implementing PPO, A2C, and DQN algorithms for optimized BTC/USDT trading strategies.
- Dynamic Adaptation: Learns from 24/7 market fluctuations
- Risk-Aware Trading: Optimizes Sharpe ratio and drawdowns
- Strategy Diversification: Supports multiple RL approaches
| Algorithm | Avg Reward | Sharpe Ratio | Returns (%) | Key Strength |
|---|---|---|---|---|
| DQN | 184.69 | 2.22 | 1.28 | Best Risk-Adjusted Returns |
| PPO | 173.65 | 1.85 | 0.97 | Balanced Performance |
| A2C | 165.78 | 1.82 | 0.99 | Fast Convergence |
- Multi-algorithm framework (PPO/A2C/DQN)
- Real-time trading visualization
- Advanced metrics tracking:
- Portfolio volatility (0.01-0.05)
- Win rate analysis (51.76%-51.90%)
- Drawdown monitoring (-0.24% to -2.31%)
- Buy & Hold benchmarking
| Metric | DQN | PPO | A2C | Buy & Hold |
|---|---|---|---|---|
| Avg Reward | 184.69 | 173.65 | 165.78 | - |
| Returns (%) | 1.28 | 0.97 | 0.99 | 0.13 |
| Sharpe Ratio | 2.22 | 1.85 | 1.82 | 2.20 |
| Max Drawdown | -2.31 | -1.94 | -1.99 | -0.24 |
DQN Dominance:
- Highest returns (1.28%) and Sharpe ratio (2.22)
- Competitive win rate (51.90%)
Buy & Hold:
- Lowest volatility (0.01)
- Surprisingly high Sharpe ratio (2.20)
All RL Models:
- Consistently outperform Buy & Hold in returns
- Maintain >51.7% win rates
git clone https://github.com/Vnadh/RL-Crypto-Trading-Bot.gitcd RL-Crypto-Trading-Botpython -m venv myenvsource myenv/bin/activate pip install -r requirements.txt# Train all models with optimized parameters
python train_model.py # Generate detailed metrics report
python testing_model.py- DQN Superiority: 42% higher returns than Buy & Hold
- Risk Management: All RL models maintain Sharpe ratios >1.8
- Market Resilience: PPO shows most stable drawdown profile
- Flexible Action Spaces: Supports both discrete and continuous trading
- Live Rendering: Watch agents trade in real-time
- Parameter Optimization: Pre-tuned configurations for crypto markets
- Fork the repository
- Create feature branches
- Submit PRs with test results
- Maintain coding standards
MIT Licensed - See LICENSE for details.
Data shown from 5000-step backtest on unseen BTC/USDT market conditions
