Moving Average
A moving average is a technical analysis calculation that smooths price data over a specified lookback period by continuously averaging a fixed number of sequential data points, filtering out short-term noise to reveal the underlying trend direction. The two primary variants—simple moving average (SMA) and exponential moving average (EMA)—differ in how they weight older versus more recent observations.
Key takeaways
- The simple moving average (SMA) weights all observations equally, while the exponential moving average (EMA) weights recent observations more heavily, making it more responsive to recent price changes.
- Moving average crossovers—when a shorter-period MA crosses above a longer-period MA—generate widely used trend-following signals; the 50-day/200-day 'golden cross' and 'death cross' are closely watched by institutional and retail traders alike.
- Moving averages are inherently lagging indicators: they confirm trend direction rather than predict reversals, making them most effective in trending markets and least effective in choppy, range-bound conditions.
- The choice of lookback period involves a trade-off: shorter periods react faster but generate more false signals; longer periods provide more reliable signals but lag price action significantly.
- Volume-weighted moving averages (VWMA) and Hull Moving Averages are advanced variants designed to reduce lag or incorporate volume information into trend analysis.
Explanation
Moving averages represent one of the oldest and most widely applied tools in technical analysis, with roots in commodity price charting that predate computerized trading. Their enduring utility lies in a simple principle: by averaging price observations across a window of time, random short-term fluctuations cancel out, leaving the underlying directional trend visible. This noise-reduction property makes moving averages useful both as standalone trend indicators and as building blocks for more complex technical systems.
The simple moving average (SMA) computes the arithmetic mean of closing prices over the lookback period, rolling forward one observation at a time. A 20-day SMA on a given date equals the average of the 20 most recent closing prices. Its primary limitation is that it weights an observation from 20 days ago equally with yesterday's close—a property that can cause whipsaw signals when a single outlier observation eventually rolls off the window. The exponential moving average (EMA) addresses this by applying a decay factor (typically 2/(N+1)) that weights recent prices more heavily, making it more responsive to current market conditions while still incorporating historical data.
Moving average crossover strategies use two MAs with different lookback periods to generate trade signals: a 'golden cross' occurs when the shorter MA crosses above the longer MA, signaling a bullish trend reversal; a 'death cross' occurs when the shorter MA crosses below the longer MA, signaling bearish momentum. The most institutionally watched crossover is the 50-day SMA crossing the 200-day SMA. Academic research has shown that while MA crossovers earn positive returns over long historical periods in equity and commodity markets, the profitability has diminished significantly since the 1990s as algorithmic trading has arbitraged away simple trend-following patterns.
Moving average envelopes and Bollinger Bands extend the concept by adding bands at fixed percentage distances (envelopes) or standard deviation multiples (Bollinger Bands) above and below the moving average, creating dynamic support and resistance zones that adapt to volatility. When price reaches the upper Bollinger Band, it is statistically elevated; when at the lower band, statistically depressed—though mean reversion from these extremes is not guaranteed in trending markets.
In quantitative trading, the MACD (Moving Average Convergence Divergence) indicator computes the difference between a 12-period EMA and a 26-period EMA, with a 9-period 'signal line' EMA of the MACD itself. Crossovers of the MACD line and signal line, and divergences between MACD direction and price action, are used as momentum signals in systematic strategies. Despite their apparent simplicity, moving average-based systems remain in use at quantitative hedge funds as components of diversified trend-following portfolios.
Formula
SMA_N = (P_1 + P_2 + ... + P_N) / N; EMA_t = P_t × (2/(N+1)) + EMA_{t-1} × (1 - 2/(N+1))
Example
A systematic CTA fund uses a 50-day/200-day SMA crossover system on the S&P 500 futures. On March 26, 2020, following the COVID-19 market crash, the 50-day SMA crossed below the 200-day SMA (death cross), generating a sell signal when the index was trading at approximately 2,630. The subsequent recovery saw the 50-day SMA cross back above the 200-day SMA (golden cross) on July 6, 2020 at approximately 3,130—a 19% later re-entry versus the death cross exit price. While the fund missed the early rebound, the MA system kept it out of the deepest portion of the drawdown. The fund's backtested statistics show the 50/200 crossover on S&P futures delivered a Sharpe ratio of 0.45 over 1990-2023 with a maximum drawdown of 18%, compared to a buy-and-hold Sharpe of 0.52 with a 55% drawdown.
Related terms
Algorithmic Trading Bollinger Bands Breakdown Charting Convergence Cup And Handle Pattern Double Bottom Pattern Drawdown Equity Exponential Moving Average Maximum Drawdown Mean Reversion