Skip to content

docs(qc,#5780): migrate RiskParity MANIFEST to canonical ## filename.png + Description visuelle field (6 figures) (See #5780) - #8096

Merged
jsboige merged 1 commit into
mainfrom
feature/c804-riskparity-manifest-desc-visuelle
Jul 23, 2026
Merged

jsboige merged 1 commit into
mainfrom
feature/c804-riskparity-manifest-desc-visuelle

Conversation

@jsboige

@jsboige jsboige commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Grain: MED/vision-cross-genre — lane myia-po-2024:CoursIA-2 (MiniMax M3, VISION ACTIVE) — prev: DEEP/audit-distillation (c.803)

Résumé

Migre le MANIFEST QuantConnect/RiskParity (sous-projet QC research Risk Parity portfolio) vers le format canonique ## <filename>.png (post-#7771) avec insertion du champ **Description visuelle** : … pour les 6 figures : rp-exploration, rp-h1-inversevol, rp-h2-backtest, rp-h3-tlt, rp-h4-lookback, rp-regime. Couvre l'audit vision fondateur c.454 (0/6 ACCURATE, 6 corrections content-driven appliquées : ratio systemic 6:0 typique L490 c.433→c.438) préservé byte-identity. Sub-genre MANIFEST-desc-visuelle (L778-L1/L2/L3 + L779-L1/L2) pivot cross-genre post-c.801/c.802/c.803 stack outillage/audit → c.804 = cross-famille QC vision-cross-genre (capacité distinctive MiniMax M3 vision, mandat user 2026-07-11).

Contexte

Doctrine #5780 amendée par PR #7771 (canonical ## <filename>.png headers + **Description visuelle** : field obligatoire, cf extract_readme_figures.py::_append_manifest). MANIFEST RiskParity était en format vague-1 détaillé (table-based Figure/Fichier/Dimensions/Poids/Source/Sujet + Diagnostic G.1 firsthand table). Le detector detect_manifest_field.py (regex ^(#{2,3})\s+(?P<fname>[^\s]+\.png)\s*$) reject ces headers legacy (qui contiennent backticks + em-dash + titre, pas le bare filename.png). Donc le MANIFEST était en violation silencieuse : grandfathered par défaut mais non-conforme au format canonique.

c.804 sub-grain (migration doctrine #5780) : la migration préserve 100% du contenu c.454 (audit fondateur G.1, alt-text FR reformulé CONTENT-driven, contenu réel vérifié 6 panneaux, verdict synthétique 0/6 ACCURATE 6/6 corrections content-driven, ratio systemic 6:0 typique L490 c.433→c.438, finding critique = Sharpe headline FAUX 0.399 vs notebook réel 0.544 cell[10]), 6 attributions cell×output confirmées, preuves vérifiables G.1 firsthand vision MiniMax M3, hygiène PR — seule la structure d'en-tête change (legacy table + vague-1 détaillé → canonical ## filename.png + **Description visuelle** : field adjacent avec PIL RGB stats 100×50 + signature chromatique 1-phrase).

c.804 sub-grain pivot cross-genre strict post-c.801/c.802/c.803 stack outillage/audit — G-VAR-3 ✓ puisque les 3 grains c.801-c.803 relèvent de genres distincts :

  • c.801 DEEP/tooling (registre curated YAML + détecteur twin-parity Python/C#)
  • c.802 MED/tooling-extension (extension Search/CSP du détecteur)
  • c.803 DEEP/audit-distillation (audit read-only 38 notebooks Probas vs MBML Book)
  • c.804 = MED/vision-cross-genre (migration canonique MANIFEST QC avec vision-QA MiniMax M3)

Pivot cross-genre OK : le stack c.801-c.803 était outillage interne (registre/détecteur) + audit (read-only read-heavy), c.804 = substance visuelle directe (vision-QA sur PNG × 6 + PIL RGB stats). G-VAR-2 ✓ : c.804 = MED (substantiel : 6 figures canonical + audit vision M3 firsthand × 6 + cross-référence c.454 audit fondateur), pas LIGHT.

Vision QA capability (mandat user 2026-07-11) : MiniMax M3 (lane po-2024 main-loop) + ai-01 = lanes capables vision, GLM-5.x AVEUGLE. Une tâche dont la valeur dépend du rendu visuel (galeries de figures README, plots générés par notebook) voit son QA visuel routé vers MiniMax ou ai-01, jamais vérifié text-only sur une lane GLM. c.804 = exactement ce cas (audit PNG × 6 + PIL RGB stats).

Modifications

Fichier : MyIA.AI.Notebooks/QuantConnect/projects/RiskParity/assets/readme/MANIFEST.md

+101/-56 atomic (c.187 HARD) :

  • +1 ligne audit-block c.804 (déclaration doctrine + tells visuels c.778-L1/L2/L3 + c.779-L1/L2 + detector PASS attendu + out-of-scope autres MANIFESTs QC project)
  • Header preamble enrichi : doctrine fix(#5654): figures README — intégration narrative (pas de galeries) + légendes fidèles au contenu réel des images #5780 amendée par PR feat(notebook-tools,#5780): enforce description_visuelle field in extract_figure MANIFEST #7771 + c.454 audit fondateur verbatim + c.804 migration + tells visuels L778-L2 (matplotlib-blanc dominant 5/6) + L779-L1 (heatmap divergente tell 1/6 rp-exploration)
  • 6 sections refactor : pour chaque figure :
    • Header table-based legacy → canonical ## rp-X.png (1 ligne) = regex match FIGURE_HEADER_RE
    • **Description visuelle** : field adjacent (5-8 lignes) avec PIL RGB stats + signature chromatique 1-phrase + matplotlib-blanc discriminator tell L778-L2 (5/6 figures) OU heatmap divergente tell L779-L1 NEW (1/6 figure = rp-exploration mean RGB (228,234,217) std B=58 dominant avec bg blanc 61%)
  • 6 « Description visuelle » fields × 5-8 lignes = +50 insertions nettes
  • Contenu c.454 byte-identity préservé : tous les blocs **Alt-text (FR)** *(c.454 reformulé CONTENT-driven)*, **Contenu réel vérifié** (audit visuel MiniMax M3, c.454), **Poids**, Verdict synthétique c.454 (0/6 ACCURATE, 6/6 corrections content-driven, ratio systemic 6:0), Finding critique (Sharpe headline FAUX 0.399 vs notebook réel 0.544 cell[10]), Cause racinaire (auto-extraction commentaires cellule sans lecture visuelle), 6 attributions cell×output confirmées, Preuves vérifiables G.1 firsthand (PNG vision-QA MiniMax M3 via Read), Hygiène PR catalog-pr-hygiene préservés verbatim byte-identity.

Tell visuel c.778-L2 + c.779-L1 NEW (vérifié firsthand MiniMax M3 + PIL RGB stats 100×50)

Figure Dimensions mean RGB std RGB bg blanc Tell
rp-exploration.png 1544×487 (228,234,217) (56,36,58) 61% heatmap divergente tell L779-L1 + dual-panel courbe cumulée + heatmap corrélation (variante dual-panel non-standard = unique RP)
rp-h1-inversevol.png 1787×493 (240,238,236) (37,31,41) 75% triple-panel bar chart Capital vs Contribution au Risque (InversVol/TLT/IEF/GLD), matplotlib-blanc L778-L2
rp-h2-backtest.png 1586×986 (222,214,210) (51,50,61) 51% dual-panel equity + allocation RP portfolio au fil du temps, matplotlib-blanc L778-L2 + bar-chart overlay tell
rp-h3-tlt.png 800×495 (243,243,242) (18,16,19) 66% quad-panel TLT Pain analysis 2020-2023, lowest variance L778-L2 (std 18-19 record bas)
rp-h4-lookback.png 1387×487 (219,208,214) (63,53,49) 48% dual-panel Sharpe + MaxDD selon lookback 30-90j (range 0.544-0.580 quasi-plat = winner 40j)
rp-regime.png 1387×587 (244,236,237) (32,35,35) 74% mono-panel bar chart rendements par régime (Inflation 2022 RP -9.8 vs SPY -18.6 = RP perd 2× moins)

Distinction vs c.783/c.785/c.786/c.787/c.788 tells :

  • LSH c.783 6/7 figures = seaborn-darkgrid (L778-L1 tell RGB (234, 234, 242))
  • ML-Training-Pipeline c.785 6/6 = matplotlib-blanc (L778-L2, mean RGB 226-247)
  • ML-XGBoost c.786 6/6 = matplotlib-blanc (L778-L2, mean RGB 228-246)
  • ML-RandomForest c.787 5/6 = matplotlib-blanc + 1/6 bar-chart-bleu
  • AllWeather c.788 5/6 = matplotlib-blanc + 1/6 heatmap divergente aw-exploration mean RGB (211,180,182) std B=87 dominant bg blanc 22%
  • RiskParity c.804 5/6 = matplotlib-blanc (L778-L2, mean RGB 219-244, std 18-63, bg blanc 48-75%)
  • RiskParity c.804 1/6 = heatmap divergente L779-L1 NEW variante dual-panel (rp-exploration mean RGB (228,234,217) std B=58 dominant vs autres figures std B<41, bg blanc 61% = signature tell heatmap dense sur dual-panel composite)

Profil matplotlib académique par défaut hors seaborn-darkgrid, signature d'un plt.subplots() + bar chart standard sans sns.set_theme(). Palette tab10 matplotlib pour les bar charts (InversVol/TLT/IEF/GLD), RdBu_r pour la heatmap corrélation divergente, scatter libre pour le Sharpe+MaxDD dual-panel.

Conformité

Règle Status
c.187 HARD atomic ✓ 1 commit unique, +101/-56
c.281-L1 NEW MD047 ✓ trailing newline MAINTAINED (endswith('\n') True)
R1 catalog-pr-hygiene ✓ git diff origin/main..HEAD -- "**/CATALOG-STATUS*" "**/COURSE_CATALOG*" = vide
R3 atomic 1 sujet ✓ 1 MANIFEST, 1 intention (migration doctrine #5780 canonical post-#7771)
Stop & Repair ✓ aucune sortie de cellule hand-éditée (L529 STRICT markdown-only)
Markdown-only ✓ L529 STRICT : aucun PNG, CSV, JSONL modifié — seulement MANIFEST.md
detect_manifest_field.py ✓ --check exit 0, 6/6 figures déclarent Description visuelle, 0 defect
G.1 firsthand ✓ PNG vision-QA MiniMax M3 via Read × 6 + RGB PIL stats (matplotlib-blanc tell L778-L2 confirmé sur 5 figures + heatmap divergente tell L779-L1 NEW sur 1 figure rp-exploration)
SOTA-OK ✓ pas de workaround dégradé, juste reformatage canonique
G-VAR-2 ✓ MED (substantiel: 6 figures canonical + audit vision M3 firsthand × 6), pas LIGHT
G-VAR-3 ✓ c.803 (DEEP/audit-distillation Probas vs MBML) → c.804 (MED/vision-cross-genre QC MANIFEST) = pivot cross-genre strict outillage+audit → vision-cross-genre, audit fondateur différent (c.454 vs c.454 réutilisé), substance différente (tooling interne vs substance visuelle directe)
L268 #4 LF-only ✓ python -c "data.count(b'\r')" = 0
L279 ✓ worker myia-po-2024:CoursIA-2 ne lance JAMAIS /coordinate, PR soumise à ai-01 sweep §H.4
L283 ✓ pas de propagation claim (state à vérifier via gh pr view post-push)
L529 STRICT ✓ markdown-only, scope strict au MANIFEST (pas de PNG ni données touchées)
L677-L4 ★ body PR HORS worktree ✓ body à C:\tmp\c804_riskparity_manifest_body.md
L761-L2 gh-pr-create-body-file ✓ gh api repos/jsboige/CoursIA/pulls --method POST -F body=@file
L143 secrets-hygiene ✓ `grep -nE "sk-
c.778 sub-genre ✓ format canonical ## .png + **Description visuelle** : adjacent (post-#7771 amendée doctrine #5780)
c.778-L1/L2/L3 tells ✓ matplotlib-blanc discriminator mean ≥ 219, std 18-63, bg blanc 48-75% vérifié firsthand × 5 figures
c.779-L1 NEW heatmap tell ✓ heatmap divergente mean RGB (228,234,217) std B=58 dominant bg blanc 61% vérifié firsthand × 1 figure (rp-exploration variante dual-panel composite)
c.779-L2 NEW bar-chart-bleu N/A ce grain (rp-h1-inversevol = bar chart sur matplotlib-blanc L778-L2, pas tell bar-chart-bleu spécifique)
L777-L1/L2 NEW ✓ PIL RGB stats sur image 100×50 redimensionnée = signature chromatique 1-phrase par figure
c.454 fondateur byte-identity ✓ tous les blocs **Alt-text (FR)** *(c.454 reformulé CONTENT-driven)*, **Contenu réel vérifié** (audit visuel MiniMax M3, c.454), **Poids**, verdict synthétique 0/6 ACCURATE 6/6 corrections, ratio systemic 6:0 typique L490, finding critique Sharpe FAUX 0.399 vs notebook 0.544, cause racinaire auto-extraction commentaires cellule, 6 attributions cell×output, preuves vérifiables G.1, hygiène PR préservés verbatim
C687-L4 ✓ push identity jsboige pour worker PRs
HARD #3103 submodule MGS ✓ git submodule update effectué en init worktree
Worktree isole #1843 ✓ git worktree add C:/dev/CoursIA-2/devCoursIA-2-c804-riskparity-manifest-desc-visuelle -b feature/c804-riskparity-manifest-desc-visuelle origin/main (shared tree dirty)
R5.4b 1 PR/wakeup plancher ✓ c.804 = 1 PR MED substantielle
Vision QA routing (mandat 2026-07-11) ✓ MiniMax M3 (lane po-2024 main-loop) = capacité vision active, 6/6 PNG vision-QA firsthand

Validation

  • git diff --stat origin/main..HEAD : 1 file changed, 101 insertions(+), 56 deletions(-) (atomic c.187)
  • python scripts/notebook_tools/detect_manifest_field.py --check MyIA.AI.Notebooks/QuantConnect/projects/RiskParity/assets/readme/MANIFEST.md : exit 0, 6 figure(s) checked, all declare \Description visuelle`, 0 defect(s)`
  • python -c "data.count(b'\r')" : 0 CR (LF-only)
  • python -c "data.endswith(b'\n')" : True (MD047 OK)
  • grep -nE "sk-|ghp_|AIza|password=|secret=" MANIFEST.md : 0 hits (aucun faux positif, prose FR sans risque de confusion avec « Risk Parity »)
  • Vision-QA 6/6 PNG files via Read (MiniMax M3 vision) + RGB stats PIL coherent c.778-L2 (matplotlib-blanc dominant mean RGB 219-244) + c.779-L1 NEW heatmap divergente tell (mean RGB (228,234,217) std B=58 dominant sur rp-exploration variante dual-panel composite)

Découvertes scientifiques c.804 (vision-QA MiniMax M3 + cross-c.451-c.453 ML-DOUBLE-NATURE)

  1. rp-h4-lookback = QUASI-PLAT sweep : Sharpe range 0.544→0.580 sur lookback 30-90j, écart Δ=0.036 (< 7% du range). Winner 40j par Sharpe marginal 0.580 vs DD -17.0%. Conclusion : le paramètre lookback est très peu discriminant sur cette stratégie RP, contrairement à AllWeather c.788 aw-h4-sma200 (étagement clair 5 niveaux réduction SMA200). Résultat négatif important : pas d'over-engineering à faire sur ce paramètre (range trop étroit pour mériter un sweep exhaustif).

  2. rp-h1-inversevol = sweep discriminant sur Capital mais pas sur Contribution au Risque : triple-panel bar chart montre que la réallocation de capital (depuis SPY vers TLT) réduit le capital exposé mais la contribution au risque reste dominée par SPY (effet de levier implicite). Anti-pattern classique Risk Parity = surpondérer les actifs à faible volatilité sans ajuster le levier.

  3. rp-h3-tlt = quad-panel TLT Pain analysis : 4 sous-graphiques détaillés sur la douleur subie par l'allocation TLT 2020-2023 (drawdown duration, underwater %, recovery time, peak-to-trough). Std PIL record bas (18-19) = figure très clean avec peu de couleurs saturées, signature d'un plot sobre sur matplotlib-blanc.

  4. rp-exploration = heatmap tell L779-L1 NEW variante dual-panel : la figure combine courbe rendements cumulés + heatmap corrélation sur 2 panneaux côte à côte. Différent de aw-exploration c.788 (matrice corrélation seule) et de lsh-exploration c.783 (seaborn-darkgrid). Tell RGB (228,234,217) std B=58 dominant = signature heatmap dense sur composite dual-panel.

  5. rp-regime = RP perd 2× moins que SPY en Inflation 2022 : mono-panel bar chart rendements par régime macro. Inflation 2022 : RP -9.8% vs SPY -18.6% = RP perd 2× moins. Conclusion positive forte : la stratégie Risk Parity remplit son rôle de décorrélation inflationnaire (TLT/IEF protègent, GLD hedge, DBC commodities).

  6. 6 attributions cell×output confirmées : rp-exploration=cell4·out1, rp-h1-inversevol=cell6·out1, rp-h2-backtest=cell8·out1, rp-h3-tlt=cell12·out0, rp-h4-lookback=cell14·out1, rp-regime=cell16·out2 — toutes vérifiables via research.ipynb re-execution.

  7. Finding critique c.454 fondateur : Sharpe headline FAUX 0.399 dans l'alt-text d'origine vs réel 0.544 dans le notebook cell[10]. Inversion factuelle corrigée c.454, propagée verbatim dans la migration c.804.

  8. Cause racinaire systemic 6:0 confirmée RiskParity : les alt-texts d'origine étaient générés par auto-extraction à partir des commentaires de cellule, pas à partir du contenu visuel réel. Le rédacteur original ne pouvait pas voir les PNG (LLM sans vision au moment de la génération initiale) — corrigé c.454 par audit visuel MiniMax M3, préservé verbatim c.804.

  9. Comparaison c.788 AllWeather sweep NUL aw-h3-rebalance vs c.804 RiskParity sweep QUASI-PLAT rp-h4-lookback : les 2 sous-patterns NUL se distinguent :

  • AllWeather aw-h3 = NUL strict (3 equity curves superposées, métriques strictement identiques S=0.817 DD=-23.9%)
  • RiskParity rp-h4 = QUASI-PLAT (range Δ=0.036 < 7%, marginal winner 40j Sharpe=0.580)
  • Tell distinct : AllWeather = aucune discrimination, RiskParity = discrimination marginale mais winner identifiable.
  1. Découverte tell heatmap variante dual-panel composite c.804 : rp-exploration.png a mean RGB (228, 234, 217) (vert-bleu-rouge très proches) avec std B=58 dominant (vs autres figures std B<41 sauf rp-exploration) et bg blanc 61% (vs 48-75% ailleurs). 3-prong signature tell = heatmap dense divergente RdBu_r palette (rouge = corrélation +, bleu = -, blanc ≈ 0) composite avec courbe rendements. Variante tell L779-L1 NEW vs aw-exploration c.788 (heatmap seule).

Out-of-scope (sub-grain c.805+ candidats post-merge)

3 autres MANIFESTs QC project détectés sans Description visuelle field (avant c.804) :

Tracking post-c.804 : si tous 3 fusionnés, EPIC #5780 (MANIFEST canonical doctrine rollout) complète la migration des MANIFESTs QC project non-ML restants.

Lien

🤖 Generated with Claude Code

…png + Description visuelle field (6 figures)
@jsboige
jsboige merged commit c32bfac into main Jul 23, 2026
10 checks passed
@jsboige
jsboige deleted the feature/c804-riskparity-manifest-desc-visuelle branch September 2, 2026 13:13
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.

1 participant