Post-backtest robustness sections for Report (Monte Carlo, parameter sensitivity, regime classification)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia con Report e Report/template.html, quindi esamina l’infrastruttura di ottimizzazione esistente attorno a OptimizationParameter e ParameterSet. Chiarisci se Monte Carlo, la sensibilità dei parametri e la classificazione dei regimi debbano essere sezioni separate attivabili opzionalmente oppure una modifica incrementale. Il lavoro sarà considerato completato quando le sezioni concordate saranno implementate con comportamento opt-in, test unitari completi e un algoritmo di regressione come descritto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Expected Behavior
Feature request, not a bug — mapping to the template below.
Lean's Report should offer built-in robustness checks that answer "how much can I trust this backtest result?" Specifically, three opt-in post-backtest sections:
- Monte Carlo — resample the trade sequence to produce confidence bands (5th/50th/95th percentile) for CAGR, max drawdown, and Sharpe.
- Parameter sensitivity — re-run the backtest with perturbed parameters (±5/10/20%) and report the sensitivity envelope.
- Dynamic regime classification — partition returns into bull/bear/sideways/high-vol/low-vol regimes and report per-regime performance.
Actual Behavior
Report currently provides descriptive statistics only (Sharpe, Sortino, drawdown, PSR, hardcoded crisis events, rolling metrics). There is no built-in way to test whether a result is robust to trade ordering, parameter perturbation, or market regime.
Potential Solution
Monte Carlo and regime classification run purely post-backtest on the existing trade log and equity curve — no engine changes, opt-in via config, new sections in Report/template.html. Parameter sensitivity is heavier (it re-runs backtests) and could reuse the existing optimization infrastructure (OptimizationParameter, ParameterSet) or a lighter standalone wrapper.
Asking for design direction before I start: would you accept these, and as one PR or landed separately? My suggestion is to ship Monte Carlo first as a standalone, lowest-risk PR, then discuss the other two.
I'll implement with full unit tests and a regression algorithm.
Prior art: quantstrat (R) has trade-return Monte Carlo; Backtrader has had community MC requests for years with no implementation; Zipline and Freqtrade have none. vectorbt offers resampling and parameter sweeps, so it isn't unprecedented in Python — but it isn't standard.
Checklist
- I have completely filled out this template
- I have confirmed that this issue exists on the current
masterbranch - I have confirmed that this is not a duplicate issue by searching issues
- Lingua principale
- C#
- Stelle
- 22k
- Fork
- 5.3k
- Merge medio
- 1g 6h
- PR unite (30g)
- 48
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di QuantConnect/Lean
-
WebullFeeModel charges SPXW options the SPX exchange feeForse già presa @Amadeus-22 l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
QuantConnect/Lean#9922 ·
I maintainer di solito rispondono entro 1 giorno
-
TradeStationBrokerageModel rejects extended-hours limit orders on equity optionsForse già presa @AlexCatarino l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
QuantConnect/Lean#9920 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
AlpacaBrokerageModel refuses extended-hours limit orders with the GTC time in force, which Alpaca acceptsForse già presa @AlexCatarino l’ha presa 8 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
QuantConnect/Lean#9892 ·
I maintainer di solito rispondono entro 1 giorno
-
library-request
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
QuantConnect/Lean#9879 ·
I maintainer di solito rispondono entro 1 giorno
-
[Library Upgrade] autogluonApertalibrary-request
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
QuantConnect/Lean#9743 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di QuantConnect/Lean
Issue simili
-
The test-platform skill doesn't say what three of its failures look likeForse già presa @yasmoradi l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
bitfoundation/bitplatform#14022 ·
I maintainer di solito rispondono entro 1 giorno
-
area-TableView bug needs-triage team-Controls
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
microsoft/microsoft-ui-xaml#12351 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
AudioClient and ImageClient file path overloads send the full local path as the multipart file nameForse già presa @sebxt l’ha presa oggi. Apertaarea: audio area: images feature-request
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
openai/openai-dotnet#1453 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 1 giorno
-
Runtime diagnostics settings report canManage=true for every callerForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaneeds-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
elsa-workflows/elsa-foundation#3130 ·
I maintainer di solito rispondono entro 1 giorno