How to Verify Walk-Forward Optimization (WFO) Results

From MultiCharts
Revision as of 12:06, 27 April 2017 by Abeloglazova (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

In most cases it is not a simple task - to verify WFO results by simply backtesting your strategy on a chart matching a specific OOS period from WFO report. The following aspects should be taken into account:

  • Starting points of strategy calculation (not the starting points of data) should be the same between chosen OOS period and backtested chart.
  • Sometimes script must be modified for backtesting in order to reach the previous goal.
  • All other chart and strategy settings should be identical (chart resolution, strategy inputs, IOG, BM, strategy properties, etc...)
  • If there is an open trade by the end of OOS period, it is not counted in report.

The following steps should be taken in order to check WFO results:

  1. Create a chart. Apply your strategy. Perform Walk-Forward optimization. From the report choose any particular OOS period (its start and end dates).
  2. Close the WFO report. Open the Strategy Properties window to check what is the Maximum number of bars a study will reference (MaxBarsBack).
  3. Go back to chart and find the start date (1 day chart is the easiest way to test). Now you will need to find out what would be the OOS start date – MaxBarsBack.
    Example: MaxBarsBack was set to 50, so the start date bar for a 1 day chart to backtest the same period should have bar number 51.
  4. Change the data range settings of the new chart to have the first bar = the OOS start date – MaxBarsBack; and the end date = OOS end date.
    Example: MaxBarsBack was set to 50, so if the start date of a 1 day OOS is 1 of June, you should go 50 working days prior to 1st of June for the new chart data range setting to backtest the same period.
  5. Apply the inputs for the OOS period from WFO report to strategy on this adjusted chart.
  6. Call Strategy Performance report and you will see the results match the respective OOS results from WFO report.
  7. Note:If chart is range-based/tick-based/intraday data-based, script modification will be required to do what is described in point 4.