| title: DRL Trading Bot | |
| emoji: π€ | |
| colorFrom: blue | |
| colorTo: green | |
| sdk: streamlit | |
| sdk_version: 1.42.0 | |
| app_file: src/ui/app.py | |
| pinned: false | |
| # DRL Trading System | |
| An autonomous Deep Reinforcement Learning trading system using PPO-LSTM for Binance Testnet trading with real-time Streamlit monitoring. | |
| ## Features | |
| - π§ **PPO-LSTM Agent**: Captures time-series dependencies for smarter trading decisions | |
| - π **Self-Improvement Loop**: Automatically fine-tunes on successful trades every 24 hours | |
| - π **Real-time Dashboard**: TradingView-style charts with live Buy/Sell signals | |
| - π‘οΈ **Risk Management**: Circuit breaker stops trading at 5% daily loss | |
| - π **Backtesting**: Validated on 2024-2025 historical data | |
| ## Quick Start | |
| ```bash | |
| # 1. Create virtual environment | |
| python -m venv venv | |
| source venv/bin/activate # On Windows: venv\Scripts\activate | |
| # 2. Install dependencies | |
| pip install -r requirements.txt | |
| # 3. Configure API keys | |
| cp .env.example .env | |
| # Edit .env with your Binance Testnet credentials | |
| # 4. Run backtest first | |
| python -m src.backtest.engine | |
| # 5. Launch UI | |
| streamlit run src/ui/app.py | |
| ``` | |
| ## Project Structure | |
| ``` | |
| drl-trading-system/ | |
| βββ config/ | |
| β βββ config.yaml # All configuration | |
| βββ src/ | |
| β βββ env/ # Gymnasium environment | |
| β βββ brain/ # PPO-LSTM agent | |
| β βββ api/ # Binance connector | |
| β βββ backtest/ # Backtesting engine | |
| β βββ ui/ # Streamlit dashboard | |
| βββ data/ | |
| β βββ historical/ # Cached OHLCV data | |
| β βββ models/ # Saved checkpoints | |
| βββ tests/ | |
| ``` | |
| ## Architecture | |
| The system uses a Sharpe/Sortino ratio reward function to prioritize risk-adjusted returns over raw profit. | |
| ## License | |
| MIT | |