Files
vibe-invest/.claude/agent-memory/quant-rust-strategist/MEMORY.md
2026-02-11 18:00:12 +00:00

34 lines
2.1 KiB
Markdown

# Quant-Rust-Strategist Memory
## Architecture Overview
- 50-symbol universe across 9 sectors (MAG7, semis, growth tech, healthcare, fintech, financials, industrials, consumer, energy)
- Hybrid momentum + mean-reversion strategy via composite signal scoring in `generate_signal()`
- Backtester restricts buys to top 8 momentum stocks; live mode also uses TOP_MOMENTUM_COUNT=8
- Signal thresholds: StrongBuy>=6.0, Buy>=4.5, Sell<=-3.5, StrongSell<=-6.0
## Critical Finding: Hourly Mode is Catastrophically Broken (2026-02-11)
See [hourly-backtest-analysis-2026-02-11.md](hourly-backtest-analysis-2026-02-11.md) for full details.
### Root Causes (Priority Order)
1. **7x period scaling creates absurd indicator requirements**: RSI=98, MACD slow=182, EMA trend=350, momentum=441. min_bars()~450. Most indicators are NaN for majority of the data.
2. **Drawdown halt at 10% is terminal for short backtests**: After -11.44% in 8 days, system sat in 100% cash for 2+ months (Nov 21 to Feb 11). This made the loss permanent.
3. **Churning in opening days**: MU 3x, AMD 3x, GOOGL 3x in first 8 days. Cooldown helps but insufficient when all indicators trigger simultaneously on warmup.
4. **IEX feed**: `feed=iex` gives thin volume, unreliable for hourly OHLCV.
5. **Concentrated sector exposure**: MU, AMD, ASML all semis.
### Previous Finding: Daily Churning (also 2026-02-11)
See [backtest-analysis-2026-02-11.md](backtest-analysis-2026-02-11.md) for daily mode analysis.
- 12 whipsaw events cost $7,128, 16 same-day round-trips at 0% win rate
- Fixed by: cooldown timer (7 bars), ATR stop widened to 2.0x, buy threshold raised to 4.5
## Key Parameters (config.rs) - Current as of 2026-02-11
- ATR Stop: 2.0x | ATR Trail: 1.5x distance, 1.5x activation
- Max-loss cap: 4% | Position sizing: 1% risk / ATR_stop_pct, capped at 22%
- Max 6 positions, max 2 per sector | Drawdown halt: 10% | Time exit: 30 bars
- Cooldown: 7 bars | Slippage: 10bps
- Hourly mode: ALL indicator periods multiplied by 7 (HOURS_PER_DAY=7)
## Build Notes
- `cargo build --release` compiles clean (only pre-existing dead_code warnings)
- No tests exist