Algorithm Search⌘K

Modelcore

ARIMA model

Also called autoregressive integrated moving average, ARIMA(p, d, q) model.

An ARMA model for the series differenced d times, used for series with stochastic trends. Seasonal ARIMA adds seasonal differences and lags.

An ARIMA(pp, dd, qq) model says that a time series becomes a stationary ARMA(pp, qq) process after it is differenced dd times. The differences remove a stochastic trend: a series that wanders like a random walk has stationary changes, and the model describes those changes. The "I" stands for integrated, because the original series is the dd-fold sum of a stationary series. For d≥1d \ge 1 the process is not stationary, its forecast intervals widen without limit, and its forecasts follow the last level, not a fixed mean. Familiar forecasting rules are ARIMA models: the random walk is ARIMA(0, 1, 0), and exponential smoothing is the optimal forecast for ARIMA(0, 1, 1). Seasonal ARIMA (SARIMA) adds differences and ARMA terms at the seasonal lag ss.

The machine

Notation. BB is the backshift operator and ∇=1−B\nabla = 1 - B the difference operator, so ∇Xt=Xt−Xt−1\nabla X_t = X_t - X_{t-1} and ∇2Xt=Xt−2Xt−1+Xt−2\nabla^2 X_t = X_t - 2X_{t-1} + X_{t-2}. ϕ(z)\phi(z) and θ(z)\theta(z) are as on the ARMA model page, and {εt}∼WN(0,σ2)\{\varepsilon_t\} \sim \mathrm{WN}(0, \sigma^2).

Definition. For an integer d≥0d \ge 0, {Xt}\{X_t\} is an ARIMA(pp, dd, qq) process if Yt=∇dXtY_t = \nabla^d X_t is a causal ARMA(pp, qq) process:

ϕ(B)(1−B)dXt=θ(B)εt,\phi(B)(1 - B)^d X_t = \theta(B)\varepsilon_t,

possibly with a constant cc on the right, so that YtY_t has mean μ=c/ϕ(1)\mu = c/\phi(1). The autoregressive polynomial ϕ∗(z)=ϕ(z)(1−z)d\phi^*(z) = \phi(z)(1 - z)^d has a root of multiplicity dd at z=1z = 1, on the unit circle. So the ARMA theory gives no stationary solution, and the model is completed by a condition on the start: X1−d,…,X0X_{1-d}, \ldots, X_0 are uncorrelated with {Yt:t≥1}\{Y_t : t \ge 1\} (Brockwell and Davis 1991, Section 9.1). Then XtX_t for t≥1t \ge 1 is X0X_0 plus a sum of YY values when d=1d = 1, and a repeated sum when d≥2d \ge 2.

Parameters. ϕ\phi and θ\theta in the causal and invertible region, σ2\sigma^2, the order dd, and optionally the drift μ\mu. The orders (p,d,q)(p, d, q) are chosen from the data.

What differencing removes.

  • A random walk Xt=Xt−1+εtX_t = X_{t-1} + \varepsilon_t is ARIMA(0, 1, 0). Given X0X_0, Var⁡(Xt)=tσ2\operatorname{Var}(X_t) = t\sigma^2, which grows without bound.
  • A drift μ≠0\mu \ne 0 in ∇Xt\nabla X_t gives a linear trend of slope μ\mu in XtX_t, and with d=2d = 2 it gives a quadratic trend.
  • A deterministic linear trend plus stationary noise, Xt=a+bt+ZtX_t = a + bt + Z_t, also becomes stationary after one difference, but ∇Zt\nabla Z_t then has a moving-average unit root. The two models give different forecast intervals. Tests such as the augmented Dickey-Fuller test and the KPSS test try to tell them apart.

Seasonal ARIMA. With period ss (12 for monthly data), the SARIMA(p,d,q)×(P,D,Q)s(p, d, q) \times (P, D, Q)_s model is

ϕ(B) Φ(Bs) (1−B)d(1−Bs)DXt=θ(B) Θ(Bs) εt,\phi(B)\, \Phi(B^s)\, (1 - B)^d (1 - B^s)^D X_t = \theta(B)\, \Theta(B^s)\, \varepsilon_t,

