Changes

Jump to navigation Jump to search

Walk Forward Optimization

788 bytes added, 17:37, 24 October 2018
Walk Forward Optimization is an optimization process that addresses the issue of curve fitting in strategy development.  Walk Forward Optimization segregates the data series into multiple segments, and each segment is divided into an in-sample (IS) portion and an out-of-sample (OOS) portion.
Parameter optimization for the strategy is performed using the IS portion of the first segment. The same parameters are then used to back test the strategy on the OOS portion of the same segment. The process is repeated for the remaining segments.
The OOS performance results from each of the segments are considered "real" instead of "curve-fit" because the parameters that produced the OOS results were generated from IS data.
<br>== Walk Forward Optimization (not anchored) ==
Suppose a data series has 220 bars, and it is divided into five segments of 100 bars per segment.
!width="25%"|OOS
|-
|Segment 1
|align="center"|1-70
|align="center"|71-100
|align="center"|100
|-
|Segment 2
|align="center"|31-100
|align="center"|101-130
|align="center"|100
|-
|Segment 3
|align="center"|61-130
|align="center"|131-160
|align="center"|100
|-
|Segment 4
|align="center"|91-160
|align="center"|161-190
|align="center"|100
|-
|Segment 5
|align="center"|121-190
|align="center"|191-220
Step&nbsp;5: Parameter optimization is performed using Segment 5's IS data. These parameters are then used to back test the strategy on Segment 5's OOS data.
The walk forward optimization is complete.  There are OOS performance results for bars 71-220. Walk Forward Optimization considers the OOS performance results “real” "real" instead of “curve"curve-fit” fit" because the parameters that produced the OOS results were generated from IS data.
As shown, the starting point of each subsequent segment begins 30 bars after the starting point of the previous segment. The starting point of each segment steps forward. Hence, this type of walk forward optimization is said to be not anchored. The reason the step is 30 bars is because that’s that's the length of the OOS portion.
<div style="background-color: #E3FBE5;">Note: The significance of OOS results from Walk Forward Optimization is debatable. For more information, please see additional literature about this subject.</div>
 
[[File:Wfoptimization1.png]] [[File:Wfoptimization2.png]]
<br>
 
== Walk Forward Optimization (anchored) ==
!width="25%"|OOS
|-
|Segment 1
|align="center"|1-70
|align="center"|71-100
|align="center"|100
|-
|Segment 2
|align="center"|1-100
|align="center"|101-130
|align="center"|130
|-
|Segment 3
|align="center"|1-130
|align="center"|131-160
|align="center"|160
|-
|Segment 4
|align="center"|1-160
|align="center"|161-190
|align="center"|190
|-
|Segment 5
|align="center"|1-190
|align="center"|191-220
== Using Walk Forward Optimization ==
To use Walk forward Forward Optimization:
# :1. Open the '''Format Objects''' window.<br><span>{{FormatObjectIS}}</span># :2. Select the '''Signals''' tab and select the signal in the box.# :3. Click the '''Optimize''' button. The '''Select Optimization MethodSettings''' box window will appear.# :4. Select either the optimizable inputs and optimization method – exhaustive or genetic (both will work with '''ExhaustiveWalk Forward Optimization''' or .) Please refer to [[Performing_Optimization]] for more information. :5. Click '''GeneticNext''' radio button for , and the type of optimization. (Both will work with '''Set Walk-Forward Parameters''' section will appear.:6. There are two possible types of segmentation for Walk -Forward Optimization: by number of runs and by time span. Select the desired one in the '''Segments Type''' section.:7. If '''Number of Runs''' is selected:<br>Enter the number of runs into the '''Number of Runs:''' textbox.)# Select <br>Enter the percentage number for the OOS portion of a segment into the '''Walk ForwardOOS, % of first Run:''' textbox.<br>When '''Number of Runs''' check boxis selected, the segmentation is always performed according to bars.:8.If '''Time Span''' is selected:<br># Enter the number of bars/days for the IS portion of a segment into the '''IS''' textbox.<br># Enter the number of bars/days for the OOS portion of a segment into the '''OOS''' textbox.The number can be expressed as a percentage, if '''% of the first Run''' is selected in the next dropdown list, or in bars/days, if '''same as IS''' is selected there. # :9. Check the '''Anchored''' checkbox to use anchoring. Uncheck the '''Anchored''' checkbox to not use anchoring.# :10. Click the '''OKNext''' button.# Select the '''Optimizable Inputs''' tab:11. Input start and end values for In the inputs.# If performing an''' ExhaustiveSet Robustness Settings''' optimization, select section set up the criteria according to which the '''Optimization Criteria''' tab and complete inputs. <br>If performing a '''Genetic''' optimization, select robustness of the '''Algorithm-specific Properties''' tab and complete inputsstrategy will be estimated.<br>For more information, see about Strategy Robustness click on [[<span style="colorhttps: red;">//www.multicharts.com/trading-software/index.php/Strategy_Robustness '''LINKWhat is Robustness?'''</span>0280_Backtesting/22-9002_RunningOpt] link.html name="1"; |Performing Optimization]]# :12. Click the '''OKAnalyze N Combinations''' buttonto run Walk-Forward Analysis and generate the Walk-Forward Optimization Report.
<br>
 
[[Category:Optimization]]

Navigation menu