Step optimization backtest estimate can disagree with the enumerated grid

Aperta Adatta ai principianti
#10,047 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
backend, testing

Direzione di ricerca

Inizia con StepBaseOptimizationStrategy.Estimate e OptimizationStepParameterEnumerator, poi individua i relativi test unitari esistenti nella suite di test dell’ottimizzazione. Confronta la stima con il numero di insiemi di parametri prodotti per i valori di minimo, massimo e passo segnalati, quindi aggiungi l’asserzione di regressione. Il lavoro è completato quando la stima corrisponde al numero enumerato, compreso l’esempio in virgola mobile nell’issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C#
Stelle
22.4k
Fork
5.4k
Merge medio
1g 22h
PR unite (30g)
55

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di QuantConnect/Lean

Tutte le issue di QuantConnect/Lean

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.