where Φ\Phi and Θ\Theta are polynomials of degree PP and QQ. The airline model of Box and Jenkins is (0,1,1)×(0,1,1)12(0, 1, 1) \times (0, 1, 1)_{12}, usually for the logarithm of the series: (1−B)(1−B12)Xt=(1+θB)(1+ΘB12)εt(1 - B)(1 - B^{12}) X_t = (1 + \theta B)(1 + \Theta B^{12}) \varepsilon_t. It has two parameters besides σ2\sigma^2 and fits many monthly series with trend and seasonality.

What it counts

The parameters are those of the ARMA model for Y=∇dXY = \nabla^d X, plus dd. The main quantities are the forecasts and their error variances.

quantity formula cost
differenced series Yt=∇dXtY_t = \nabla^d X_t for t=d+1,…,nt = d + 1, \ldots, n O(nd)O(nd)
ARMA quantities of YY as on the ARMA model page as there
ψ∗\psi^* weights coefficients of θ(z)/(ϕ(z)(1−z)d)\theta(z)/(\phi(z)(1 - z)^d), by the ARMA recursion with ϕ∗\phi^* O(p+d+q)O(p + d + q) per weight
hh-step forecast the ARMA forecasts of Yn+1,…,Yn+hY_{n+1}, \ldots, Y_{n+h}, then summed back (undifferenced) from the last dd observed levels O(h(p+d+q))O(h(p + d + q)) after the ARMA forecasts
its error variance, for large nn σ2∑j=0h−1(ψj∗)2\sigma^2 \sum_{j=0}^{h-1} (\psi^*_j)^2 O(h)O(h)
Gaussian likelihood the ARMA likelihood of Yd+1,…,YnY_{d+1}, \ldots, Y_n, conditional on the first dd values as for ARMA

Forecast errors grow. The weights ψj∗\psi^*_j do not tend to 0. For ARIMA(1, 1, 0) with ϕ=0.6\phi = 0.6 and σ2=1\sigma^2 = 1, ψ∗=1,1.6,1.96,2.176,2.306,…→1/(1−ϕ)=2.5\psi^* = 1, 1.6, 1.96, 2.176, 2.306, \ldots \to 1/(1 - \phi) = 2.5, so the forecast standard errors at h=1,2,3h = 1, 2, 3 are 11, 1+2.56=1.887\sqrt{1 + 2.56} = 1.887 and 1+2.56+3.8416=2.721\sqrt{1 + 2.56 + 3.8416} = 2.721, and they grow like 2.5h2.5\sqrt{h}. For ARIMA(0, 2, 0), ψj∗=j+1\psi^*_j = j + 1 and the variance is σ2h(h+1)(2h+1)/6\sigma^2 h(h + 1)(2h + 1)/6, so the standard error grows like h3/2h^{3/2}. For a stationary ARMA model it would converge to γ(0)\sqrt{\gamma(0)}.

Exponential smoothing. For ARIMA(0, 1, 1), Xt−Xt−1=εt+θεt−1X_t - X_{t-1} = \varepsilon_t + \theta \varepsilon_{t-1} with −1<θ<0-1 < \theta < 0. The one-step forecast is X^t+1=Xt+θεt\hat X_{t+1} = X_t + \theta \varepsilon_t, and εt=Xt−X^t\varepsilon_t = X_t - \hat X_t, so

X^t+1=(1+θ)Xt−θX^t=αXt+(1−α)X^t,α=1+θ.\hat X_{t+1} = (1 + \theta) X_t - \theta \hat X_t = \alpha X_t + (1 - \alpha)\hat X_t, \qquad \alpha = 1 + \theta.

