Techniquecore
Box-Jenkins method
Also called Box-Jenkins approach.
The cycle of identifying an ARIMA model from the ACF and PACF, estimating it, and checking its residuals, repeated until the residuals look like white noise.
The Box-Jenkins method builds an ARIMA model for a time series by a loop of three stages: identification, estimation and diagnostic checking. Identification transforms and differences the series until it looks stationary, and then reads tentative orders from the sample autocorrelation and partial autocorrelation functions. Estimation fits the candidate models, usually by Gaussian maximum likelihood. Diagnostic checking asks whether the residuals look like white noise, with the residual autocorrelations and the Ljung-Box test. If a check fails, the residuals suggest a better model and the loop starts again. The final model gives forecasts with intervals. Box and Jenkins (1970) set out the method and its principle of parsimony: use the fewest parameters that describe the data adequately. It is a procedure for model building, not an algorithm with a guarantee, and different analysts can reach different adequate models.
In plain words
You have a series and want a simple model that explains how each value depends on the past. First make the series steady: take logs if the swings grow with the level, and take differences if it wanders without a fixed level. Then look at two plots that show how the steady series is related to its own past, and match their shapes against the known shapes of simple models. Fit the few models that match. Look at what each model leaves unexplained. If the leftovers still show a pattern, the model missed something, and the pattern tells you what to add. Stop when the leftovers look like pure noise, and prefer the simplest model that passes.
When it applies
- The series is equally spaced, without long gaps, and long enough: a common rule asks for at least about 50 observations, and more for seasonal models.
- After a transformation and differences, the series is plausibly stationary and linear, so an ARMA model can describe it.
- The goal is short-term forecasting or a compact description of the dependence. For forecasting many series automatically, an automatic version of the loop or exponential smoothing is more practical.
- The method does not handle structural breaks, outliers, changing variance or nonlinear dynamics by itself. Each needs its own model term or a different model.
The template
The data are . The holes are the transformation T, the differencing rule D, the identification rule IDENT, the estimator FIT, the diagnostic checks CHECK and the final choice SELECT.
BOX-JENKINS(x[1..n], T, D, IDENT, FIT, CHECK, SELECT)- 1
y ← T(x) ▷ log or Box-Cox, to make the variance steady - 2
(d, D_s) ← D(y); w ← (1 - B)^d (1 - B^s)^{D_s} y ▷ difference until the ACF dies out quickly - 3
C ← IDENT(ACF and PACF of w) ▷ a few candidate orders (p, q), with or without a constant - 4
for each (p, q) ∈ C do M[p, q] ← FIT(w, p, q) ▷ Gaussian ML, or conditional least squares - 5
A ← {M[p, q] that pass CHECK} ▷ residual ACF, Ljung-Box with h - p - q df, overfitting - 6
if A = ∅ then revise C from the residual ACF and PACF, and go to L4 - 7
M* ← SELECT(A) ▷ the most parsimonious, or the smallest AIC - 8
return M* and forecasts of x with intervals ▷ undo the differencing and T
Identification patterns. For a stationary series, the theoretical ACF and PACF have these shapes:
| model | ACF | PACF |
|---|---|---|
| AR() | tails off (a mix of decaying exponentials and damped sine waves) | 0 after lag |
| MA() | 0 after lag | tails off |
| ARMA(, ), | tails off after lag | tails off after lag |
A cut-off is judged against bands. Beyond lag , the sample PACF of an AR() process is about , so the bands are . Beyond lag , the sample ACF of an MA() process has variance about by Bartlett's formula, so its bands are wider than . A mixed ARMA model has no cut-off in either function, and its orders are hard to read from the plots. Then fit a few small models and compare them with a criterion such as the AIC.
Differencing. A sample ACF that starts near 1 and decays slowly and almost linearly suggests a unit root, so difference once. A unit-root test such as the augmented Dickey-Fuller test or the KPSS test makes the choice of more formal. A lag-1 autocorrelation of the differences near suggests too much differencing.
Estimation. Exact Gaussian maximum likelihood, computed with the innovations algorithm or a Kalman filter, is the standard. Preliminary estimates come from the Yule-Walker equations for AR models, from the innovations algorithm for MA models, and from the Hannan-Rissanen regression for mixed models. The fitted model should be causal and invertible, and the standard errors from the information matrix show which coefficients are needed.
Diagnostic checking. If the model is right, the residuals are approximately white noise. Check (1) the residual ACF against , remembering that the bands are too wide at small lags for residuals; (2) the Ljung-Box statistic with degrees of freedom; (3) overfitting, that is adding one AR or one MA term and checking that it is not significant and that the other estimates do not change much; (4) a plot of the residuals over time, and a normal quantile plot if normal forecast intervals will be used.
Classic examples
- A simulated ARIMA(1, 1, 0) series. 200 values were generated with , (seed 7). This walk-through shows each stage.
-
Identification. The ACF of the levels is 0.989 at lag 1 and still 0.799 at lag 10, the slow decay of a nonstationary series. For the differences, the band is .
lag 1 2 3 4 5 6 7 8 9 10 ACF of differences 0.585 0.346 0.235 0.113 0.037 0.004 -0.020 -0.043 0.050 0.022 PACF of differences 0.585 0.006 0.047 -0.067 -0.022 -0.005 -0.015 -0.024 0.140 -0.079 The ACF tails off and the PACF cuts off after lag 1, which points to AR(1) for the differences. The PACF at lag 9 is just outside the band, but one value in ten outside a 95% band is expected by chance, and lag 9 has no meaning for this series. The mean of the differences is 0.150 with a standard error of 0.162 (allowing for the autocorrelation), , so the model has no drift.
-
Estimation and checking. The models were fitted by Yule-Walker to the differences with mean 0. For a pure AR model this is close to maximum likelihood. The criterion is .
model for the differences estimates Ljung-Box , df p-value criterion white noise 1.384 108.57 10 64.68 AR(1) (se 0.0571) 0.8988 7.848 9 0.550 -19.24 AR(2) 0.8987 7.762 8 0.457 -17.26 White noise fails the check. AR(1) passes. The overfitted AR(2) adds a coefficient of 0.012, far below its standard error of about 0.07, and does not change much or lower . So the chosen model is ARIMA(1, 1, 0) with , close to the true 0.6.
-
Forecasting. The last level is and the last difference . The forecasts of the levels for 1 to 5 steps ahead are 29.624, 29.375, 29.228, 29.140 and 29.089, and they approach . The forecast standard errors with are 0.948, 1.782 and 2.563 for 1, 2 and 3 steps. They grow without limit, as they must for an integrated model.
-
- The airline model. Box and Jenkins modelled the logarithm of monthly international airline passenger numbers, 1949 to 1960. After the differences , they chose , now called the airline model. The theoretical ACF of the differenced series is nonzero only at lags 1, 11, 12 and 13, so a sample ACF with spikes at these lags points to it. With two parameters it fits many monthly series with trend and seasonality.
- Exponential smoothing as a special case. If identification gives ARIMA(0, 1, 1), the forecasts are an exponentially weighted moving average of the past values. The loop thus explains when this common rule is the optimal linear forecast.
Variations
- Information criteria in place of pattern reading. Fit all models with a small bound and choose by AIC, AICc or BIC. This is easier to automate and often agrees with the ACF and PACF patterns. Compare criteria only between models with the same , because differencing changes the data.
- Automatic ARIMA. Programs choose by unit-root tests and then search over and the seasonal orders by a criterion, with checks on the residuals (for example the stepwise search of Hyndman and Khandakar, 2008). They make the loop practical for thousands of series.
- Extended identification tools. The extended sample autocorrelation function and the corner method help to read mixed ARMA orders, where neither the ACF nor the PACF cuts off.
- Transfer function models. Box and Jenkins extended the same loop to a series driven by an input series, with prewhitening of the input to identify the transfer function. This is the time series form of the ARMAX model.
- Seasonal adjustment programs. X-13ARIMA-SEATS and TRAMO-SEATS fit a seasonal ARIMA model inside a decomposition, and use it to extend the series before filtering.
Pitfalls
- Too much differencing. Differencing a stationary series introduces an MA unit root. For white noise, has and a larger variance than . A lag-1 autocorrelation near and an estimated MA coefficient near are the signs.
- Too little differencing. A slowly decaying ACF fitted with a stationary AR model gives a root near 1, poor intervals, and forecasts that return to the mean too fast.
- Reading the plots too closely. With 20 lags and 95% bands, about one value falls outside by chance. A single isolated spike at a lag with no meaning is usually noise.
- Common factors. ARMA(, ) can fit as well as ARMA(, ) with an AR and an MA root that almost cancel. The estimates are then unstable and have huge standard errors. Prefer the smaller model.
- Model uncertainty. The forecast intervals are computed as if the chosen model were true. After a search over many models, they are too narrow.
- Back-transforming forecasts. If the model is for , then of the forecast is the median of , not its mean. The mean needs a correction such as under normality.
- Drift with . A constant in a model for differences is a deterministic trend in the levels. Include it only if the mean of the differences is clearly not 0, as tested in the example.
Exercises
- Show that differencing white noise gives an MA(1) process with , , and twice the variance.
- For ARIMA(1, 1, 0), show that the weights of the levels are , and that the -step forecast variance grows linearly in for large .
- For the example, show that the forecasts of the levels converge to , where is the last difference.
- Explain why the AIC of a model for cannot be compared with the AIC of a model for .
References
- George E. P. Box and Gwilym M. Jenkins, Time Series Analysis: Forecasting and Control, Holden-Day, 1970, the iterative cycle of model identification, estimation and diagnostic checking (the first edition)
- George E. P. Box, Gwilym M. Jenkins, Gregory C. Reinsel and Greta M. Ljung, Time Series Analysis: Forecasting and Control, fifth edition, Wiley, 2015, Part II (stochastic model building, with the chapters on identification, estimation and diagnostic checking) and the chapter on seasonal models
- Peter J. Brockwell and Richard A. Davis, Time Series: Theory and Methods, second edition, Springer, 1991, Section 9.2 (identification techniques, p. 284), Section 9.3 (order selection, p. 301) and Section 9.4 (diagnostic checking, pp. 306 to 313)
- Peter J. Brockwell and Richard A. Davis, Introduction to Time Series and Forecasting, third edition, Springer, 2016, Section 5.1 (preliminary estimation, with the innovations method in Section 5.1.3, p. 132, and the Hannan-Rissanen algorithm in Section 5.1.4, p. 137), Section 5.2 (maximum likelihood, p. 139), Section 5.3 (diagnostic checking, p. 144) and Section 5.5 (order selection, p. 149)
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W3 standard |
|
Tag ZCWDR4 Edit this page History Report an error Markdown