Market Timing using Exponential Moving Averages

Chartists and momentum investors typically look to moving averages (MA) as signals of market movement trends.  As such, even if you don't use such indicators, it is helpful to understand them as other traders certainly do pay attention to them and act on their signals.   Moving averages are lagging indicators, meaning they are used to identify pre-existing trends rather than predict future movements.  For example, when a stock price is above its 50-day MA, it is seen as being in a uptrend and many investors choose to go long in such circumstances.  On the other hand, once a price is below its MA, it is seen as being in a downtrend.

While one MA alone gives a generic sense of a price's trend, more commonly two are used in tandem.  As a short-term momentum indicator, the 12- and 26-day MAs are frequently used.  When the 12-day average is above the 26-day it is seen as a bullish phase with positive momentum going forward.  Conversely, when the 12-day passes below the 26-day, it indicates negative momentum.  These two are also used to create more complex indicators such as the Moving Average Convergence Divergence (MACD).


For example, in the above chart for Google (GOOG), the crossover of the 12-day indicator below the 26-day signals a negative trend and potential sell signal.  On the other hand, the MACD signals a slight buy (although it being in negative territory is usually seen as slightly bearish).  As you can see, different indicators can say opposite things about the same stock at the same time.  Thus, looking at just one in a vacuum doesn't seem wise as it's best to have a complete picture.  Volume is another key aspect that chartists tend to look at to see if a movement is legitimate or not.  (Note that I do not consider myself a chartist or technical analyzer.  I find it interesting and appreciate the sentiments learned by such analyses, but prefer to generally rely on fundamentals).

For long term trends, it is more appropriate to use the 50 and 200-day moving averages.  The same logic applies as the above, but these signals are much less frequent and are used to identify significant bear and bull markets.  There are two types of moving averages - simple and exponential.  While the SMA gives the same weight to all the data within the range, the EMA gives more weight to the latest data.  Thus, EMAs reacts slightly faster to price changes than their SMA counterparts.

The Strategy

An interesting market timing strategy is to use the long-term EMAs as signals to enter and exit the market as key points.  Since they're so long-term, the signals are not very frequent and it's quite simple to follow.   The purpose of such a strategy is to avoid the worst downturns while being able to maintain market positions during bullish phases.

I tested a strategy that uses the 50-, 100-, and 200-day exponential moving averages.  Using a $10,000 investment in an S&P 500 ETF (SPY), I went back to 1993 to start the backtest and went through the open on 2/16/10.  My strategy was quite simple: sell when the 50-day EMA moves below the 200-day EMA and buy when the 50-day EMA moves above the 100- or 200-day EMA.  The reason I added the 100-day for the buy signals instead of simply using the 200-day is that in extreme bear markets, the 200-day is far too long of a laggard.  Investors would then miss most of the upswing (as what would have occurred in 2009).  Plus, I think being in the market more often than not is a reasonable strategy and selling only when downward trends are clear is advisable. 

Using the above strategy, there were only six roundtrip transactions in 17 years.  That is about one buy and sell every three years.  As you can see, this doesn't require that much monitoring and keeps you in the market for the majority of the time.  I didn't calculate T-bill rates or cash equivalents when the strategy called for being out of the market, so it is inherently at a disadvantage.


