DRL Trading Bot
Feature: HTF Agent integration β€” live trading, API endpoints, UI tab
fc115d5
|
Raw
History Blame Contribute Delete
1.86 kB
---
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