Friday 30 July 2010

Testing the 50/200 Day Moving Average Crossover Strategy on the DFM General Index

In the last post I looked at the 50/200 day moving average crossover strategy and the historical results when is was tested on the S&P 500 Index.

In this post I'll do the same but for the DFM General Index.

To recap, the main characteristics of the crossover strategy when applied to the S&P 500 were its ability to generate similar, long-term returns to buy and hold but achieving this with significantly reduced drawdowns and less time spent invested in the market.

OK, let's apply this strategy to the DFM General Index and see if the same conclusions apply. Firstly, below is a chart showing the 50-day and 200-day moving averages for the DFM:


Just by eyeballing the buy and sell signals on the chart above it appears that the crossover strategy did a good job of avoiding the worst market declines over the past five years.  However, for a more accurate picture below are the P&L chart and performance statistics (Note: starting capital = $1,000, profits are reinvested, results do not include fees, slippage or dividends):




In interpreting these results above it is important to note a couple of things. Firstly, the 50/200 day moving average crossover strategy is a long-term trading system. For example, when applied to the S&P 500 Index the strategy only generated 20 trades over the last forty years.  Now, the DFM General Index, indeed the entire DFM market, has only been in existence since the beginning of 2004.  This doesn't give us a lot of data to work with when testing a long-term strategy and this should borne in mind when evaluating the results.

Secondly, the DFM General Index cannot be directly traded.  At present, there is no instrument that exists which tracks the DFM index so the test results are very much hypothetical.  That said, if the results are similar to the ones generated by the S&P 500 test they should provide us with a good indication of when to be in the market and especially when to get out of the the market.  This will most likely be applicable to the underlying stocks in the DFM Index.

OK, what do the test results for the DFM General Index tell us?  Over the test period the crossover strategy generated a annualised return of 22% compared with -3.70% for buy and hold.  That's a big outperformance.  However, most of the returns for the crossover strategy were achieved in 2004 (that's why the blue P&L line for the crossover strategy obscures the red P&L line for the buy and hold strategy).  Since the the bull market ended in 2005 the strategy has not made any significant returns but it has done the next best thing by avoiding some really nasty falls in the market.

As can bee seen from the performance statistics, the worst drawdown for the crossover strategy was -45%. On it's own that's a pretty big drawdown to handle.  However, when compared with the -83% drawdown the buy and hold strategy suffered it starts to look a lot better.  The crossover strategy had a much lower average drawdown of-25% versus -45% for buy and hold.

Conclusion

All in all these results are similar in nature to those for the S&P 500 Index.  The 50/200 day moving average crossover strategy managed to sidestep the worst of the market declines, declines which have been substantial for the DFM General Index over the last five years.  This is has meant that the strategy has only been invested for just over 50% of time since 2004.

Unlike the S&P 500 Index results, the crossover strategy on the DFM General Index managed to significantly outperform buy and hold. However, this is probably because the test period for the DFM strategy was much shorter and was dominated by bear markets during which the crossover strategy was able to easily outperform buy and hold.  

Next, I'll apply the 50/200 day moving average crossover strategy to other GCC indices and in later posts I'll test the crossover strategy but with different moving average lengths.

Enjoy.

The 50/200 Day Moving Average Crossover Strategy

In this post I want to provide a quick overview of one the oldest and simplest trading systems: the 50/200 day moving average crossover strategy.

In order to demonstrate the main features of this strategy I'll be applying it to the S&P 500 Index.  However, in subsequent posts I will apply the same strategy to the DFM General Index and to other GCC indices.

For those unfamiliar with moving averages just do a google search and you'll find lots of detailed explanations.

In short, however, the strategy comprises two moving averages, one of 50 days and the other of 200 days.  The trading rules are simple: if the 50-day moving crosses above the 200-day moving average a long position is initiated.  This long position is maintained whilst the 50-day moving average remains above the 200-day moving average.  If the 50-day moving average crosses below the 200-day moving average the long position is closed and the strategy moves to cash.


In the example above the 50/200 day moving average crossover strategy applied to the S&P 500 Index.  The blue line is the index level, the red line is the 50-day moving average and the green line is the 200-day moving average.  As show on the chart, when the 50-day crosses above the 200-day moving average (green arrows) a long position is initiated and this is held until the 50-day falls below the 200-day moving average (red arrows).  Simple.

Here's the P&L chart that would have resulted if this strategy had been applied to the S&P 500 Index since 1970 (Note: starting capital = $1,000, profits are reinvested, results do not include fees, slippage or dividends):



