Moving average
Moving average is a statistical calculation that smooths time series data by creating a series of averages from different subsets of the full dataset, commonly used to identify trends, filter noise, and forecast future values (Hyndman R.J., Athanasopoulos G. 2021, p.72)[1]. January sales: 100. February: 150. March: 80. April: 120. The raw numbers jump around. But the 3-month moving average—110, 117, 117—reveals a more stable pattern. That's the power of the technique: transforming noisy data into something you can actually interpret.
The concept dates to at least the 1900s and became standard in technical analysis of stock prices. Moving averages appear on every trading platform and in every forecasting textbook. Meteorologists use them for weather trends. Economists apply them to GDP and employment data. Quality engineers track process variation with moving averages. The technique's simplicity makes it universally accessible while remaining genuinely useful.
Calculation
Moving averages involve straightforward arithmetic:
Simple moving average
Equal weighting. The simple moving average (SMA) calculates the arithmetic mean of the most recent n observations. A 3-period SMA averages the last three data points[2].
Rolling window. As new data arrives, the oldest observation drops out and the newest enters. The window "moves" through time.
Formula. SMA = (X₁ + X₂ + ... + Xₙ) / n, where n is the number of periods.
Weighted moving average
Differential importance. The weighted moving average assigns different weights to observations, typically giving more weight to recent data[3].
Declining weights. A 3-period WMA might weight the most recent period at 3, the previous at 2, and the oldest at 1, then divide by 6.
Exponential moving average
Geometric decay. The exponential moving average (EMA) applies exponentially decreasing weights to older observations. Recent data matters more, but all historical data contributes.
Smoothing factor. A smoothing constant α (between 0 and 1) determines how quickly old data's influence decays. Higher α means more weight on recent observations[4].
Applications
Moving averages serve multiple purposes:
Trend identification
Smoothing. Moving averages filter short-term fluctuations, revealing underlying trends hidden by noise.
Signal extraction. Separating trend from seasonality and irregular components enables better understanding of time series behavior.
Forecasting
Naive extension. The most recent moving average can serve as a forecast for future periods—a simple but often effective approach[5].
Foundation. More sophisticated forecasting methods like exponential smoothing build on moving average concepts.
Technical analysis
Price trends. Traders use moving averages to identify stock price trends. The 50-day and 200-day moving averages are particularly watched.
Crossover signals. When short-term moving averages cross above or below long-term averages, traders interpret this as buy or sell signals.
Quality control
Process monitoring. Moving averages help distinguish normal variation from significant process changes in statistical process control.
Selection considerations
Choosing parameters requires judgment:
Period length
Longer periods. More smoothing, slower response to changes, better for identifying long-term trends[6].
Shorter periods. Less smoothing, faster response, better for detecting recent changes but more noise.
Match to cycles. If data has seasonal cycles, using a period that matches the cycle length can effectively remove seasonality.
Centered versus trailing
Trailing average. Uses only past data—useful for forecasting because future values aren't available.
Centered average. Uses data on both sides of each point—provides better trend estimation but requires future data and introduces lag.
Limitations
Moving averages have weaknesses:
Lag. Moving averages respond slowly to changes. By the time a trend appears in the average, the actual data may have already moved further.
Equal weights. Simple moving averages weight old and new observations equally, which may not reflect reality[7].
Arbitrary parameters. The choice of period length is often arbitrary, yet significantly affects results.
Lost data points. The first n-1 periods have no moving average value, losing information at series beginnings.
Extreme sensitivity. When an extreme value enters or exits the window, the average can shift suddenly[8].
Related techniques
Moving averages connect to other methods:
Exponential smoothing. A family of forecasting methods that evolved from moving average concepts.
ARIMA models. Autoregressive integrated moving average models combine moving average components with autoregressive terms.
Bollinger bands. Technical analysis tool that places bands around a moving average based on standard deviations.
| Moving average — recommended articles |
| Forecasting — Time series analysis — Statistical process control — Technical analysis |
References
- Hyndman R.J., Athanasopoulos G. (2021), Forecasting: Principles and Practice, 3rd Edition, OTexts.
- Makridakis S., Wheelwright S.C., Hyndman R.J. (1998), Forecasting: Methods and Applications, 3rd Edition, Wiley.
- Murphy J.J. (1999), Technical Analysis of the Financial Markets, New York Institute of Finance.
- NIST (2023), Moving Average, Engineering Statistics Handbook.
Footnotes
- ↑ Hyndman R.J., Athanasopoulos G. (2021), Forecasting, p.72
- ↑ Makridakis S. et al. (1998), Forecasting, pp.89-102
- ↑ NIST (2023), Moving Average
- ↑ Murphy J.J. (1999), Technical Analysis, pp.195-210
- ↑ Hyndman R.J., Athanasopoulos G. (2021), Forecasting, pp.78-86
- ↑ Makridakis S. et al. (1998), Forecasting, pp.112-124
- ↑ Murphy J.J. (1999), Technical Analysis, pp.215-228
- ↑ NIST (2023), Moving Average Limitations
Author: Sławomir Wawak