Walk-Forward Testing and Optimization

Bill, I think you would be fun to hang out with in real life. I mean come on, it's not like I'm an imbecile who needs to be plonked.

:D
 
Quote from Rita:

In the example that you posted, you're getting a better and not a worse test result with WFO. Is this an exception?

Second question, which software do your recommend for WFO? Is there free software that can do that?
It is an exception. The example strategy was selected so that the students could improve their result with every step. Normally a WFO test gives worse results than an in sample test, but this is sometimes different, especially with strategies based on detecting the dominant cycle of the price curve. They improve a lot with relatively frequent parameter adaption. We have some theories as to the reasons, but this would be beyond the scope of this thread.

I believe AmiBroker supports WFO and is relatively cheap. Our Zorro supports WFO of course and is free, but it's currently in beta test and will only be released in summer.
 
Another question, how do you set up the training and test time for WFO? Does this depend on how many cycles you're going to test?
 
No, it depends on the strategy. Some strategies are more profitable with short training periods and frequent parameter adaption, others require long training periods with more data.

Some software tools use cluster analysis for determining the best ratio of training and test period. Normally a ratio like 85:15 or 90:10 works well for most strategies.
 
I have run accross many situations where WFO produces much worse results than IN-OOS optimization and testing.

As a matter of fact, one startegy I tested some years ago worked better with parameters determined when the OOS was eliminated.

This shows that what works is what works and there is not such a thing as a single method that works in trading. IMO WFO is another trick of brokerages to offer some hope to their declining population of system traders.
 
Quote from goodgoing:

As a matter of fact, one startegy I tested some years ago worked better with parameters determined when the OOS was eliminated.
How did you know that this strategy worked better when you eliminated the OOS? Without OOS you can't test it, unless you're using complicated methods like WRC. When eliminating OOS improved the parameter quality, your in sample period was probably too short and didn't contain enough data for parameter determination.
 
Quote from jcl:

Ok, there are some valid arguments but also some misconceptions.

The effects that amount to a difference between testing and trading are well known and based on relatively simple math. WFO is one method to deal with those effects. There are several other methods, but they are more complicated or less effective.

Some years ago, algo developers believed that strategy parameters should be optimized for a long time span and cover as many different market conditions as possible. Then the strategy was considered stable. As it turned out, it was not. Strategies optimized this way tended to become unprofitable in real trading after a remarkably short time.

No matter how many market conditions you want to cover with your parameters, you'll always encounter a completely new market situation in real trading after a while.

You can do a little experiment: Take one of your profitable strategies, and optimize and test it in the traditional way with a simulation period of 4 years, 6 years, and 8 years. You will almost always find that the 4 years test is the best, 6 years is worse, and 8 years is the worst - no matter in which year you start the simulation. This should answer the question about the usefulness of WFO.

What you are saying is that a local fit is better than a global fit. That is true only in the vicinity of your local fit. Draw a best fit line through 10 years of stock data. Then draw another line through the last 6 months of data. Now which one do you think the market will follow better for the next 3 months? Of course the local fit will do better but at the expense that it will stop working earlier too.
 
That's right of course. For almost all strategies, the effectivity maximum lies at the beginning of the OOS period, and decreases afterwards. So you want to keep the strategy as close to this point as possible.

Despite its name, WFO is _not_ an optimization. It's a test. It tests the combination of strategy and optimization process. The test tells you the expected performance of this combination, but also the frequency with which the strategy has to re-adapt its parameters for reproducing the test results in real trading. On the strategies we're using, this frequency is normally in the 10 weeks range.

You're _not_ running the strategy with a WFO generated parameter set. This would not reproduce the WFO test in real trading. Instead, you either have a parameter free system that automatically adapts to the market with a frequency equivalent to the WFO OOS period - that's what Zorro does. Or you have to manually download new price data and run a new parameter optimization every couple of weeks. Both methods keep the strategy at its effectivity maximum.
 
Quote from jcl:

Despite its name, WFO is _not_ an optimization.

I think no matter how much you try you will not convince anyone in this forum. You must try another forum. Maybe there you can achieve your objectives.
 
Quote from intradaybill:

you will not convince anyone in this forum. You must try another forum.
I think not, as I'm meanwhile so familiar with this forum that I can already identify the trolls. At least one. :)
 
Back
Top