Forecasting
A central bank sets interest rates on a guess about next year's inflation. A warehouse stocks shelves on
a guess about next week's demand. A grid operator fires up a power station on a guess about this
afternoon's load. Every one of these is a forecast: a statement about the future values
x_{T+1}, x_{T+2}, \dots of a series, made from everything observed up to the
present time T. This page answers the sharpest possible version of the
question: given an ARMA model
and the data so far, what single number should I predict, and why that one?
The best forecast is the conditional expectation
Fix a target: we want the forecast \hat x_{T+h} that minimises the
mean squared error \mathbb E\big[(x_{T+h} - \hat x_{T+h})^2\big].
There is a clean, universal answer, and it does not depend on the model being ARMA at all:
- The forecast that minimises mean squared error is the
conditional expectation
given the past:
\hat x_{T+h} = \mathbb E\big[x_{T+h}\mid x_T, x_{T-1}, \dots\big].
- h is the forecast horizon — how many steps ahead we
look.
- No other function of the past does better under squared-error loss; the conditional mean is optimal,
full stop.
So "forecasting" reduces to "compute a conditional expectation". For an ARMA model that computation turns
into a tidy recipe you can run by hand.
The recipe: plug in the past, zero out the future
Take the model equation, write it for time T+h, and apply the conditional
expectation term by term. Three simple rules do all the work:
- Known past values x_T, x_{T-1}, \dots — leave them as they
are (we know them).
- Future values x_{T+1}, \dots, x_{T+h-1} — replace each with
its own forecast (recurse).
- Future shocks \varepsilon_{T+1}, \dots — replace with
0, their mean, since they are unpredictable; past shocks
become the model residuals we already estimated.
Applying this walking forward one step at a time — h = 1, then feeding that
into h = 2, and so on — generates the whole forecast function
\hat x_{T+h} recursively. It is the same substitution every time; only the
horizon grows.
Worked example — forecasting an AR(1)
Take the mean-zero model x_t = \phi\, x_{t-1} + \varepsilon_t and stand at time
T knowing x_T. Apply the recipe:
- One step: \hat x_{T+1} = \mathbb E[\phi x_T + \varepsilon_{T+1}\mid \text{past}] = \phi\, x_T
(the future shock zeroes out).
- Two steps: \hat x_{T+2} = \phi\, \hat x_{T+1} = \phi^2 x_T
(recurse on the one-step forecast).
- h steps: the pattern is immediate —
\hat x_{T+h} = \phi^{\,h}\, x_T.
With \phi = 0.6 and x_T = 10, the forecasts run
6,\ 3.6,\ 2.16,\ \dots — each a fixed fraction of the last, gliding back toward
zero. If the model carries a mean \mu, forecast the deviation and add it back:
\hat x_{T+h} = \mu + \phi^h (x_T - \mu).
Forecasts decay to the mean
Because |\phi| < 1 for a stationary series, \phi^h \to 0
and the forecast function slides smoothly to the unconditional mean as the horizon grows:
\hat x_{T+h} \to \mu. This is a general fact for any stationary ARMA —
the memory of the last observed value fades, and far enough out the best guess is simply "the long-run
average". The chart shows an observed series (solid) and its forecast path (the smooth curve) flattening to
the mean line: the further ahead you look, the less the present tells you, and the forecast admits it by
reverting to the mean.
The rate of the flattening is the persistence: a near-unit-root series
(\phi \approx 0.95) coasts back slowly over many steps, while a weakly dependent
one (\phi \approx 0.3) snaps to the mean almost at once. An MA(q) model is even
blunter — its forecast is exactly the mean for every horizon beyond q, because
the model has no memory past q lags.
Most real series are made stationary by differencing before an ARMA is fitted — you model
\nabla x_t = x_t - x_{t-1}, not x_t itself (this is
the "I" in ARIMA). The
classic blunder is to forecast the differenced series and then hand those numbers to your boss.
The differences are changes, not levels. You must integrate back: rebuild the level
forecasts by cumulatively summing,
\hat x_{T+h} = x_T + \sum_{j=1}^{h}\widehat{\nabla x}_{T+j}. Forget this step and
a forecast of "demand growth of +2 units" gets reported as "demand of 2 units" — off by the entire current
level. Whatever transformation you applied to reach stationarity (differencing, logs, seasonal
differencing), the forecast must travel back through its inverse before it means anything.
It looks anticlimactic — you feed a sophisticated model a rich history and it eventually shrugs and says
"the average". But that flatness is honesty, not laziness. Under squared-error loss the optimal
forecast is the conditional mean, and for a stationary process the conditional mean genuinely does converge
to the unconditional mean as information about the distant future decays to nothing. A confident,
non-flat long-horizon forecast would be the model lying about how much the present reveals about
next year. The interesting content lives at short horizons, where \phi^h is
still appreciable — and in the prediction
intervals, which keep widening even as the point forecast goes flat.