Moving average
A moving average replaces each value in a series with the mean of a fixed number of neighbouring values. The window slides forward one period at a time. It smooths random noise so that the level or trend is easier to see, and it can serve as a simple forecast.
What it is
A moving average is the mean of a fixed number of consecutive observations in a time series, recomputed as the window moves forward one period at a time. The result is a smoother series than the original. The NIST handbook calls this averaging process smoothing and describes the single moving average as the average of successive smaller sets of past values.
The formula for a trailing moving average is:
MA(t) = (y(t) + y(t-1) + … + y(t-N+1)) / N
- y(t): the observation in period t.
- N: the number of periods in the window, chosen by the analyst.
- MA(t): the moving average at period t.
The main types are:
- Trailing: uses the last N observations up to period t. It is the form used for a simple forecast of the next period.
- Centred: places the window around the period it describes. The NIST handbook notes that an odd window centres on a period, while an even window needs a second averaging with a window of two.
- Weighted: gives the observations in the window different weights.
Every observation in a simple window carries the same weight, 1/N. The NIST handbook contrasts this with exponential smoothing, in which newer observations count more.
Why it matters
Monthly or daily figures contain random movement that hides the level and the direction. A moving average shows the underlying movement without a fitted model, and it is easy to recompute and to explain.
The window length is a choice. A short window follows changes quickly and keeps more noise. A long window is smoother and reacts later.
Worked example
Illustrative numbers. Monthly sales over six months are 90, 120, 90, 150, 120 and 150. The window is three months.
- Months 1 to 3: (90 + 120 + 90) / 3 = 100.
- Months 2 to 4: (120 + 90 + 150) / 3 = 120.
- Months 3 to 5: (90 + 150 + 120) / 3 = 120.
- Months 4 to 6: (150 + 120 + 150) / 3 = 140.
The smoothed series 100, 120, 120, 140 rises steadily while the raw series jumps up and down. As a simple forecast, the next month is put at 140.
How to read it
A rising moving average indicates a rising level. The average lags the series, because it includes older values. A trailing average of a rising series sits below the last observations.
Assumptions
- The level of the series changes slowly relative to the window.
- The oldest observation in the window is as informative as the newest.
- Seasonal patterns are removed first, or the window spans a full seasonal cycle.
Who uses it
- FP&A analysts smooth monthly actuals to see the run rate before they set a baseline forecast.
- Commercial finance analysts smooth volume series that move sharply between months.
- Treasury analysts average daily cash flows to see a pattern.
- Economists and statisticians smooth series to show the movement of the level.
Common confusions
- A moving average is not an exponential smoothing. The first weights all observations in the window equally.
- A smoothed value is not an observation. Smoothing removes information.
- A moving average of a series with a trend lags that trend, so it does not forecast a turning point.
- A rolling average describes a window of history. A rolling forecast describes a forecast that is extended each period.