Skip to content

feat(qc,#9768): paramètres wf-start/wf-end — fenêtres walk-forward multi-régimes - #19651

Merged
myia-ai-01 merged 2 commits into
mainfrom
feature/9768-wf-window-params
Oct 7, 2026
Merged

myia-ai-01 merged 2 commits into
mainfrom
feature/9768-wf-window-params

Conversation

@jsboige

@jsboige jsboige commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Grain: MED/qc — lane myia-po-2025:CoursIA — prev: LIGHT/notebook-python #19648

Périmètre : 3 fichiers — MyIA.AI.Notebooks/QuantConnect/projects/CSharp-BTC-MACD-ADX/Main.cs (paramètres wf-start/wf-end) + research_robustness.ipynb (§8.4 campagne walk-forward) + wf_cloud_results_9768.json (annexe résultats 18 backtests) — source : gh pr view --json files.

Ce que cette PR livre

L'instrument de la campagne walk-forward multi-régimes sur QC Cloud (claim #9768 du 2026-10-06T13:38Z, porte ouverte par #18012) : deux paramètres wf-start / wf-end (string ISO yyyy-MM-dd) sur CSharpBTCMACDADX, défauts = la fenêtre gelée #9803 (2019-04-01 / 2025-12-31) — comportement strictement inchangé tant que les paramètres ne sont pas fournis.

La campagne : 9 régimes de marche × 2 configs figées (baseline Main.cs 25/40/10-90, variante balayage 35/60/15-85 — mêmes configs que #18012), par tranches de 10 backtests sur le projet cloud CSharp-BTC-MACD-ADX (30751067), budget arbitré par ai-01. Le COVID Crash (5 jours) est exclu — l'étude locale ne le mesure pas (< 30 jours, cellule 18 de research_robustness.ipynb). Chaque fenêtre est hors échantillon pour les paramètres : les deux configs sont figées avant la campagne (issues de #18012), jamais réajustées par fenêtre.

Résultats — campagne walk-forward du 2026-10-07 (18 backtests + sanity)

Contrôle sanity (préalable de campagne) : backtest pleine période sans paramètres, défauts #9803 → Sharpe 0.246, PASS — reproduit le backtest 9ae0a35b de #18012 ; la paramétrisation n'a pas changé le comportement par défaut.

Régime Fenêtre Config Sharpe CAGR % MaxDD % Ordres
Bear 2019 2019-01-01 → 2019-06-30 base 3.587 131.503 12.9 2
Bear 2019 2019-01-01 → 2019-06-30 var 6.577 300.93 18.8 1
Bull 2019-2020 2019-07-01 → 2020-03-11 base 0.1 0.451 17.5 4
Bull 2019-2020 2019-07-01 → 2020-03-11 var -0.939 -61.859 56.3 3
covid-recovery 2020-03-17 → 2020-12-31 base 1.571 44.929 17.5 4
covid-recovery 2020-03-17 → 2020-12-31 var 6.128 219.287 17.5 1
bull2021 2021-01-01 → 2021-04-14 base 0.0 0.0 0.0 0
bull2021 2021-01-01 → 2021-04-14 var 0.0 0.0 0.0 0
correction2021 2021-04-15 → 2021-07-20 base -0.609 -44.347 22.0 2
correction2021 2021-04-15 → 2021-07-20 var -1.001 -51.491 26.4 1
bull2021h2 2021-07-21 → 2021-11-09 base 0.807 17.363 11.5 1
bull2021h2 2021-07-21 → 2021-11-09 var 0.749 14.222 7.4 1
bear2022 2021-11-10 → 2022-12-31 base -0.964 -46.084 62.3 8
bear2022 2021-11-10 → 2022-12-31 var -0.524 -26.816 43.9 5
sideways2023 2023-01-01 → 2023-10-31 base 0.39 10.324 11.4 5
sideways2023 2023-01-01 → 2023-10-31 var -0.607 -3.4 10.6 3
bull2024-25 2023-11-01 → 2025-12-31 base -0.071 -2.952 55.9 15
bull2024-25 2023-11-01 → 2025-12-31 var 0.223 6.529 26.1 9

Base = 25/40/10-90, var = 35/60/15-85. Valeurs brutes de wf_cloud_results_9768.json (annexe de cette PR, ids backtest par ligne) ; CAGR et MaxDD en pourcents tels que rapportés par QC Cloud.

Verdict : NO BEATS — la variante domine la base dans 4 régimes sur 9 (Bear 2019, covid-recovery, bear2022, bull2024-25), la base domine dans 4 (Bull 2019-2020, correction2021, bull2021h2, sideways2023), nul sur bull2021 : aucune domination cross-régimes, et le nombre d'ordres par fenêtre (0-15) interdit toute claim de significativité — tel que mesuré.

Détails

  • DateTime.ParseExact(..., CultureInfo.InvariantCulture) — using System.Globalization déjà présent (l.6).
  • La documentation du gel [EPIC #9768] Phase 3 remediation — figer la fenêtre BTC-MACD-ADX/Main.cs (D2 fondateur) #9803 ( Sharpe 0.225 → 0.123, mesure de sensibilité) est préservée intégralement — l'édit ne fait que router les deux appels SetStartDate/SetEndDate par les paramètres, défauts identiques.
  • Parité cloud : la copie du projet cloud (30751067) porte l'équivalent fonctionnel (compile a0b7e2a6bce1...). Les deux fichiers ne sont pas byte-identiques (le repo porte les annotations OPTIMISÉ/[EPIC #9768] Phase 3 remediation — figer la fenêtre BTC-MACD-ADX/Main.cs (D2 fondateur) #9803 que le cloud n'a pas) — éditions chirurgicales équivalentes de part et d'autre, jamais de copie brutale.
  • Contrôle de discrimination (exécuté) : le sanity pleine période ci-dessus reproduit le Sharpe 0.246 de 9ae0a35b — la campagne a donc bien porté sur la paramétrisation, pas sur un comportement dérivé.

QC — conformité

  • Backtest obligatoire après modification : exécuté — sanity + 18 backtests par régime, tableau et verdict ci-dessus ; le détail par run reste dans l'annexe wf_cloud_results_9768.json de cette PR. L'ancrage §8.4 dans le carnet suivra sur [EPIC] Derive de degenerescence des notebooks a travers leurs revisions — forensic d'historique git #9768 (reporté avec l'annexe 8.3).
  • Rate limiting respecté : tranches de 10 annoncées sur le dashboard avant lancement, espacement ≥ 7 s entre créations.
  • API via MCP Docker uniquement (aucun script REST direct).

See #9768 · See #18012 · See #9803

🤖 Generated with Claude Code

jsboige and others added 2 commits October 7, 2026 05:03
…es walk-forward multi-regimes

Deux parametres string ISO (yyyy-MM-dd), defauts = la fenetre gelee #9803
(2019-04-01 / 2025-12-31) : comportement strictement inchange sans parametres.
Instrument de la campagne walk-forward cloud (claim c.9768 2026-10-06) :
9 regimes de marche x 2 configs figees (baseline 25/40/10-90, variante
35/60/15-85), backtests par tranche de 10 sur QC Cloud.

Parite : copie cloud du projet (30751067) mise a jour dans le meme geste
(compile a0b7e2a6...). Les deux fichiers ne sont PAS byte-identiques
(le repo porte les annotations OPTIMISE/#9803) : editions chirurgicales
equivalentes, pas de copie.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…O BEATS

18 backtests (2 configs figees x 9 regimes) via wf-start/wf-end, sanity
0.246 reproduit (bd91c20e). Bilan: variante 4, baseline 4, nul
structurel 1 (Bull 2021 < warmup 500j). La domination full-window
(0.843 vs 0.246) ne survit pas au decoupage par regimes -- les deux
moteurs convergent. Parametres variante restent non committes.

Annexe machine: wf_cloud_results_9768.json (5.4 Ko).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

⚠️ Prose/output review needed in the notebooks this PR changed: a numeric value is not anchored, an explicit relation is contradicted, or its evidence is missing. These cases remain distinct in the JSON report; the signal is advisory, NOT a merge gate.

Scope = notebooks CHANGED in this PR, not the whole corpus. Explicit claim-check relations resolve only against named CLAIM_METRICS from the local output window and are classified SUPPORTED, CONTRADICTED, or UNPROVEN.
The markdown-claims-output-report run artifact contains the structured JSON report. See python scripts/check_markdown_claims_output.py --help for re-running locally.
Detector rationale: c.290 / c.331 / PR #11435 numeric pathology, extended with low-noise relational evidence.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

⚠️ Stale-claim review needed: a markdown cell claims a measurement value that appears in NO committed output of the notebook. Advisory, NOT a merge gate — triage against the JSON artifact.

Scope = notebooks CHANGED in this PR, not the whole corpus. The stale-claim-report run artifact holds the structured JSON.
Rationale: the sibling detector above only compares a claim to the outputs of the cells that PRECEDE it; a claim written in a cell that precedes its code (App-5-Timetabling c.2/c.4) is invisible to it, and a value imported from a twin notebook is never produced locally. See python scripts/check_stale_claims.py --help.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

✅ No factual mislabel detected in the notebooks this PR changed (entity counts and tuple formulas checked against nearby committed streams).

Scope = notebooks CHANGED in this PR, not the whole corpus. The factual-mislabel-report run artifact holds the structured JSON.
Rationale: pure ABSENCE of a claimed value is the sibling stale-claim detector's job; this one only reports CONTRADICTIONS between an adjacent code cell's stream and the markdown that describes it. See python scripts/check_factual_mislabel.py --help.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Golden-Set Execution (H.7 P3)

✅ 9/9 notebooks passed (certified reproducible)

Notebook Status Time
2.1-Workflow-ML.ipynb ✅ SUCCESS 4.3s
2.2-Descente-de-gradient.ipynb ✅ SUCCESS 4.7s
2.3-Regression-lineaire-logistique.ipynb ✅ SUCCESS 14.0s
2.4-Arbres-Forets-Ensembles.ipynb ✅ SUCCESS 9.2s
Search-01-StateSpace.ipynb ✅ SUCCESS 8.0s
SL-1-LogicalLearning.ipynb ✅ SUCCESS 2.5s
RL-04-Bandits-Manchots-Python.ipynb ✅ SUCCESS 21.4s
GameTheory-04c-NashExistence-Python.ipynb ✅ SUCCESS 5.7s
GameTheory-13d-Optimistic-CFR-Python.ipynb ✅ SUCCESS 15.1s

Pinned lockfile: scripts/notebook_tools/golden_set.lock.txt (H.7 P3, axe A #4208)

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

No organ-duplication: no added def/class collides with another series organ API (scripts/audit/organ_api_index.yaml).

Detector: python scripts/audit/detect_organ_duplication.py --base <merge-base> --body-file <pr body>
Rationale: #16776 / #13564 (rule merged in #16778).

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Notebook outputs-required (H.4 schema): PASS (every code cell carries an outputs: list)

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Notebook PR Validation: PASS

  • Notebooks checked: 1
  • Code cells validated: 8
  • Result: All passed

Checks: H.1 (no errors), H.3 (execution_count), C.1 (no banned patterns)
Non-Python kernels (.NET/Lean): C.1 + errors only (execution_count advisory)
QuantConnect notebooks: C.1 + errors only (require QC Cloud for execution)

@jsboige

jsboige commented Oct 7, 2026

Copy link
Copy Markdown
Owner Author

[ADJOINT PREFLIGHT]
schema: 1
lane: myia-po-2026:CoursIA-3
pr: 19651
head: 74c8538
complete: true
body: read
comments-reviewed: 7
reviews-reviewed: 0
threads-reviewed: 0
threads-unresolved: 0
surfaces-sha256: 9d22163c4fad3a8cdca669b297b9d4ecffce0afdb14805f2da96a9e9ea685135
diff-files: 3
diff-additions: 279
diff-deletions: 2
checks: latest-wins-green
b0: clear
scope: pass
domain: pass
verdict: READY
organ: check_adjoint_prevalidation.py
organ-command: python scripts/check_adjoint_prevalidation.py --derive-verdict 19651
organ-rc: 0
[/ADJOINT PREFLIGHT]

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

G-VAR-2/3 GENRE signals (advisory, non bloquant, #10020).
La lane `myia-po-2025:CoursIA` voit ces signaux actifs sur les mergees du jour (UTC 2026-10-07) :

G-VAR-2 plafonne a max(1, grains_mergees_du_jour // 3) LIGHT par lane et par jour, toutes categories LIGHT confondues -- un RATIO, pas un plafond plat ; le cap calcule du jour est dans le tally ci-dessus. G-VAR-3 interdit deux genres LIGHT consecutifs. Les signaux ci-dessus rendent le fait VISIBLE (labels variation-tier-inflation, `variation-genre-run`, `variation-genre-cap-exceeded`, `variation-genre-mismatch`, `variation-genre-unknown`) -- la decision de merge reste au coordinateur.

@jsboige

jsboige commented Oct 7, 2026

Copy link
Copy Markdown
Owner Author

[ADJOINT PREFLIGHT]
schema: 1
lane: myia-po-2026:CoursIA-3
pr: 19651
head: 74c8538
complete: true
body: read
comments-reviewed: 9
reviews-reviewed: 0
threads-reviewed: 0
threads-unresolved: 0
surfaces-sha256: 0170a54929ca07c5ada43ba3aa9f9cca08f4a0c6705215c45092460d1012efee
diff-files: 3
diff-additions: 279
diff-deletions: 2
checks: latest-wins-green
b0: clear
scope: pass
domain: pass
verdict: READY
organ: check_adjoint_prevalidation.py
organ-command: python scripts/check_adjoint_prevalidation.py --derive-verdict 19651
organ-rc: 0
[/ADJOINT PREFLIGHT]

@myia-ai-01
myia-ai-01 merged commit d05a64f into main Oct 7, 2026
131 of 137 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants