QC Strategy Analyzer — Agent Memory (relocalisé)

Origine : fichier .claude/agent-memory/qc-strategy-analyzer/MEMORY.md (relocalisé en c.1301+211 dans le cadre de l’EPIC #9535, item 7 PR-C narrow). Le contenu est conservé tel quel (anti-régression : cf triage jsboigeEpita, durable vs scratch) ; les chemins machine hardcodés sont remplacés par des placeholders (« <workspace> » pour le working dir, « <tool-results>/ » pour le cache MCP) — la description du pattern reste valide, seule la localisation absolue est neutralisée.

Statut : durable. Le contenu documente (a) le contexte projet (organisation QC PAID, docs clés) ; (b) les patterns MCP (read_backtest payload size, régime analysis rolling windows) ; (c) les fixes de patterns (vague 1.0 → 2.0) ; (d) les leçons opérationnelles (multi-stratégie, optuna, GPU). Ce sont des invariants d’environnement, pas du scratch daté.

Project Context

  • Working dir : <workspace>/MyIA.AI.Notebooks/QuantConnect/projects/ (relatif au checkout local)
  • Key docs: OPTIMIZATION_BACKLOG.md, REGIME_ANALYSIS.md
  • QC org: d600793e (personal, PAID - backtests work)

MCP Tool Patterns

read_backtest returns very large payloads

  • Results saved to <tool-results>/*.txt (cache MCP, basename par session)
  • Use Python to extract: data['backtest']['statistics'] for key metrics
  • Use data['backtest']['rollingWindow'] for regime analysis
    • Keys: M12_YYYYMMDD (trailing 12m), M1_YYYYMMDD (trailing 1m)
    • Sub-structure: portfolioStatistics.sharpeRatio, .compoundingAnnualReturn, .drawdown, .totalNetProfit
  • Year-end snapshots: keys matching M12_*1231
  • Charts: usually only have name key, no actual series data for older backtests

read_backtest_orders returns null for old backtests

  • {"orders":null,"length":null} for backtests not run recently
  • Only works for very recent backtests (within hours)

list_backtests with includeStatistics=true

  • Returns: sharpeRatio, alpha, beta, compoundingAnnualReturn, drawdown, winRate, lossRate, trades

Regime Analysis Findings (Issue #41, 2026-03-09)

Annual return patterns by strategy

  • VIX-TermStructure: Works in VIX compression (2015-17: +82%), fails in tail events and post-2018 SVXY -0.5x restructure (2018-25: -23%)
  • ForexCarry: Only 2013-14 positive years (pre-T-bill era). Post-2018, T-bills > FX momentum = negative Sharpe structurally
  • TurnOfMonth: Bear market signal. 2015-26 is 90% bull so Sharpe 0.128. Full-cycle (2000-26) estimated 0.3-0.5
  • OptionsIncome: Works in low-vol bull (2019, 2021: Sharpe 1.4-1.5), terrible in slow bears (2022: -8.8%). Negative alpha always

STRUCTURAL_CEILING criteria confirmed

  • Alpha persistently negative (all 4 strategies)
  • Signal source structurally impaired (SVXY leverage, G10 FX premium post-2008)
  • All iterations exhausted (8-11 per strategy, all degraded)

Key structural events

  • Feb 5, 2018 VIXplosion: SVXY restructured from -1x to -0.5x (halved roll yield for VIX-TS forever)
  • 2008 GFC: G10 carry premium collapsed, never recovered (ForexCarry ceiling predates backtest)
  • 2022 rate hikes: Worst year for TOM (-6.1%), OptionsIncome (-8.8%), and covered calls generally

Robustness Extension Results (Issue #37, 2026-03-09)

Extended 3 strategies from 2015->2010. Results vs MEMORY.md original values:

Strategy 2015-2026 Sharpe 2010-2026 Sharpe 2010-2026 CAGR 2010-2026 MaxDD Verdict
AllWeather 0.602 0.667 9.3% 16.4% ROBUST (improved)
SectorMomentum 0.555 0.621 13.2% 22.8% ROBUST (improved)
MomentumStrategy 0.472 0.565 11.8% 25.8% ROBUST (improved)

All 3 strategies are MORE robust on the extended period. Post-GFC 2010-2014 was a strong bull run which benefited all 3. MaxDD stayed flat (strategies handled pre-2015 regimes well). Note: SectorMomentum project 28433643 (not 28657838 which is OptionsIncome).

Workflow Notes

  • Always extract portfolioStatistics from rolling windows (not tradeStatistics) for return/Sharpe
  • Year-end M12 gives best regime picture: one data point per year = clear annual performance
  • M1 monthly data useful for event analysis (VIXplosion Feb 2018, COVID Mar 2020 etc.)
  • Project ID correction: SectorMomentum = 28433643, OptionsIncome = 28657838 (task description had them swapped)
Retour au sommet