43 lines
1.9 KiB
Markdown
43 lines
1.9 KiB
Markdown
# Quant-Rust-Strategist Memory
|
|
|
|
## Architecture Overview
|
|
- 50-symbol universe across 9 sectors
|
|
- Hybrid momentum + mean-reversion via composite signal scoring in `generate_signal()`
|
|
- Backtester restricts buys to top 8 momentum stocks (TOP_MOMENTUM_COUNT=8)
|
|
- Signal thresholds: StrongBuy>=6.0, Buy>=4.5, Sell<=-3.5, StrongSell<=-6.0
|
|
|
|
## Key Finding: Daily vs Hourly Parameter Sensitivity (2026-02-11)
|
|
|
|
### Daily Timeframe Optimization (Successful)
|
|
- Reduced momentum_period 252->63, ema_trend 200->50 in IndicatorParams::daily()
|
|
- Reduced warmup from 267 bars to ~70 bars
|
|
- Result: Sharpe 0.53->0.86 (+62%), Win rate 40%->50%, PF 1.32->1.52
|
|
|
|
### Hourly Timeframe: DO NOT CHANGE FROM BASELINE
|
|
- Hourly IndicatorParams: momentum=63, ema_trend=200 (long lookbacks filter IEX noise)
|
|
- Shorter periods (momentum=21, ema_trend=50): CATASTROPHIC -8% loss
|
|
- ADX threshold lowered 25->20 (shared const, helps both timeframes)
|
|
|
|
### Failed Experiments (avoid repeating)
|
|
1. Tighter ATR stop (2.0x): too many stop-outs on hourly. Keep 2.5x
|
|
2. Lower buy threshold (3.5): too many weak entries. Keep 4.5
|
|
3. More positions (8): spreads capital too thin. Keep 5
|
|
4. Higher risk per trade (1.0-1.2%): compounds losses. Keep 0.8%
|
|
5. Wider trail (2.5x ATR): misses profit on hourly. Keep 1.5x
|
|
6. Lower volume threshold (0.7): bad trades on IEX. Keep 0.8
|
|
7. Lower cash reserve (3%): marginal, not worth risk. Keep 5%
|
|
|
|
## Current Parameters (config.rs)
|
|
- ATR Stop: 2.5x | Trail: 1.5x distance, 1.5x activation
|
|
- Risk: 0.8%/trade, max 22% position, 5% cash reserve, 4% max loss
|
|
- Max 5 positions, 2/sector | Drawdown halt: 10% (35 bars) | Time exit: 30
|
|
- Cooldown: 7 bars | Ramp-up: 30 bars | Slippage: 10bps
|
|
- Daily params: momentum=63, ema_trend=50
|
|
- Hourly params: momentum=63, ema_trend=200
|
|
- ADX: threshold=20, strong=35
|
|
|
|
## Build Notes
|
|
- `cargo build --release` compiles clean (only dead_code warnings)
|
|
- No tests exist
|
|
- Backtests have stochastic variation from IEX data timing
|