OptimizationPeriod

View as Markdown

Definition

Reserved for Walk-Forward Optimization, this property determines the number of days used for the “in sample” backtest period for a given strategy. See also TestPeriod.

This property should ONLY be called from the OnStateChange() method during State.SetDefaults.

Property Value

An int value representing the number of “in sample” days used for walk-forward optimization; Default value is set to 10.

Syntax

OptimizationPeriod

Examples

1protected override void OnStateChange()
2{
3 if (State == State.SetDefaults)
4 {
5 //set the default optimization period to 20 days for WFOs
6 OptimizationPeriod = 20;
7 }
8}