Post-backtest robustness sections for Report (Monte Carlo, parameter sensitivity, regime classification)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Report と Report/template.html から始め、その後、OptimizationParameter と ParameterSet 周辺の既存の最適化インフラストラクチャを調査してください。Monte Carlo、パラメータ感度、レジーム分類を個別のオプトインセクションにするべきか、段階的な変更にするべきかを明確にしてください。合意されたセクションがオプトイン動作、完全なユニットテスト、および説明どおりの回帰アルゴリズムを伴って実装されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- C#
- スター
- 22k
- フォーク
- 5.3k
- 平均マージ
- 1日 6時間
- マージ済み PR(30日)
- 48
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
QuantConnect/Lean のほかの issue
-
WebullFeeModel charges SPXW options the SPX exchange fee対応中かも @Amadeus-22 が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
QuantConnect/Lean#9922 ·
メンテナーはふだん 1 日以内に返信
-
TradeStationBrokerageModel rejects extended-hours limit orders on equity options対応中かも @AlexCatarino が 1 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
QuantConnect/Lean#9920 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
AlpacaBrokerageModel refuses extended-hours limit orders with the GTC time in force, which Alpaca accepts対応中かも @AlexCatarino が 9 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
QuantConnect/Lean#9892 ·
メンテナーはふだん 1 日以内に返信
-
library-request
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
QuantConnect/Lean#9879 ·
メンテナーはふだん 1 日以内に返信
-
library-request
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
QuantConnect/Lean#9743 ·
メンテナーはふだん 1 日以内に返信
QuantConnect/Lean の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
KnifeLemon/Filee#363 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
area-Native untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
dotnet/machinelearning#7837 ·
メンテナーはふだん 2 日以内に返信