File size: 1,856 Bytes
fc115d5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | ---
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
|