Skip to content
cccskills
FreePublished on GitHub

qc-iterative-improve

Execute iterative improvement workflow for QuantConnect strategies. Arguments: [strategy|issue#] [--iterations=N] [--no-backtest] [--commit]

The English summary is being prepared. Showing the original description.

Works withYahoo Finance
See how to install

Files included (1)

  • SKILL.md10.0 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

QC Iterative Improve Skill

Orchestre l'amelioration iterative des strategies QuantConnect. Methodologie: Research notebook d'abord, implementation ensuite.

Action: $ARGUMENTS

Arguments

ArgumentTypeDefautDescription
strategystring-Nom de la strategie OU numero d'issue GitHub (#17-#29)
--iterationsint3Nombre max d'iterations par strategie
--no-backtestboolfalseSkip les backtests (notebook research seulement)
--commitboolfalseCommit automatiquement les progres

Mapping Issues -> Strategies

IssueStrategieCloud IDSharpePriorite
#17ForexCarry28657908-1.80HIGH
#18VIX-TermStructure28657907-0.97HIGH
#19MeanReversion28657904-0.042HIGH
#27Crypto-MultiCanal(a creer)0HIGH
#20FuturesTrend286578340.019MEDIUM
#21TurnOfMonth286579050.127MEDIUM
#22MomentumStrategy286578370.216MEDIUM
#23AllWeather286578330.25MEDIUM
#24OptionsIncome286578380.288MEDIUM
#25FamaFrench286579100.365MEDIUM
#26Sector-Momentum284336430.554LOW

Tracker global: issue #29

Workflow principal

                    ┌─────────────────────────────────────┐
                    │  /qc-iterative-improve #XX          │
                    └──────────────┬──────────────────────┘
                                   │
                    ┌──────────────▼──────────────────────┐
                    │  1. CONTEXT: Lire issue + code +    │
                    │     backtests + notebook existant    │
                    └──────────────┬──────────────────────┘
                                   │
                    ┌──────────────▼──────────────────────┐
                    │  2. RESEARCH NOTEBOOK                │
                    │  Creer/enrichir research.ipynb       │
                    │  - Analyse exploratoire (QuantBook)  │
                    │  - Hypotheses et tests               │
                    │  - Visualisations                    │
                    │  - Conclusions argumentees           │
                    └──────────────┬──────────────────────┘
                                   │
                    ┌──────────────▼──────────────────────┐
                    │  3. IMPLEMENT                        │
                    │  Appliquer findings dans main.py     │
                    │  (seulement si notebook concluant)   │
                    └──────────────┬──────────────────────┘
                                   │
                    ┌──────────────▼──────────────────────┐
                    │  4. VALIDATE                         │
                    │  Compiler + backtester sur QC cloud  │
                    └──────────────┬──────────────────────┘
                                   │
                    ┌──────────────▼──────────────────────┐
                    │  5. EVALUATE + UPDATE                │
                    │  Comparer metriques, MAJ issue #29   │
                    │  Iterer si necessaire                │
                    └─────────────────────────────────────┘

Phase 0: Lire le backlog (OBLIGATOIRE)

1. Lire projects/_docs/OPTIMIZATION_BACKLOG.md
   - Verifier si la strategie a un plafond confirme -> STOP si oui
   - Lire les hypotheses deja testees et rejetees -> NE PAS retester
   - Appliquer les regles universelles (18 patterns confirmes)

2. A la fin de l'iteration: mettre a jour le backlog avec les nouvelles lecons

Phase 1: Lire le contexte

1. Lire l'issue GitHub (gh issue view #XX)
   - Problemes identifies
   - Travail demande
   - Lecons apprises des sessions precedentes

2. Lire le code cloud actuel
   - MCP: read_file(projectId, "main.py")
   - Local: projects/{Strategy}/main.py

3. Lire les derniers backtests
   - MCP: list_backtests(projectId, includeStatistics=true)
   - MCP: read_backtest(projectId, backtestId) pour le meilleur

4. Verifier si un notebook existe deja
   - projects/{Strategy}/research.ipynb
   - partner-course-quant-trading/examples/{Strategy}/research.ipynb
   - MyIA.AI.Notebooks/QuantConnect/research/{Strategy}-*.ipynb

Phase 2: Research Notebook (COEUR DU WORKFLOW)

Le notebook est l'artefact principal. Il doit etre:

  • Pedagogique: expliquer le raisonnement a chaque etape
  • Reproductible: executable avec QuantBook ou standalone
  • Conclusif: chaque hypothese testee a un verdict clair

Structure recommandee du notebook

Cell 1 (md): # Research: {Strategy Name}
  - Contexte et objectif
  - Performance actuelle et problemes
  - Hypotheses a tester

Cell 2 (code): Setup & Data Loading
  - qb = QuantBook() ou import yfinance
  - Charger les donnees historiques
  - Afficher statistiques de base

Cell 3 (md): ## Analyse Exploratoire
  - Description de ce qu'on va explorer

Cell 4 (code): Analyse exploratoire
  - Distributions, correlations, regimes
  - Visualisations (matplotlib/plotly)

Cell 5-N: Hypotheses et tests
  Pour chaque hypothese:
  - Cell (md): Description de l'hypothese
  - Cell (code): Test de l'hypothese
  - Cell (md): Verdict (CONFIRMEE/INFIRMEE) et impact

Cell N+1 (md): ## Conclusions et Recommendations
  - Resume des findings
  - Configuration recommandee
  - Changements a implementer dans main.py

Cell N+2 (code): Configuration finale
  - Parametres recommandes en format dict/JSON
  - Backtest vectorise simplifie si possible

Deux approches possibles

Approche A: QuantBook (si lean research disponible)

qb = QuantBook()
symbol = qb.add_equity("SPY", Resolution.DAILY).symbol
history = qb.history(symbol, datetime(2015,1,1), datetime.now(), Resolution.DAILY)

Avantage: donnees QC exactes, memes indicateurs que l'algo

Approche B: Standalone (yfinance/pandas)

import yfinance as yf
data = yf.download("SPY", start="2015-01-01", end="2026-01-01")

Avantage: pas besoin de Docker/lean, executable n'importe ou Inconvenient: donnees peuvent differer legerement de QC

Recommandation: Utiliser l'approche B (standalone) pour la recherche, puis valider avec un backtest cloud QC. Plus rapide et plus accessible pedagogiquement.

Phase 3: Implementation

Seulement si le notebook a produit des conclusions claires.

1. Modifier main.py localement en appliquant les findings du notebook
2. MCP: read_file(projectId, "main.py")  -- acquiert le lock
3. MCP: update_file_contents(projectId, "main.py", newContent)

Phase 4: Validation

1. MCP: create_compile(projectId) -> compileId
2. MCP: read_compile(projectId, compileId) -> BuildSuccess?
3. MCP: create_backtest(projectId, compileId, "v{N}")
4. Attendre 60-240s selon type
5. MCP: read_backtest(projectId, backtestId) -> metriques

Phase 5: Evaluation et mise a jour

1. Comparer Sharpe avant/apres
2. Si ameliore: garder, MAJ fichier local + notebook
3. Si degrade: revert
4. MAJ issue GitHub avec le nouveau Sharpe
5. MAJ tracker #29 avec le statut
6. Si --commit: git add + commit

Reprise apres saturation de contexte

Le workflow est concu pour survivre aux redemarrages:

Etat persistant (survit au redemarrage):

  • Issue GitHub (#XX) avec checklist de progression
  • Notebook research.ipynb avec les cellules deja creees
  • Code main.py (local + cloud)
  • Backtests sur le cloud QC

Pour reprendre:

  1. Relancer /qc-iterative-improve #XX
  2. L'agent lit l'issue, le notebook, les backtests
  3. Il identifie ou on en est et continue

Regles critiques

  1. BACKLOG AVANT TOUT - Lire projects/_docs/OPTIMIZATION_BACKLOG.md avant de commencer. Ne pas retester des hypotheses rejetees.
  2. Notebook AVANT code - Ne jamais modifier main.py sans avoir d'abord explore dans le notebook
  3. read_file AVANT update_file_contents - Collaboration lock QC
  4. 1 seul backtest a la fois - Node unique QC
  5. Options = Resolution.MINUTE - Sinon chain vide
  6. Pas de Universe Selection - Trop lent. ETFs fixes
  7. Long-only en bull market - Short = catastrophique
  8. "In Progress..." = bug MCP - Attendre et reessayer
  9. Org perso seulement - Partner org = FREE, pas de backtest API

Sub-Agent

AgentRoleModel
qc-strategy-improverExecute le workflow completsonnet

Output attendu

# QC Improvement Report: {Strategy} (Issue #{N})

**Date**: {timestamp}
**Iterations**: {actual}/{max}
**Resultat**: {SUCCESS|IN_PROGRESS|NO_CHANGE|FAILED}

## Research Notebook
- Chemin: projects/{Strategy}/research.ipynb
- Cellules: {N} ({code}/{md})
- Hypotheses testees: {list}
- Conclusions: {summary}

## Metriques

| Metric | Avant | Apres | Changement |
|--------|-------|-------|------------|
| Sharpe | {X} | {Y} | {delta} |
| CAGR | {X%} | {Y%} | {delta} |
| Max DD | {X%} | {Y%} | {delta} |

## Prochaines etapes
{next_steps pour la prochaine iteration}

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Cycle 30 min du secrétaire vérificateur myia-po-2026:CoursIA-3. Atteste en tiers, du plus ancien au plus récent, les PRs ouvertes sans dossier valide (chaque READY, une fois lu et approuvé par ai-01, est mergé sans attendre son cycle), et fait circuler l'information sur workspace-CoursIA-3.

The English summary is being prepared. Showing the original description.

jsboige/CoursIA16Updated Oct 20, 2026

Analyze a Slidev deck qualitatively — organ reports (structure, composition) + vision AI on rendered PNGs. Arguments: <deck_id> [--slides 1,5,10]

The English summary is being prepared. Showing the original description.

jsboige/CoursIA16Updated Oct 20, 2026

Build or improve Jupyter notebooks iteratively with quality scoring. Arguments: <new|improve|fix> <path> [--topic] [--domain] [--level] [--quality] [--max-iter]

The English summary is being prepared. Showing the original description.

jsboige/CoursIA16Updated Oct 20, 2026

Detect cell-ordering / enchainement problems in Jupyter notebooks (canonical-order slippage, misplaced or forgotten cells). Arguments: [target] [--severity HIGH|MED|LOW] [--json]

The English summary is being prepared. Showing the original description.

jsboige/CoursIA16Updated Oct 20, 2026

Clean up and reorganize markdown in enriched Jupyter notebooks. Arguments: [target] [--dry-run] [--aggressive] [--hierarchy-only]

The English summary is being prepared. Showing the original description.

jsboige/CoursIA16Updated Oct 20, 2026

Cycle de coordination ai-01 (coordinateur UNIQUEMENT — jamais sur un worker). Lit memoire + dashboards + inbox + GitHub, merge les PRs pretes, tranche les design-gates, dispatche des grains par lane, reporte. Arguments: [--dispatch] [--focus <topic>]

The English summary is being prepared. Showing the original description.

jsboige/CoursIA16Updated Oct 20, 2026

See all skills by jsboige

Report a problem with this skill