wip
This commit is contained in:
@ -139,4 +139,190 @@ python main_clean.py --mode rl
|
||||
- **Feature processing**: 26 indicators in < 1 second
|
||||
- **Memory usage**: Monitored and limited per model
|
||||
- **Chart updates**: 2-second refresh for real-time display
|
||||
- **Decision latency**: Optimized for scalping (< 100ms target)
|
||||
- **Decision latency**: Optimized for scalping (< 100ms target)
|
||||
|
||||
## 🚀 **VSCode Launch Configurations**
|
||||
|
||||
### **1. Core Trading Modes**
|
||||
|
||||
#### **Live Trading (Demo)**
|
||||
```json
|
||||
"name": "Live Trading (Demo)"
|
||||
"program": "main.py"
|
||||
"args": ["--mode", "live", "--demo", "true", "--symbol", "ETH/USDT", "--timeframe", "1m"]
|
||||
```
|
||||
- **Purpose**: Safe demo trading with virtual funds
|
||||
- **Environment**: Paper trading mode
|
||||
- **Risk**: Zero (no real money)
|
||||
|
||||
#### **Live Trading (Real)**
|
||||
```json
|
||||
"name": "Live Trading (Real)"
|
||||
"program": "main.py"
|
||||
"args": ["--mode", "live", "--demo", "false", "--symbol", "ETH/USDT", "--leverage", "50"]
|
||||
```
|
||||
- **Purpose**: Real trading with actual funds
|
||||
- **Environment**: Live exchange API
|
||||
- **Risk**: High (real money)
|
||||
|
||||
### **2. Training & Development Modes**
|
||||
|
||||
#### **Train Bot**
|
||||
```json
|
||||
"name": "Train Bot"
|
||||
"program": "main.py"
|
||||
"args": ["--mode", "train", "--episodes", "100"]
|
||||
```
|
||||
- **Purpose**: Standard RL agent training
|
||||
- **Duration**: 100 episodes
|
||||
- **Output**: Trained model files
|
||||
|
||||
#### **Evaluate Bot**
|
||||
```json
|
||||
"name": "Evaluate Bot"
|
||||
"program": "main.py"
|
||||
"args": ["--mode", "eval", "--episodes", "10"]
|
||||
```
|
||||
- **Purpose**: Model performance evaluation
|
||||
- **Duration**: 10 test episodes
|
||||
- **Output**: Performance metrics
|
||||
|
||||
### **3. Neural Network Training**
|
||||
|
||||
#### **NN Training Pipeline**
|
||||
```json
|
||||
"name": "NN Training Pipeline"
|
||||
"module": "NN.realtime_main"
|
||||
"args": ["--mode", "train", "--model-type", "cnn", "--epochs", "10"]
|
||||
```
|
||||
- **Purpose**: Deep learning model training
|
||||
- **Framework**: PyTorch
|
||||
- **Monitoring**: Automatic TensorBoard integration
|
||||
|
||||
#### **Quick CNN Test (Real Data + TensorBoard)**
|
||||
```json
|
||||
"name": "Quick CNN Test (Real Data + TensorBoard)"
|
||||
"program": "test_cnn_only.py"
|
||||
```
|
||||
- **Purpose**: Fast CNN validation with real market data
|
||||
- **Duration**: 2 epochs, 500 samples
|
||||
- **Output**: `test_models/quick_cnn.pt`
|
||||
- **Monitoring**: TensorBoard metrics
|
||||
|
||||
### **4. 🔥 Realtime RL Training + Monitoring**
|
||||
|
||||
#### **Realtime RL Training + TensorBoard + Web UI**
|
||||
```json
|
||||
"name": "Realtime RL Training + TensorBoard + Web UI"
|
||||
"program": "train_realtime_with_tensorboard.py"
|
||||
"args": ["--episodes", "50", "--symbol", "ETH/USDT", "--web-port", "8051"]
|
||||
```
|
||||
- **Purpose**: Advanced RL training with comprehensive monitoring
|
||||
- **Features**:
|
||||
- Real-time TensorBoard metrics logging
|
||||
- Live web dashboard at http://localhost:8051
|
||||
- Episode rewards, balance tracking, win rates
|
||||
- Trading performance metrics
|
||||
- Agent learning progression
|
||||
- **Data**: 100% real ETH/USDT market data from Binance
|
||||
- **Monitoring**: Dual monitoring (TensorBoard + Web UI)
|
||||
- **Duration**: 50 episodes with real-time feedback
|
||||
|
||||
### **5. Monitoring & Visualization**
|
||||
|
||||
#### **TensorBoard Monitor (All Runs)**
|
||||
```json
|
||||
"name": "TensorBoard Monitor (All Runs)"
|
||||
"program": "run_tensorboard.py"
|
||||
```
|
||||
- **Purpose**: Monitor all training sessions
|
||||
- **Features**: Auto-discovery of training logs
|
||||
- **Access**: http://localhost:6006
|
||||
|
||||
#### **Realtime Charts with NN Inference**
|
||||
```json
|
||||
"name": "Realtime Charts with NN Inference"
|
||||
"program": "realtime.py"
|
||||
```
|
||||
- **Purpose**: Live trading charts with ML predictions
|
||||
- **Features**: Real-time price updates + model inference
|
||||
- **Models**: CNN + RL integration
|
||||
|
||||
### **6. Advanced Training Modes**
|
||||
|
||||
#### **TRAIN Realtime Charts with NN Inference**
|
||||
```json
|
||||
"name": "TRAIN Realtime Charts with NN Inference"
|
||||
"program": "train_rl_with_realtime.py"
|
||||
"args": ["--episodes", "100", "--max-position", "0.1"]
|
||||
```
|
||||
- **Purpose**: RL training with live chart integration
|
||||
- **Features**: Visual training feedback
|
||||
- **Position limit**: 10% portfolio allocation
|
||||
|
||||
## 📊 **Monitoring URLs**
|
||||
|
||||
### **Development**
|
||||
- **TensorBoard**: http://localhost:6006
|
||||
- **Web Dashboard**: http://localhost:8051
|
||||
- **Training Status**: `python monitor_training.py`
|
||||
|
||||
### **Production**
|
||||
- **Live Trading Dashboard**: Integrated in trading interface
|
||||
- **Performance Metrics**: Real-time P&L tracking
|
||||
- **Risk Management**: Position size and drawdown monitoring
|
||||
|
||||
## 🎯 **Quick Start Recommendations**
|
||||
|
||||
### **For CNN Development**
|
||||
1. **Start**: "Quick CNN Test (Real Data + TensorBoard)"
|
||||
2. **Monitor**: Open TensorBoard at http://localhost:6006
|
||||
3. **Validate**: Check `test_models/` for output files
|
||||
|
||||
### **For RL Development**
|
||||
1. **Start**: "Realtime RL Training + TensorBoard + Web UI"
|
||||
2. **Monitor**: TensorBoard (http://localhost:6006) + Web UI (http://localhost:8051)
|
||||
3. **Track**: Episode rewards, balance progression, win rates
|
||||
|
||||
### **For Production Trading**
|
||||
1. **Test**: "Live Trading (Demo)" first
|
||||
2. **Validate**: Confirm strategy performance
|
||||
3. **Deploy**: "Live Trading (Real)" with appropriate risk management
|
||||
|
||||
## ⚡ **Performance Features**
|
||||
|
||||
### **GPU Acceleration**
|
||||
- Automatic CUDA detection and utilization
|
||||
- Mixed precision training support
|
||||
- Memory optimization for large datasets
|
||||
|
||||
### **Real-time Data**
|
||||
- Direct Binance API integration
|
||||
- Multi-timeframe data synchronization
|
||||
- Live price feed with minimal latency
|
||||
|
||||
### **Professional Monitoring**
|
||||
- Industry-standard TensorBoard integration
|
||||
- Custom web dashboards for trading metrics
|
||||
- Real-time performance tracking
|
||||
|
||||
## 🛡️ **Safety Features**
|
||||
|
||||
### **Pre-launch Tasks**
|
||||
- **Kill Stale Processes**: Automatic cleanup before launch
|
||||
- **Port Management**: Intelligent port allocation
|
||||
- **Resource Monitoring**: Memory and GPU usage tracking
|
||||
|
||||
### **Real Market Data Policy**
|
||||
- ✅ **No Synthetic Data**: All training uses authentic exchange data
|
||||
- ✅ **Live API Integration**: Direct connection to cryptocurrency exchanges
|
||||
- ✅ **Data Validation**: Quality checks for completeness and consistency
|
||||
- ✅ **Multi-timeframe Sync**: Aligned data across all time horizons
|
||||
|
||||
---
|
||||
|
||||
✅ **Launch configuration** - Clean, modular mode selection
|
||||
✅ **Professional monitoring** - TensorBoard + custom dashboards
|
||||
✅ **Real market data** - Authentic cryptocurrency price data
|
||||
✅ **Safety features** - Risk management and validation
|
||||
✅ **GPU acceleration** - Optimized for high-performance training
|
Reference in New Issue
Block a user