This is the exponential moving average. By hand, with θ=−0.7\theta = -0.7 (α=0.3\alpha = 0.3), data X1,…,X4=10,12,11,15X_1, \ldots, X_4 = 10, 12, 11, 15 and start X^1=10\hat X_1 = 10: X^2=10\hat X_2 = 10, X^3=0.3×12+0.7×10=10.6\hat X_3 = 0.3 \times 12 + 0.7 \times 10 = 10.6, X^4=0.3×11+0.7×10.6=10.72\hat X_4 = 0.3 \times 11 + 0.7 \times 10.6 = 10.72 and X^5=0.3×15+0.7×10.72=12.004\hat X_5 = 0.3 \times 15 + 0.7 \times 10.72 = 12.004. Every forecast X^4+h\hat X_{4+h}, h≥1h \ge 1, is 12.00412.004.

Relation to other models

  • ARMA model. ARIMA(pp, 0, qq) is ARMA(pp, qq). An ARIMA model with d≥1d \ge 1 is an ARMA equation whose AR polynomial has a unit root.
  • Moving-average model. Differencing a stationary series once too often gives an MA part with a root on the unit circle: the difference of white noise is MA(1) with θ=−1\theta = -1 and lag-1 autocorrelation −0.5-0.5.
  • Exponential smoothing and Holt-Winters. Simple exponential smoothing is optimal for ARIMA(0, 1, 1), and Holt's linear method is optimal for ARIMA(0, 2, 2). The additive Holt-Winters method corresponds to a seasonal ARIMA model.
  • State-space model. ARIMA models have state space forms, and the Kalman filter handles the nonstationary start with a diffuse prior on the first dd levels.
  • Fractional differencing. ARFIMA models allow a noninteger dd. For −1/2<d<1/2-1/2 < d < 1/2 the process is stationary, and for 0<d<1/20 < d < 1/2 its autocorrelations decay like a power of the lag (long memory), not geometrically.
  • STL decomposition. A nonparametric alternative that removes trend and seasonality by smoothing, not by differencing.

Known results in the model

  • Fitting. Choose dd, difference, then fit an ARMA model to YY by maximum likelihood. The estimates of ϕ\phi and θ\theta have the ARMA limit distribution, because YY is a causal invertible ARMA process. The Box-Jenkins method is the full identify, estimate and check cycle.
  • Choosing dd. A sample autocorrelation that decays slowly and almost linearly suggests a unit root. Unit root tests give a formal check, but they have low power against roots near 1. In practice dd is 0, 1 or 2.
  • Over-differencing has a cost. If dd is one too large, the MA part has a unit root, the model is not invertible, and the maximum likelihood estimate of θ\theta can fall on the boundary θ=−1\theta = -1 with positive probability in finite samples. A lag-1 sample autocorrelation near −0.5-0.5 after differencing is the usual sign.
  • Forecasts. With d=1d = 1 and no drift, the forecasts converge to a constant level that depends on the last observations. With a drift they follow a line. The error variance grows linearly in hh for d=1d = 1 and like h3h^3 for d=2d = 2, so long-range intervals are very wide.
  • Transformations. A logarithm or another Box-Cox transformation before differencing often makes the variance of the differences constant. Forecasts on the original scale then need a bias correction.

References

  1. George E. P. Box and Gwilym M. Jenkins, Time Series Analysis: Forecasting and Control, Holden-Day, 1970, the integrated models, their forecasts and the seasonal models (the first edition)
  2. 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 I (nonstationary models and forecasting) and the chapter on seasonal models (the airline model)
  3. Peter J. Brockwell and Richard A. Davis, Time Series: Theory and Methods, second edition, Springer, 1991, Section 9.1 (ARIMA models for nonstationary series, p. 274), Section 9.5 (forecasting ARIMA models, p. 314) and Section 9.6 (seasonal ARIMA models, pp. 320 to 325)
  4. Peter J. Brockwell and Richard A. Davis, Introduction to Time Series and Forecasting, third edition, Springer, 2016, Section 6.1 (ARIMA models, p. 158), Section 6.3 (unit roots, p. 169), Section 6.4 (forecasting, p. 173) and Section 6.5 (seasonal ARIMA, p. 177)

Where this leads

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.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/W6NWDC/text.yaml