Disclaimer: This is for informational purposes only and is not to be construed as financial or investment advice. It is not an endorsement of any company or a recommendation to buy, sell or hold any security. Investors should determine for themselves whether a particular security or product is suitable for their investment needs or should seek such professional advice for their particular situation.
Simple moving averages are well-known investing strategies, often being mentioned in popular websites such as marketwatch.com, and they supposedly could be indicative of where a stock is headed in the near term. This article will examine whether they are viable trading strategies i.e. whether they generally outperform a simple buy and hold strategy. The answer is generally no, but there are cases when employing a simple moving average strategy may be useful.
What are Simple Moving Averages?
Moving averages measure a stock’s price over a period of days to reduce noisy fluctuations in a stock’s price and to see whether the price exhibits a clear upwards or downwards trend. A common strategy is to derive two separate moving averages over different intervals and then compare the two in order to generate a trading signal. Traders often compare one short term moving average — typically a 50-day moving average — to a longer term moving average — usually around a 200-day moving average. If the shorter term moving average is greater than the longer one, then that generally indicates that the stock is headed in a positive direction, and if the shorter term moving average is below the longer term average, then that may be a sign of trouble.
Using Gilead as an example, we can clearly see the upward trajectory of its price when the shorter term moving average exceeds the longer one and vice versa:
Are Simple Moving Averages a Viable Strategy?
The graph above suggests that there might be something to the simple moving average strategy. To assess this, let’s look at every stock in the Nasdaq 100 since the beginning of 2015, and compare whether the moving average strategy beats a simple buy and hold one:
The moving average strategy fails to beat the buy and hold strategy 90 percent of the time. It’s obvious that you’re probably better off with simply buying and holding a security over the long term.
Why Simple Moving Averages usually don’t Work (with Stocks)
There is a pretty simple explanation why this strategy often does not beat the buy and hold strategy: It is a stylized fact that the stock market tends to move upwards over the long term, so you’ll rack up the returns by simply staying put. This is especially true since the financial crisis where the Nasdaq 100 has skyrocketed 878% since the beginning of 2009. In addition, many stocks in the Nasdaq 100 have also exhibited this upward trend, with the median annual return being 21% since 2015. In other words, why would you actively trade stocks, if the only the direction were up, long term?
Yet our analysis indicated that there are some cases where a simple moving average strategy wins out. Do those cases have something in common? My hypothesis is that simple moving averages may be effective with stocks that have exhibited a downward or inconsistent trajectory over the long term:
I think the hypothesis is generally on the right track, and it makes sense intuitively because stocks with mainly a smooth and consistent upward trajectory are more likely to exhibit a false positive for the moving average signal. On the other hand, stocks with inconsistent trajectories or wild swings are less likely to do so.
You’re probably better off finding a company you believe in and holding for over the long term. There are special cases where using a simple moving average may be beneficial, but the strategy should be used with care.
The Python code can be found here