WalkForwardWindow
StockSharp.Algo.Strategies.Optimization
One step of a walk-forward run: a stretch the parameters are fitted on, and the stretch right after it they are tested on.
Implements: IEquatable<WalkForwardWindow>
Constructors
WalkForwardWindow
public WalkForwardWindow(DateTime InSampleFrom, DateTime InSampleTo, DateTime OutOfSampleFrom, DateTime OutOfSampleTo)
walkForwardWindow = WalkForwardWindow(InSampleFrom, InSampleTo, OutOfSampleFrom, OutOfSampleTo)
One step of a walk-forward run: a stretch the parameters are fitted on, and the stretch right after it they are tested on.
- InSampleFrom
- Start of the stretch the parameters are fitted on.
- InSampleTo
- End of the stretch the parameters are fitted on.
- OutOfSampleFrom
- Start of the stretch the fitted parameters are tested on.
- OutOfSampleTo
- End of the stretch the fitted parameters are tested on.
Properties
InSampleFrom
public DateTime InSampleFrom { get; set; }
value = walkForwardWindow.InSampleFrom
walkForwardWindow.InSampleFrom = value
Start of the stretch the parameters are fitted on.
InSampleTo
public DateTime InSampleTo { get; set; }
value = walkForwardWindow.InSampleTo
walkForwardWindow.InSampleTo = value
End of the stretch the parameters are fitted on.
OutOfSampleFrom
public DateTime OutOfSampleFrom { get; set; }
value = walkForwardWindow.OutOfSampleFrom
walkForwardWindow.OutOfSampleFrom = value
Start of the stretch the fitted parameters are tested on.
OutOfSampleTo
public DateTime OutOfSampleTo { get; set; }
value = walkForwardWindow.OutOfSampleTo
walkForwardWindow.OutOfSampleTo = value
End of the stretch the fitted parameters are tested on.
Methods
Split
public static IReadOnlyList<WalkForwardWindow> Split(DateTime from, DateTime to, TimeSpan inSample, TimeSpan outOfSample)
result = WalkForwardWindow.Split(from, to, inSample, outOfSample)
Cuts a range into consecutive windows that step forward by the out-of-sample length.
- from
- Start of the range.
- to
- End of the range.
- inSample
- Length of the stretch each window is fitted on.
- outOfSample
- Length of the stretch each window is tested on, and the step between windows.
Returns: The windows, oldest first; none when the range is shorter than one window.