Back to The Future: Part I


Hey Blue Lake Invest party people, welcome to the weekend! I’m just kidding, the weekend doesn’t start til 3pm. You have a few more hours left to stare out windows, ponder your existence and research happy hour specials for tonight. Also, you can read this article and get in the know about back testing.

Back testing is not some kind of specialised exercise in chiropractic diagnostics, rather it’s the use of market data (such as that available for free on Yahoo or Google Finance) to test and/or develop investment strategies. It’s that simple. However, it isn’t simple to come up with good strategies, and it’s even harder to test them if you’re new to the investing game.

Also, strategies are often complicated, and time is short. Luckily, there are a few simple principles that can help you on your way. Part I covers the method, and Part II will cover the financials of a simple back test. Wewww!

To begin, you need to define a target asset, stock or index. We are going to use the ASX200 index in this example as there are lots of ETF products that derive their value from the level of the index, and data is plentiful. Remember, data is your friend in every backtest.

Plotted below is the ASX200 index for the last 15 years, with nearly 4000 data points. Bang, I’ve got my index and my data (you can find this exact data set on Yahoo Finance for free if you want to play at home).

ASX200

Immediately I can tell that if I’d invested in an ASX200 ETF in 2003 and held it to 2008 I’d have made a killing. Likewise, if I’d purchased more ETF stock in 2009 and held to 2015 I’d be throwing cocktail parties on my private yacht. But, if I’d held for the period 2003-2015 continuously I’d have made a lot less. This gives me my simple strategy, namely to buy ASX200 ETF units during a trough and sell at a peak.

However, that’s a terrible strategy because we can only see the peaks and troughs after they happen, and of course you’d buy low and sell high if you knew when the highs and lows would come. So we need to change the strategy to buy ASX200 ETF units during a trough and sell at a peak IF we can find a historical indicator that occurs before troughs and peaks. Let me explain with a picture.

Thanks_BLI

On the graph above you’ll note 3 lines, being the blue ASX200 close price over time, the green 42 day average and the red 252 day average close price. The 42 day average is a short term average, and the 252 a longer term average (check it on your calculator, you’ll find that 252 is indeed larger).

My theory is that when the short term average dominates the long term this is an indicator that the ASX200 is beginning a climb to a peak, and when the long term dominates the short it’s headed for a trough. The mathematically inclined amongst you will already know that the long and short term averages both have to rise and fall with peaks and troughs, however my point is that when the short crosses the long (green dominates red) we see a sustained period of growth or decline in the index, far longer than the 42 or 252 days of data used to calculate the line.

Now we have a strategy, an indicator to test and a whole lot of data to do it.

Below is the above information transformed into buy, sell or hold indicators. I’ve used a threshold of 50 index points to generate the graph, where a 1 is recorded if the short term average exceeds the long by 50, 0 if +/-50 and -1 if long is greater than short by more than 50. Or said another way, if the short term average starts to exceed long by more than 50 index points, my graph records a 1 and tells me to buy ASX200 ETFs. Easy!

Signal_RegimePhew, what a journey. We’ll pick this up again over the next few weeks, but for now please return to your BAU Friday activities and enjoy your hard earned pint (or four) after the working week is over. Before you go, want more great distractions like this one? Then subscribe below!