Every stock market investor needs to know how to use moving averages to trade stocks. Every charting package and online brokerage platform worthy of the name will allow you to superimpose moving averages onto stock price charts.
The first questions with moving averages are:
- what settings should I use – simple, exponential, or some other exotic kind of moving average?
- what period or periods should I use?
- how do I read them for trading signals?
Let’s look at each of these in turn.
Simple moving average vs exponential moving average
First off let’s remind ourselves that a moving average is an average of a set number of data points in a time series. For stock prices, if we have a series of daily closing prices, a 10-day moving average would just be a sequence of prices that are an average of the current price and the prices of the nine previous days.
An exponential moving average is a special case of a weighted moving average and the simplest case of a weighted moving average is a linear weighted moving average. It is easiest to consider the differences between simple, linear weighted and exponential moving averages by looking at the multiplying factors. Here is a simple illustration.
Simple Moving Average and Exponential Moving Average are often abbreviated to SMA and EMA.
So which to use?
There is no simple rule whether to use simple or exponential moving averages. Generally, if a stock price is slow-moving SMAs can be used. While for faster-moving stocks it will be preferable to use EMAs. So, if you want your averages to be more responsive to recent price moves, the EMAs are typically a better choice.
Generally, the choice is a matter of personal preference. The exception to this principle is that if you find out that analysts are normally either using SMAs or EMAs to analyze a specific stock, then you are better off doing the same.
Essentially if moving averages are being used to program automated buy and sell signals in large volume then you will want to adopt the same approach.
Let’s compare a 10-day simple moving average with a 10-day exponential moving average. This is a chart of the SPDR ETF, symbol SPY that tracks the Standard and Poor’s 500 index. This is a daily chart of the SPY and shows the period from January through September 2020.
As is still fresh in our memories, the market reached a peak in late February after a strong steady rise over the previous few years. In March the market collapsed, only to turn around and recover all its losses. by August.
Here the red line is the simple moving average and the blue line is the exponential moving average.
There are just a few places on the chart where we can see the exponential average has more accurately responded to rapid price movements than the simple moving average. This is most noticeable immediately after the bottom of the bear market sell-off of March 2020.
In the first few days of April, there was a short pullback in the market. The simple moving average ignored this as noise while the exponential moving average registered the dip. I’m not saying this is a big deal, after all, we watch the actual price action as the most significant information anyway and moving averages are just a way to look at price action while eliminating the noise.
However, if we had been using this moving average to signal buy or sell actions, and we were convinced the market was still a bear market having the price downturn at the beginning of April confirmed by a downturn of 10-day exponential moving average might have caused us to open a bear position on this ETF.
One main feature to notice is how the moving average often serves as a level of support during and uptrend and resistance during a downtrend. These periods are marked below.
Intermediate-term 50-day and short-term 10-day
For trading purposes, it is usual to take a faster-moving average and a slower moving average and look at the times when the fast line crosses over the slower line. If we are looking for trades over a period of a few weeks to a few months a 50-day and a 10-day moving average would be a good choice.
Here is what the 10-day EMA and 50-day EMA look like on the SPY price chart for January through September 2020.
However, before we go there and look for signals, we should zoom out to a larger time frame to assess whether the overall market is in an uptrend or in a downtrend.
The 200-day moving average gives a general long-term picture of the overall trends in the market. Since there are five trading days in a week, the 200-day moving average is calculated over a 40-week period.
Here is the daily price chart for the SPY from January through September 2020 with the 10-day, and 50-day exponential moving average and the 200-day simple moving average. I am using the simple moving average for the 200-day period as I am not concerned with rapid changes but I want to reveal the overall price trend.
One thing this shows us quite clearly is that we need to zoom out to a wider timeframe to get a better sense of what is happening and see the overall trend. Here is the SPY daily price chart with the same moving averages for the period 2015 through September 2020.
Above or below the 200-day
Here we can more clearly see, looking at the 200-day average that there was an up-trending bull market that started around July 2016 and lasted into October 2018. Then, again looking at the 200-day average there was a period of sideways movement that lasted until June 2019 when an up-trending bull market was again established.
That bull market lasted until March 2020 when again, according to the 200-day moving average the long-term market entered a period of indecision through to around July 2020 after which point the uptrend took over again.
From the 200-day moving average, it does look as if we are in a long-term bull market. Since it is always best practice to trade in the intermediate-term within the general trend of the longer-term market, in those periods of long-term bull markets it makes sense to take long positions. This implies that buy signals will be entry signals and sell signals will be exit signals.
In the periods of sideways market movement, it makes sense to trade a mixture of bullish i.e. long and bearish i.e. short positions or to sit on the sidelines in cash.
Moving averages – a flow chart
Here is how most traders use moving averages, expressed in a flow chart.
10-day crossovers of the 50-day
Let’s look again at the daily price chart for the SPY from January to September 2020. Here are the points where the 10-day moving average crosses over the 50-day moving average.
The sell signal on the first crossover happened on 26 February. We were still in a long-term bull market at the time so this would have been a good signal to exit long positions.
The next crossover was the buy signal that happened on 28 April. At that point, from a long-term perspective, the market was still trading sideways and hadn’t decided whether to enter a bear market or resume the bull market. So whether we would have taken that crossover as a buy signal to enter long positions or a buy signal to exit short positions, or both, or neither would have been our choice at the time depending on how we interpreted other signals and indicators.
Currently, 22 September the 10-day moving average is heading for a crossover of the 50-day moving average. We will see over the next days whether that happens. The 10-day already crossed over the 20-day moving average on 14 September.
So what does this mean?
Well, if we think that on a long-term basis the bull market has re-established itself, then sell signals would be a trigger to exit long positions. If we are still undecided about the longer-term trend then a sell signal could also trigger entering short positions.
Moving averages on other price charts.
So much for the SPY that tracks the Standard and Poor’s 500 index. Let’s have a look at the same moving averages on some other price charts.
A technology ETF – QQQ
The Invesco ETF with the symbol QQQ is based on the NASDAQ 100 index. Because of the stocks that make up the NASDAQ 100, QQQ is very heavy in technology stocks. Here is what the QQQ daily price chart from August 2018 to December 2019 with 10-day, 50-day, and 200-day moving averages.
The first thing to notice is that during this whole period the 200-day moving average showed a continuous long-term uptrend. You could argue this was not a very strong signal and that could influence your trading decisions in that period.
If we consider all the times the 10-day moving average crosses over the 50-day moving average to be a buy or a sell signal then we can see we would have been in a bit of a buying and selling frenzy without much overall vertical movement and hence profit resulting.
Overall we would have been better off acting only on the first sell and the first buy signals in this period, and just holding for the rest of the time, if, we were only trading off of these moving average crossovers.
Let’s have a look at another.
SPDR Gold Shares ETF – GLD
Like for the previous charts, we look first at the 200-day average. Over this period it suggests that the GLD was in a clear and strong long-term bull market.
The first two signals to sell and buy would likely have been reasonable signals to follow. As was the case for the QQQ above, the next signals would have just been useless noise. Again, in all likelihood, we would have been looking at other indicators to determine when and how to act.
A hotel and entertainment services stock – MAR
Marriott International Inc is a hotel and entertainment services company with a market capitalization of over $30 billion. Marriott had been trading sideways from a long-term perspective since January 2018 until the end of February 2020. Then along with everything else the stock price took a tumble when the markets caught the coronavirus.
Here is the price chart of Marriott International, symbol MAR, from June 2017 to November 2019 also showing the 10-day, 50-day, and 200-day moving averages.
Looking first at the 200-day moving average we see a mixed picture for long-term trends. For simplicity here, I have just marked the chart as either a long-term uptrend or a long-term downtrend. In reality, there would be a distribution phase at the end of the first large uptrend before the downtrend starts.
Similarly, there would be an accumulation phase at the beginning of January 2019 before the price uptrend starts. Here is an article that explains more about accumulation and distribution phases and stock market cycles.
I think it is fair to say looking at this chart that it would have been unwise to base trading decisions on moving average crossovers for this time period.
Tools in a trading system
Moving averages are basic and useful tools and it is well worth traders and investors getting a good understanding of how they work and how to use them.
Like all indicators, they are tools to be used and should always be used in conjunction with other indicators. We should always remember that price movement itself is always the most important indicator.
Answers to questions
Q. Which are the best moving averages for trading?
A. The answer to this question depends on your trading timeframe. Generally, it is good to get an overall sense of the market direction by looking at a moving average, and other indicators of a time frame larger than the one you are trading in. If you are trading in the intermediate-term of say a few weeks to a few months, then as the example here did, look at a 200-day average to get the sense of where the market is heading in the long-term. Then favor trades in that direction.
Again, if your trading time frame is a few weeks to a few months then use a 10-day moving average as your faster average and a 50-day moving average as your slower average.
Q. When should you buy and sell using moving averages?
A. When the faster average crosses up through the slower average, that is a buy signal. When the faster average crosses down through the slower average, that is a sell signal.
Q. What other indicators should I use with moving averages?
A. Use other indicators to confirm crossover signals from the moving averages. The RSI can be used to confirm signals, also the Stochastic oscillator can be used. Other good confirmation signals would be the MACD and candlestick patterns.
I hope you found this article interesting and useful. Do leave me a comment, a question, an opinion, or a suggestion and I will reply soonest. And if you are inclined to do me a favor, scroll down a bit and click on one of the social media buttons and share it with your friends. They may just thank you for it.
Disclaimer: I am not a financial professional. All the information on this website and in this article is for information purposes only and should not be taken as investment advice, good or bad.
Affiliate Disclosure: This article contains affiliate links. If you click on a link and buy something, I may receive a commission. You will pay no more so please go ahead and feel free to make a purchase. Thank you!