How to Verify Walk-Forward Optimization (WFO) Results ?  [SOLVED]

Questions about MultiCharts and user contributed studies.
wilkinsw
Posts: 662
Joined: 21 Apr 2013
Has thanked: 154 times
Been thanked: 104 times

How to Verify Walk-Forward Optimization (WFO) Results ?

Postby wilkinsw » 27 Aug 2014

Hi MC,

I understand from reading other posts that the MC WFO is not a flawless tool and that there are issues that might need development.

However my question surrounds a better understanding of the Wiki page:
http://www.multicharts.com/trading-soft ... 29_Results
The following steps should be taken in order to check WFO results:

Create a chart. Apply your strategy. Perform Walk-Forward optimization. From the report choose any particular OOS period (its start and end dates).
Close the WFO report. Open the Strategy Properties window to check what is the Maximum number of bars a study will reference (MaxBarsBack).
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.
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.
Apply the inputs for the OOS period from WFO report to strategy on this adjusted chart.</div>
Call Strategy Performance report and you will see the results match the respective OOS results from WFO report.
Note:If chart is range-based/tick-based/intraday data-based, script modification will be required to do what is described in point 4.
Firstly I'm confused. I've read posts saying that a strategy can only reference the OOS price data during a WFO. In other words, OOS start date + Maxbarsback = the first strategy trade. So there is a chunk of wasted bars at the start of the OOS? Is that right or have I got the wrong end of the stick? Or in a WFO, is the maxbarsback runin done prior to the OOS window?

Secondly.
Note:If chart is range-based/tick-based/intraday data-based, script modification will be required to do what is described in point 4
. What sort of modification are we talking about? And what sort of modification for intraday strategies?

Many thanks.

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: How to Verify Walk-Forward Optimization (WFO) Results ?

Postby Andrew MultiCharts » 29 Aug 2014

Hello wilkinsw,
Firstly I'm confused. I've read posts saying that a strategy can only reference the OOS price data during a WFO. In other words, OOS start date + Maxbarsback = the first strategy trade. So there is a chunk of wasted bars at the start of the OOS? Is that right or have I got the wrong end of the stick? Or in a WFO, is the maxbarsback runin done prior to the OOS window?
The following picture should answer your question:

Image
Secondly. What sort of modification are we talking about? And what sort of modification for intraday strategies?
You will need to manually calculate the first bar (its date and time), where the strategy starts working in OOS period and in the code of your strategy create a date/time-based condition to start calculation at the same bar in backtesting.

wilkinsw
Posts: 662
Joined: 21 Apr 2013
Has thanked: 154 times
Been thanked: 104 times

Re: How to Verify Walk-Forward Optimization (WFO) Results ?

Postby wilkinsw » 29 Aug 2014

Thanks Andrew.

I'm probably sounding thick here but, the red mbb section for the OOS window where does that lie? Is it at the end of the IS window or the start of the OOS window?

Thanks again.

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: How to Verify Walk-Forward Optimization (WFO) Results ?  [SOLVED]

Postby Andrew MultiCharts » 29 Aug 2014

I'm probably sounding thick here but, the red mbb section for the OOS window where does that lie? Is it at the end of the IS window or the start of the OOS window?
The red mbb is the part of the end of previous IS, but it is mbb related to the next OOS.

Image

VS.

Image

wilkinsw
Posts: 662
Joined: 21 Apr 2013
Has thanked: 154 times
Been thanked: 104 times

Re: How to Verify Walk-Forward Optimization (WFO) Results ?

Postby wilkinsw » 29 Aug 2014

Nice graphic. Thanks!


Return to “MultiCharts”