Of the seven transactions (one more than previously indicated since I'm including the start and end points), two were marginal losers in the amounts of 3% and 5%.  The other five accounted for gains of 1%, 110%, 22%, 58%, and 14%.  

EMA Timing

Buy Date Buy Price Shares Cost Basis Sell Date
1/29/1993 43.94 227.58 $10,000.00 4/13/1994
8/18/1994 46.45 218.42 $10,145.65 12/9/1994
1/17/1995 47.03 209.23 $9,839.86 10/5/1998
10/30/1998 110 187.71 $20,648.43 10/18/2000
3/18/2002 116.67 216.00 $25,200.48 4/11/2002
5/1/2003 91.9 259.93 $23,887.21 1/2/2008
6/1/2009 94.77 397.50 $37,671.09 2/15/2010

Sell Price Sell Value Difference % Net Change Cumulative
44.58 $10,145.65 $145.65 1.46% 1.46%
45.05 $9,839.86 -$305.79 -3.01% -1.60%
98.69 $20,648.43 $10,808.57 109.84% 106.48%
134.25 $25,200.48 $4,552.04 22.05% 152.00%
110.59 $23,887.21 -$1,313.27 -5.21% 138.87%
144.93 $37,671.09 $13,783.88 57.70% 276.71%
108.04 $42,945.92 $5,274.83 14.00% 329.46%

Cumulative: +329% 

The S&P 500 was up 146% over the same period.  If you had invested $10,000 in 1993 and used the EMA strategy, you'd have $42,946 today, while buy-and-hold would have left you with $24,600.  Note that the above only captures capital appreciation and excludes dividends.  Thus, the gains are actually greater than stated in both circumstances.  As you can see, this timing strategy had some impressive outperformance over this period which encompassed one of the greatest bull markets of all time and two large bear markets in 2000-2002 and 2008.
Red = S&P 500 buy and hold
Blue = EMA Timing

Similar to other market timing strategies, one can plainly see that it trails buy and hold in continuous bull markets (1993 - 2000).  This is no surprise since being out of the market when it's up virtually every month never helps performance.  Despite this, since EMAs indicate past trends, there were only thee very short periods through 2000 that it indicated to be out of the market, and thus the strategy captured the majority of the gains.

Another performance figure that I like to examine to measure volatility and risk is the year-by-year values.  Of the five years in this sample range wherein the market had a negative return, the EMA strategy outperformed in four of them.  In the two worst years, the EMA considerably outperformed.  In 2002, the S&P was down 21%, while the EMA strategy called for being in the market only about a month the entire year and thus was down a mere 5%.  In the disastrous 2008, the S&P sunk 34%.  The EMA strategy signals a sell right at the beginning of the year and never got into buy territory, so it remained unchanged.  See below for the year-by-year performance with the better performing strategy in green, if applicable.

Year Buy and Hold    EMA     Strategy
1993 6.03% 6.03%
1994 -5.11% -10.22%
1995 30.22% 30.22%
1996 16.92% 16.92%
1997 23.62% 23.62%
1998 23.48% 12.29%
1999 15.20% 15.20%
2000 -5.55% -3.94%
2001 -16.04% 0%
2002 -21.43% -5.21%
2003 29.73% 21.60%
2004 6.91% 6.16%
2005 5.87% 5.87%
2006 11.29% 11.29%
2007 1.65% 1.65%
2008 -34.44% 0%
2009 37.76% 18.57%
2010 -3.85% -3.85%
  Total       +146%         +329%

On the other hand, during years the market performed very well, the EMA strategy sometimes underperformed.  There were five years of greater than 20% gains: 1995, 1997, 1998, 2003, 2009.  The EMA strategy got all the gains of '95 and '97.  It captured about half of that in '98, 2/3 of it in 2003, and half in 2009.  Since the strategy is a laggard, if the market was up in a year following a bull market, the EMA never signaled a sell and then captured all the gains.  If, however, the run-up was after a large correction as those that happened in 2000-2002 and 2008, then it took some time for the buy signal to be initiated and the EMA strategy missed some of the uptick.


As a long-term trend indicator, the 50-, 100-, and 200-day exponential moving averages do signal momentum shifts in the market.  This simple strategy had an impressive outperformance of the market during this time period, but there is certainly no guarantee that such a pattern will continue to exist.  Having said that, I think this strategy actually makes more intuitive sense than Sy Harding's Seasonal Timing Strategy (that I explored in this post) and requires very few transactions over a long period.  Its key to success is exiting the market near the relative beginning of huge downturns.  

Furthermore, this strategy is successful during periods of high volatility, while during a sideways market, it would simply signal nothing and thus is the same as buy-and-hold.  It is for that reason, that I like it more than many other timing tactics.  Instead of trying to enter and exit the market frequently at opportune times, this approach only acts when trends have been clearly established.  

Rather than taking these signals without reservation and having them dictate the complete selling of your equity position, I personally could see risking a bit less and selling about half of your equity position and investing in bonds with that half.  That way, it's a combination of a buy-and-hold and market timing strategy.  While no market timing strategy has really shown to outperform the market in all conditions over a lengthy period of time, those risk averse investors who cannot stomach large downturns might consider this simple EMA timing strategy (or simply reduce their equity percentage).
Related Posts Plugin for WordPress, Blogger...