Step optimization backtest estimate can disagree with the enumerated grid

オープン 初心者向け
#10,047 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp
領域
backend, testing

調査の方向性

まず StepBaseOptimizationStrategy.Estimate と OptimizationStepParameterEnumerator を確認し、最適化テストスイートにある既存の単体テストを探します。報告された最小値、最大値、ステップ値に対して生成されるパラメーターセットの数と推定値を比較し、回帰アサーションを追加します。推定値が列挙された数と一致し、issue にある浮動小数点の例も含まれていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Problem

StepBaseOptimizationStrategy.Estimate counts a step parameter's values as

(int)Math.Floor((MaxValue - MinValue) / Step.Value) + 1

while OptimizationStepParameterEnumerator walks MinValue + i * Step <= MaxValue. When the inputs are not exactly representable on the grid, the two can disagree, so GetTotalBacktestEstimate reports a different number of backtests from the number that run.

Seen in the cloud: min 0.10000000000000001, max 0.29999999999999999, step 0.050000000000000003 (float noise from the API, fixed separately in the API repo) gives an estimate of 4 values for a 0.1..0.3 / 0.05 parameter. With a second parameter at 5 values, the wizard showed 20 backtests for a 25-backtest grid.

Expected

Estimate returns the same count the enumerator produces for any min / max / step. For example, compute the count the same way the enumerator does, or round the quotient to a tolerance before Floor. Add a unit test with values like the ones above that asserts the estimate equals the number of enumerated parameter sets.

主要言語
C#
スター
22.4k
フォーク
5.4k
平均マージ
1日 22時間
マージ済み PR(30日)
55

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

QuantConnect/Lean のほかの issue

QuantConnect/Lean の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。