What is a moving average and why should I care about it?

Imagine that you are at the grocery store, but instead of seeing 20 varieties of beer displayed at slightly different prices, you see your favorite beer displayed at the 20 different prices it had for the last 20 sales. Naturally, you ask yourself, โ€œHow much should I pay for it?โ€ย  You could try finding the lowest price, or you could take out your calculator and determine the median price and plan to purchase it at that price.

This is similar to the principle used to construct the Simple Moving Average (SMA): sum all the closing values over a certain period of time, and divide by the sum of the number of periods. For example, a 20-day SMA represents the sum of the closing values of the last 20 days divided by 20. It is also known as the arithmetic moving average.ย  SMA can be applied to a wide variety of time frame charts: 60 minutes, daily, weekly, monthly. The length of the SMA can vary as well: 10, 20, 30, 50, 60 or 200 periods. For instance, the 10-day, 20-day and 60-day moving averages correspond to approximately two weeks, one month and three months of daily data, respectively.

What is SMA’s purpose?

SMA has a dual purpose:

 

Top Australian Brokers

 

โ€ขย ย  ย Smooth the data – Martin J. Pring, author of more than a dozen books on technical analysis, notes that โ€œa moving average attempts to tone down the fluctuations of any price series into a smoothed trend, so that distortions are reduced to a minimum.โ€ In other words, price spikes are less visible and only the underlying trend is elucidated, since the current SMA value is an arithmetic average of the period. Notice that each day is equally important, meaning that the SMA from 19 days ago is just as important as yesterday’s price move. The chart below depicts the daily movements of the All Australian 200 Index (XAT). Observe how the 20-day SMA โ€œsmoothesโ€ out the data points, resulting in a much more natural, continuous curve that eliminates price spikes.

โ€ขย ย  ย Accentuate the underlying trend – securities prices fluctuate, and over a certain period of time, we can say that the general direction of the market is upwards, downwards or non-directional. However, it is normal to see pullbacks during uptrendsย  or upward moves during downtrends, before the trend resumes in the original direction. SMA filters out the noise, as you can see in the charts from 2009-10 below.

What are SMA’s some of practical applications?

โ€ขย ย  ย To measure a trend – when a stock is above its 200-day moving average, it is considered in an uptrend, and if it is below its 200-day moving average, it is considered in a downtrend (for a time span greater than one year), see the 200-day SMA constructed on XAT’s chart below.

โ€ขย ย  ย To determine support and resistance levels – because a longer moving average, such as 200-day SMA, tends to follow trendlines.ย  Trendlines are constructed by connecting the last low with the first low during uptrends, and by connecting the first and last highs during downtrends. If using SMA to predict the support and resistance levels, focus on whether a security crosses above the SMA and whether the moving average becomes the support level, which in technical analysis terminology is similar to a price minimum. When the stock falls below the SMA, the moving average becomes the resistance level, which is similar to a price maximum. As prices fluctuate, those two levels tend to reverse their roles, meaning that a resistance level can be breached and become a support level. On the chart below, observe how the 200-day SMA is a support level prior to the sell signal in July 2010. After XAT falls below the support level, the 200-day SMA becomes the resistance level.

โ€ขย ย  ย To determine overbought and oversold conditions-prices tend to revert to their mean, and a large deviation to either side indicates that a correction back to the mean is about to happen. In the chart above, notice how XAT deviated from its 20-day SMA in May and July 2010, and later it reversed back below and then above it.

โ€ขย ย  ย To determine entry or exit trading signals – sometimes two or more moving averages can be used to decide when to buy or sell a stock, depending on the nature in which they cross. The main advantage of clear-cut trading signals is the fact that they eliminate subjectivity. For instance, let’s say that you plotted two simple moving averages on XAT’s daily chart, and one of those was for a shorter period of time: 60 days. The shorter time frame SMA is known as the faster of the two SMA’s because it adjusts quicker to price changes. The second SMA is constructed for 200 days, and it is considered to be the slower of the two, because of its resistance to transient changes. When the short moving average crosses above the fast moving average, you may consider the possibility of buying or taking a long position in that stock. Alternatively, when the 60-day moving average crosses below the 200-day moving average, it is considered a sign of weakness in the trend, and a trader may want to sell the stock.

Below is shown the daily chart of the same XAT index where the blue line is the 200-day SMA and green line is the 60-day SMA. Notice how the fast (60-day SMA) crosses above the 200-day SMA in June 2009. Based on the strategy explained above, a trader would buy XAT. An exit or, in our case, sell signal is received more than a year later, in July 2010, when the 60-day moving average crosses below the 200-day moving average.ย  As you can see, this would have been a profitable trade.

Are there any drawbacks?

โ€ขย ย  ย There is a time lag between the moment a trend starts and the signal to buy or sell is received, since the SMA averages prices over a certain period of time. The lag is particularly prominent in fast moving, volatile markets. Considering the above example of buy and sell trading signals, the entry signal could be received towards the end of an abrupt move, which could be followed by a price correction or consolidation. Observe how much XAT depreciated before the sell signal was received and what would have happened if you initiated a short position based on that sell signal.

โ€ขย ย  ย In a sideways-moving market (a market with no prominent trend), the SMA gives too many false signals. As previously described, there is a time lag between the time when an up-move or down-move starts and the time the signal is received. In sideways-moving markets, up and down moves have limited duration, therefore signals tend to be unreliable and tardy. According to renowned technical analysts Charles Kirkpatrick and Julie Dahlquist, โ€œMany of the most successful technical investment managers use moving averages to determine when trends are changing direction. Moving averages are especially useful in markets that have a tendency to trend.โ€

โ€ขย ย  ย Some say that since all the periods in the SMA are equally weighted, SMA is slow to adjust to changes(see the time lag explanation above). Other types of moving average, such as weighted and exponential, address this issue. Those moving averages give more โ€˜weight’ or significance to more recent periods. We are going to cover EMA and WMA in more detail in the future.

Comments:

SMA is popular because is the easiest to understand, construct and the most reliable of the moving averages (there are also exponential, weighted, geometric and triangular). Martin J. Pring notes that according to research, โ€œSimple moving averages generally outperform weighted and exponential ones,โ€ and also that SMA is โ€œOne technical tool in the technical arsenal that is used with other techniques as part of the art of identifying trends reversals.โ€