Tuesday, 17 January 2012

Walk Forward Optimization

WFO analysis is the key to back testing both for discretionary and fully automated trading. I want to pick up on what I was saying in yesterday's post and am reprinting what I have said to my FloBot Workshop guys.

Autotrading requires a template of activity and my previous post tried to provide that. 

All algos need “tuning” to the current market volatility. The shorter the periodicity timeframe, the more often reoptimization is needed. For example, an algo using daily data may need reoptimizing once a year while an algo using 1 minute data may need optimizing every few days. Using range bars improves the situation because there is less noise. Everything is curve fitting to a degree. Maybe not real curve fitting but fitting the algo to what I am trading. Curve fitting is when the tailor creates a made to measure suit that only fits one man until he eats a little too much and gets fatter. It then fits no one. What I do is not like that.

How often do I need to reoptimise? The Walk Forward Optimization analysis tells me that. The biggy is, what and how to optimise so as not to curve fit. The answer is that the basic entry picture remains locked to the big picture and only exit criteria are optimised so as to keep with the current market volatility. In maintaining synch with the current market, there are two issues in the reoptimization: how much historical data to use in the IS and how much OOS to look at. As I said in the post, IS can be 28, 21, 14 or even 7 days with a 7 day OOS. I repeat this every 7 days if that is what the WFO analysis shows I should do. Every 3 or 6 months, I do a major reoptimization to check that nothing much has changed. The WFO analysis is a critical part of the autotrading regimen. It’s not just a design process. It’s part of the trading procedures.

I wouldn’t use more than 4 to 6 months of data for doing the initial optimizations as the markets are changing too much with both the way news is released, rumours, economic situation and HFT activity. Using very old data is counter-productive.

Finally, you need realistic expectations with autotrading. You can’t expect to be profitable every day. The WFO analysis provides a pattern and statistics and what my expectation is that, if I have done the analysis of the WFO correctly, my trading pattern going forward will be similar. My yardstick for profitability and drawdowns is based on monthly achievements, not daily ones.

So there are two issues in the training: 
1.   Creating an algo that can be robust in it’s picture recognition for entries – you know those pictures because they are what we did in the webinar a year and a half ago, and,
    2.  Creating exits. Exits can either be static that relies on regular re-optimization to keep them in synch with the market or dynamic using techniques that adjust the exits to the market volatility as it changes. Or exits can be a mixture of both.

In my own trading, I only trade for a short time every day to keep my eye in. I KNOW that fully auto is the way to go in today’s markets as I no longer want to sit in front of a computer all day. I accept that the algo will have a bigger drawdown per market than I would achieve manually.  I benefit by the trade off that I don’t have to sit there all day and that I can trade many markets simultaneously where the overall drawdown is reduced by the fact that I am trading a portfolio of algos and markets where on any one day one algo may have a drawdown but others can be profitable.

No comments:

Post a Comment