As you can see, over the past 40 years the 50/200 day moving average crossover strategy has more or less generated the same returns as the buy and hold strategy (the annualised return of the crossover strategy was 7.50% versus 6.50% for the buy and hold strategy).  However, the advantage of the crossover strategy compared with buy and hold was its ability to avoid the worst of the downturns in the market.   For example, the buy and hold strategy experienced a maximum drawdown of nearly -57% whilst the worst drawdown for the crossover strategy was -33%.  Similarly, the average drawdown for buy and hold strategy was over 12%, twice as much as the crossover strategy which had an average drawdown of -6%.

Another benefit of the crossover strategy is that it was only invested in the market about 69% of the time versus 100% for the buy and hold strategy.  So, the crossover strategy generated similar returns to buy and hold but with significantly less time exposure to the market. 

Conclusion

In terms of raw returns the  50/200 day moving average crossover strategy performed similarly to the buy and hold strategy over the test period.  However, when drawdowns are considered the crossover strategy performed much better on a risk-adjusted basis than did the buy and hold.

In the post I'll take a look at how 50/200 day moving average crossover strategy has performed on the DFM General Index

Thursday 29 July 2010

Hello World!

It's July 28th 2010. As I type this first blog entry the GCC equity markets are entrenched in a seemingly never ending bear market. The heady bull market days when stock prices would regularly double, even triple, in a matter of weeks are but a distant memory.


The DFM General Index is currently down 82% from its 2005 all time high and is now hovering precariously above its bear market low of 1433, a level first seen over six years ago in June 2004. The Abu Dhabi Index has also fallen significantly from its all time high set in 2005, down nearly 60%. And with these index declines trading activity has also fallen. Volume on both the DFM and ADX are currently at levels not seen in many years.

Other GCC equity markets have not fared any better. The Saudi Tadawul Index has fallen 70% whilst the Kuwaiti market is down 57%.

So, given this background, I hear you say, what's the point of starting a blog focused on GCC market analysis? That last thing the internet needs is another blog let alone one that is about the has-been equity markets of the middle east. Right?

Well, it's true that the current environment is not one of joy and optimism. Across the region stock prices are falling, trading volumes have all but dried-up, brokerages are closing or suspending operations and asset managers are finding it increasingly difficult raise and retain funds. Things are bad. However, I think there is an opportunity in this unfolding crisis.

During the bull market days, especially in 2004 and 2005, everyone was a successful trader. If you were active in the GCC equity markets during this period you made money and most likely lots of money. But, for the vast majority (and I'm referring to both retail and institutional investors here), this success was merely an illusion
brought about by the strength of the bull market rather than any skill in predicting future equity prices.

The aphorism "a rising tide lifts all boats" describes what was happening. What was the point of market analysis during this period? Just buy a stock, any stock, and enjoy the profits as it inevitably shot up in value. Who needed complex valuation models or in-depth macro economic analysis in such an environment? And, to be fair, this was true. Most reasoned analysis would have been telling you to get out of the market a long time before they actually peaked - and who wanted to be on the sidelines whilst everyone else was coining it in?

Things are different now of course. The party is over and the last four years have seen lots of people lose lots of money. The good news, however, is that I believe we are now in an environment in which people will be a lot more receptive to the idea of market analysis - bear markets tend to do this to people. So, this is main reason for starting this blog. I think it's an opportune time to introduce some novel, useful and hopefully interesting analysis and research focused primarily on the GCC equity markets.

In particular, this blog will be focused upon developing market analysis which can provide an '"edge" in determining the future direction of stock prices. In doing this the emphasis will be on testing and validation.

Log on to the internet, turn on the TV or open a newspaper and you will find no shortage of opinion about a company's stock price, the price of oil or the state of the economy. What you probably won't get, however, is an opinion that is backed up with data that is the result of objective and rigorous testing. For example, a favourite with analysts and the media is the idea that oil prices have a big influence on future equity prices in the region. Sounds logical given that oil revenues account for a significant proportion of the GDP in GCC countries. However, what sounds logical isn't necessarily correct when it comes to financial markets and stock prices. Some relatively simple correlation studies could go along way to determining the relationship, if any, between regional stocks and oil. But you rarely, if ever, here analysts or journalists refer to such studies when making claims about the effects of oil prices on GCC stock markets.

I want this blog to be different. In fact, I want the focus on testing and validation to be a key differentiating characteristic of this blog.

Finally, a personal motivation for starting this blog is provide me with the impetus to formalise my vast amounts of research and analysis into a more coherent and useful form. I have lots and lots of half finished or nearly finished studies but I all to often lack the focus to complete them. My hope is that this blog will compel to me finish these studies to that I can't present them on this blog.

OK. that's about if for my first post. I'm aiming to post quite regularly in the coming weeks so be sure to visit frequently or subscribe to the RSS feed in the right-hand sidebar. I have no grand plan in terms of content at present so
initially things might be a little haphazard in terms of topics covered. However, I'm hopeful that some consistency will be established once the blog finds it feet.

Enjoy.