Tuesday, July 8, 2008

Increasing 200 day moving averages

I did a quick study of what happens if you look at whether the 200 day moving average is increasing or not. I used the same asset classes and methodology as this which through February of this year showed a return of 11.98% (6.82% std, .875 Sharpe). I looked at three improvements which probably do not have different enough results to tell a priori which is better.
  1. 1. If the 200 day moving average is increasing a buy signal is generated, invest in cash otherwise.
  2. 2. Entry order is only generated when the price is greater than the 200 day MA, only exit if the 200 MA decreases.
  3. 3. Same entry order, but exit if below 200 day MA and 200 day MA decreases.
The first shows a return of 12.5% (6.9% std, .947 Sharpe), the second has a return of 12.8% (6.9% std, .975 Sharpe), and the final has a 12.4% return (6.6% std, .961 Sharpe). For the first one, the bond portfolio underperforms relative to the classical TAA model from Faber. In the second, the real estate portfolio underperforms. However, this is also dependent on the time period. Over the whole period the real estate underperforms, but since 1995, the second method produced strong returns in real estate (though the third method does better). The second method has the benefit of simplicity and surprisingly is in the market more often than the traditional TAA method.

I had originally assumed it would be in less. I wanted a method that would use the same entry and get you out quicker when the market begins to tank, but it appears that the benefit comes from keeping you in the market longer (roughly 70% of the months that are different are from the second method having a buy rather than a sell) and these months, particularly for commodities and stocks, generate strong returns and the handful of months avoided have relatively mixed returns. However, when they are down, they are down pretty significantly (real estate is an anomaly that acts opposite both effects). I was also surprised to find out that on average the TAA method generates on average 50 entry or exit signals per asset class whereas the second method generates about 45.

In conclusion, the TAA model can benefit by being in the market longer and not necessarily trying to avoid more periods.

2 comments:

Feanen said...

It is more straightforward to use a momentum indicator than to look at whether the SMA is going up or down.

In Matlab code,
sma(i) = sma(i-1) + (close(i) - close(i-n))/n;
The momentum indicator is
mom(i) = close(i) - close(i-n);
This means that
sma(i)-sma(i-1)=mom(i)/n

Using momentum rather than sma slope is a clearer statement of what you are looking at while being mathematically identical.

Kirzner Fervor said...

I use tsmovavg, but it looks like that is basically the same thing.

You're right that they should be able to convey the same thing. If on average the stocks have increased the past n periods, stay in, otherwise get out. I generally prefer to keep momentum scaled or as ranks for comparisons between different asset classes and subcomponents of asset classes which is why I did it in terms of SMA slope.

What I found most interesting wasn't how it worked (or the explanation), but why it worked. I thought it out with the assumption that it would take you out of the market more, but it appeared like it was successful by staying in more often. To break it into it's most simple concept, it really is just saying that get out if over the past n periods you are taking a loss and should probably get out. Just saying momentum doesn't really explain why it works as much as just saying SMA slope doesn't really explain why it works.