A simple moving average (SMA) is the average of a stock’s price over a set period of time. A moving average is generally named for the time period to calculate it, for example a 50-day moving average (50 DMA).
Moving average is one of the most commonly used technical indicators; it may be the best way to determine if a stock is trending up or down. Learn how it works and what it can be used for when making investment decisions.
Definition and Examples of Simple Moving Average
A simple moving average is the average stock price over a past period. The most common moving average time periods are 50 days and 200 days. This is because, once you subtract weekends and holidays, 50 days approximates the number of trading days in a quarter and 200 days approximates a year.
More specifically, the 50-day moving average is calculated by adding up the past 50 days’ stock closing prices and then dividing the result by 50, while the 200-day moving average is calculated by totaling the past 200 days’ prices and dividing the result by 200.
Moving averages are generally represented by a line on a stock chart. If the line is moving up and the stock price is above it, the stock is considered to be trending up, and vice versa for a declining line.
Trend-following with these types of charts is a common trading strategy in stocks, foreign exchange, and commodity futures.
Take a look at the Netflix stock price chart below for an example of a simple moving average:
How Simple Moving Average Works
A simple moving average is calculated using an average of prices over the past 50 or 200 days. You can calculate this number manually, but it is also available on most financial websites and should be on your broker’s website as well.
A simple moving average is commonly used in trend-following. Trend followers want to buy stocks that are trending up and sell stocks that are trending down. If the moving average is going up, it is possible that the stock is trending up. The stronger a trend is, the higher recent averages will be. Ideally, the current price is higher than the 50 DMA, which is, in turn, higher than the 200 DMA.
Trend-following is one of the most successful trading strategies, and some research has shown that it has worked for over a century in various asset classes. That said, moving averages are widely recognized as a lagging indicator for trend-following—if the stock price is above the moving average, which is calculated based on past numbers, that means the stock is already trending up and profit opportunity may be gone.
To get in as early as possible, some traders watch price crossovers. A crossover occurs when a lower-number average (or the current stock price) becomes higher than, or crosses over, a high number. For example, when the 50 DMA crosses over the 200 DMA, it could signal a buying opportunity because the stock price was higher, on average, in the last quarter than in the last year.
Revisit the chart above to see the stock price crossing over the moving average line in both June and August. On a website like stockcharts.com or your broker’s site, you can plot multiple moving averages along with the stock price to seek out price crossovers.
Crossovers can be used in the opposite direction, as well for risk management.
Historically, when the price of the S&P 500 falls below its 200 DMA, it usually means a recession is imminent. Some investors use that signal to either hedge their portfolio or sell out completely.
Moving averages are also used to identify support and resistance levels for a stock. Support is a price level that the stock is unlikely to go below; resistance is a level that it is unlikely to breach. If a stock has stayed above or below the moving average for a long time and then breaks that trend, it is said to have broken out. Breakouts are often used as a catalyst for a trade decision.
Simple Moving Average vs. Exponential Moving Average vs. Weighted Moving Average
Exponential moving average (EMA) and weighted moving average (WMA) are similar to the simple moving average, but both are adjusted to give more impact to more recent trading days.
EMA is calculated by applying an exponential smoothing constant to the average formula and weighted average is calculated by directly weighting more recent days more heavily.
Each of these two moving averages is used to try to identify trends faster. Remember, simple moving averages have an implied time lag. If you’re using a 200 DMA, the average includes prices that are a year old. At that point, the chance for profit could be gone. Following the EMA (you can add this moving average line to your chart on any financial website) may give you a quicker heads-up when a trend is slowing or even reversing.
The simple moving average is a smoother representation of a stock price’s trend and the other two types of moving average provide more jerky, quick signals.
- Simple moving averages are calculated by averaging stock prices over a set period of time.
- You can compare the moving averages and the current stock price to determine which direction a stock is trending.
- Exponential and weighted moving averages put more weight on recent prices to signal stock-movement trend reversals faster.