Version: 4.2.0
Status: Local mode ✅ | Cloud mode⚠️ experimental
cd QuantLab\deployment\lean
lean.batdemo lean controller : https://lean.bamsbung.id/
| Feature | Status | Notes |
|---|---|---|
| Local Backtest | ✅ Working | Docker + LEAN CLI |
| Web Dashboard | ✅ Working | Dash v4.2 |
| CLI Manager | ✅ Working | Full menu |
| Report Generator | ✅ Working | HTML + JSON |
| Full Logging | ✅ Working | Real-time capture |
| Cloud Push/Pull | May have errors | |
| Live Trading | ❌ Not Ready | - |
QuantLab/deployment/lean/
├── strategies/ # All LEAN strategies
├── data/ # LEAN-format market data
├── config/ # YAML configurations
├── docs/ # Documentation
├── logs/ # Execution logs
├── lean_ui/ # Web Dashboard (Dash v4.2)
│ ├── app.py # Main entry point
│ ├── index.py # Router
│ ├── theme.py # Colors/styles
│ ├── data_loader.py # Data loading
│ ├── pages/ # Page modules
│ │ ├── overview.py # Strategy cards
│ │ ├── strategies.py # Comparison table
│ │ ├── trades.py # Trade history
│ │ ├── controls.py # CLI operations + logging
│ │ ├── settings.py # System status
│ │ └── strategy_detail.py
│ ├── components/ # Reusable components
│ └── assets/ # CSS
├── lean_manager.py # CLI manager
├── lean_report_enhanced.py # HTML report generator
├── lean.bat # Windows launcher
└── lean.json # LEAN engine config
:: Via menu (recommended)
lean.bat
:: Select [9] Web Dashboard
:: Select [1] Debug Mode or [2] Production Mode
:: Direct command
python -m lean_ui.app --debug --port 8050| Page | URL | Description |
|---|---|---|
| Overview | / |
Strategy summary cards |
| Strategies | /strategies |
Comparison table |
| Trades | /trades |
Trade history |
| Controls | /controls |
Run backtest, reports, CLI ops |
| Settings | /settings |
System status |
| Detail | /strategy/<name> |
Full metrics |
| Mode | Use Case |
|---|---|
| Debug | Development - hot reload, detailed errors |
| Production | Normal use - optimized |
:: Local mode (recommended)
lean backtest strategies/Momentum_MA --parameter mode local
:: With parameters
lean backtest strategies/EWMAC_Trend --parameter mode local --parameter fast_span 8- Go to Controls page
- Select strategy
- Click "Run Backtest"
- Watch real-time output with timestamps
[10:30:01] ▶ Launching Docker container...
[10:30:05] ▶ Building algorithm...
[10:30:10] ▶ Running algorithm...
[10:31:00] 📊 Sharpe Ratio: 1.25
[10:31:00] ✓ Algorithm completed
All logs saved to logs/{strategy}_{timestamp}.log
| Metric | Threshold |
|---|---|
| Sharpe Ratio | >= 0.5 |
| PSR | >= 50% |
| Max Drawdown | <= 30% |
| Min Trades | >= 50 |
| Win Rate | >= 40% |
Confidence Levels:
- HIGH (Green): 5/5 checks pass
- MEDIUM (Yellow): 3-4/5 pass
- LOW (Red): <3/5 pass
- Conda environment:
lab-quant - LEAN CLI:
pip install lean - Docker Desktop: Running
- Dash:
pip install dash dash-bootstrap-components
- ARCHITECTURE.md - System design
- WORKFLOW.md - Usage guide
- Cloud Operations - Push/Pull/Live masih experimental
- Config Mounting - LEAN CLI tidak mount config.json, embed di main.py
- Real-time UI - Dash callback synchronous, output ditampilkan setelah selesai
- Docker Required - LEAN engine berjalan di Docker container
Check map_files dan factor_files untuk custom symbol.
Verify data exists: dir data\cfd\oanda\minute\{symbol}\
Clear cache: del /s /q lean_ui\__pycache__
Start Docker Desktop, then retry.
Built with ❤️ for traders who believe in data-driven decisions.
Version 5.1 | 26 December 2025
📞 Support dedy@bamsbung.id