TestPeriod

View as Markdown

Definition

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

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

Property Value

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

Syntax

TestPeriod

Examples

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