Algorithm Search⌘K

Modelintro

Moving-average model

Also called MA model, MA(q) process.

A model in which each value is a linear combination of the current and previous q white noise terms. Its autocorrelation is zero beyond lag q.

A moving-average model of order qq, written MA(qq), says that each value of a time series is a weighted sum of the current white noise shock and the qq shocks before it: Xt=εt+θ1εt−1+⋯+θqεt−qX_t = \varepsilon_t + \theta_1 \varepsilon_{t-1} + \cdots + \theta_q \varepsilon_{t-q}. Every MA(qq) process is stationary, whatever its coefficients, and two values more than qq steps apart are uncorrelated. That cutoff in the autocorrelation is how the model is recognized in data. The model is invertible, so that the shocks can be recovered from the past of the series, when the roots of θ(z)=1+θ1z+⋯+θqzq\theta(z) = 1 + \theta_1 z + \cdots + \theta_q z^q lie outside the unit circle. The Wold decomposition shows that a regular stationary process is an MA(∞\infty) process, so finite MA models are a natural first approximation. The name has nothing to do with the moving average used to smooth data, except that both are weighted sums over a window.

The machine

Notation. {εt}∼WN(0,σ2)\{\varepsilon_t\} \sim \mathrm{WN}(0, \sigma^2) is white noise, BB is the backshift operator, and θ0=1\theta_0 = 1.

Definition. {Xt}\{X_t\} is an MA(qq) process with mean μ\mu if

Xt=μ+∑j=0qθjεt−j=μ+θ(B)εt,X_t = \mu + \sum_{j=0}^{q} \theta_j \varepsilon_{t-j} = \mu + \theta(B)\varepsilon_t,

with θq≠0\theta_q \ne 0. The parameters are θ=(θ1,…,θq)∈Rq\theta = (\theta_1, \ldots, \theta_q) \in \mathbb{R}^q, σ2>0\sigma^2 > 0 and μ\mu.

Stationarity. No condition is needed. E[Xt]=μ\mathbb{E}[X_t] = \mu, and

γ(h)=σ2∑j=0q−∣h∣θjθj+∣h∣for ∣h∣≤q,γ(h)=0for ∣h∣>q.\gamma(h) = \sigma^2 \sum_{j=0}^{q - |h|} \theta_j \theta_{j + |h|} \quad \text{for } |h| \le q, \qquad \gamma(h) = 0 \quad \text{for } |h| > q.

Neither depends on tt. If the noise is IID, the process is also strictly stationary and qq-dependent: blocks more than qq apart are independent.

Invertibility. The process is invertible, εt=∑j≥0πj(Xt−j−μ)\varepsilon_t = \sum_{j \ge 0} \pi_j (X_{t-j} - \mu) with ∑j∣πj∣<∞\sum_j |\pi_j| < \infty, if and only if every root of θ(z)\theta(z) satisfies ∣z∣>1|z| > 1 (Brockwell and Davis 1991, Section 3.1). The weights solve π(z)=1/θ(z)\pi(z) = 1/\theta(z). For MA(1), πj=(−θ)j\pi_j = (-\theta)^j.

Identifiability. Without invertibility the parameters are not identified from the autocovariance. For MA(1), θ\theta with noise variance σ2\sigma^2 and 1/θ1/\theta with noise variance θ2σ2\theta^2 \sigma^2 give the same γ\gamma: with θ=0.5\theta = 0.5 and σ2=1\sigma^2 = 1, and with θ=2\theta = 2 and σ2=0.25\sigma^2 = 0.25, both have γ(0)=1.25\gamma(0) = 1.25 and γ(1)=0.5\gamma(1) = 0.5. In general, a root zz of θ\theta can be replaced by 1/zˉ1/\bar z with a change of σ2\sigma^2, which gives up to 2q2^q models with one autocovariance. The usual convention picks the invertible one. When θ\theta has no roots inside the unit circle, the MA noise is the Wold innovation of XX.

A hand example. Let θ1=0.5\theta_1 = 0.5, μ=0\mu = 0 and shocks ε1,…,ε6=1,−2,0,3,−1,2\varepsilon_1, \ldots, \varepsilon_6 = 1, -2, 0, 3, -1, 2. Then X2,…,X6=−1.5,−1,3,0.5,1.5X_2, \ldots, X_6 = -1.5, -1, 3, 0.5, 1.5, for example X4=3+0.5×0=3X_4 = 3 + 0.5 \times 0 = 3. Here ρ(1)=0.5/1.25=0.4\rho(1) = 0.5/1.25 = 0.4 and ρ(h)=0\rho(h) = 0 for h≥2h \ge 2. For MA(2) with θ=(0.4,0.2)\theta = (0.4, 0.2) and σ2=1\sigma^2 = 1: γ(0)=1.2\gamma(0) = 1.2, γ(1)=0.4+0.4×0.2=0.48\gamma(1) = 0.4 + 0.4 \times 0.2 = 0.48, γ(2)=0.2\gamma(2) = 0.2, so ρ=1,0.4,0.1667,0,0,…\rho = 1, 0.4, 0.1667, 0, 0, \ldots

What it counts

quantity formula cost from the parameters
autocovariance the sum above; 0 after lag qq O(q)O(q) per lag
π\pi weights π0=1\pi_0 = 1, πj=−∑i=1min⁡(j,q)θiπj−i\pi_j = -\sum_{i=1}^{\min(j, q)} \theta_i \pi_{j-i} O(q)O(q) per weight
partial autocorrelation does not cut off; for MA(1), ϕhh=−(−θ)h(1−θ2)/(1−θ2(h+1))\phi_{hh} = -(-\theta)^h (1 - \theta^2)/(1 - \theta^{2(h+1)}) O(h2)O(h^2) by Durbin-Levinson
spectral density f(λ)=σ22π∣θ(e−iλ)∣2f(\lambda) = \dfrac{\sigma^2}{2\pi} \lvert \theta(e^{-i\lambda}) \rvert^2 O(q)O(q) per frequency
hh-step forecast from the infinite past μ+∑j=hqθjεn+h−j\mu + \sum_{j=h}^{q} \theta_j \varepsilon_{n+h-j}; equal to μ\mu for h>qh > q O(q)O(q)
its error variance σ2∑j=0min⁡(h,q+1)−1θj2\sigma^2 \sum_{j=0}^{\min(h, q+1) - 1} \theta_j^2; equal to γ(0)\gamma(0) for h>qh > q O(q)O(q)
exact Gaussian likelihood and finite-sample forecasts the innovations algorithm with the banded autocovariance O(nq2)O(n q^2)

For MA(1) with θ=0.5\theta = 0.5, the partial autocorrelations are 0.4,−0.1905,0.0941,−0.0469,…0.4, -0.1905, 0.0941, -0.0469, \ldots: they alternate in sign and decay like θh\theta^h. This is the mirror image of an AR(1) process, whose autocorrelation decays and whose partial autocorrelation cuts off.

Relation to other models

  • Autoregressive model. An invertible MA(qq) is an AR(∞\infty) with weights −πj-\pi_j, and a causal AR(pp) is an MA(∞\infty). An AR approximation of an MA process needs many lags when a root of θ\theta is near the unit circle.
  • ARMA model. MA(qq) is ARMA(0, qq).
  • Linear process. The MA(∞\infty) process Xt=∑jψjεt−jX_t = \sum_j \psi_j \varepsilon_{t-j} with ∑j∣ψj∣<∞\sum_j |\psi_j| < \infty is the general causal linear process. Finite MA models are its truncations, and the Wold decomposition theorem says that every regular stationary process has this form with ∑jψj2<∞\sum_j \psi_j^2 < \infty.
  • Over-differencing. If XtX_t is white noise, then ∇Xt=Xt−Xt−1\nabla X_t = X_t - X_{t-1} is MA(1) with θ=−1\theta = -1 and ρ(1)=−0.5\rho(1) = -0.5. This MA is not invertible. A sample autocorrelation near −0.5-0.5 at lag 1 after differencing is a sign that the ARIMA model differences once too often.
  • FIR filters. In signal processing an MA filter is a finite impulse response filter applied to white noise. The ARMAX model in system identification uses an MA part for the noise.

Known results in the model

  • Characterization by the autocovariance. A stationary process whose autocovariance is zero after lag qq is an MA(qq) process: there is a white noise {Zt}\{Z_t\} and coefficients with Xt−μ=θ(B)ZtX_t - \mu = \theta(B) Z_t, and θ\theta can be chosen with no roots inside the unit circle (Brockwell and Davis 1991, Section 3.2). So the autocovariance cutoff is both necessary and sufficient.
  • Bounds on the autocorrelation. For MA(1), ρ(1)=θ/(1+θ2)\rho(1) = \theta/(1 + \theta^2), so ∣ρ(1)∣≤1/2|\rho(1)| \le 1/2, with equality only at θ=±1\theta = \pm 1. A sample value outside [−1/2,1/2][-1/2, 1/2] means that MA(1) does not fit, or that the sample is small.
  • Bartlett's formula. For IID noise and lags h>qh > q, the sample autocorrelation ρ^(h)\hat\rho(h) is approximately normal with mean 0 and variance 1n(1+2∑k=1qρ(k)2)\frac{1}{n}\left(1 + 2\sum_{k=1}^{q} \rho(k)^2\right) (Brockwell and Davis 1991, Section 7.2). The usual identification bounds use this variance, not 1/n1/n.
  • Estimation is nonlinear. The moment equation ρ^(1)=θ/(1+θ2)\hat\rho(1) = \theta/(1 + \theta^2) for MA(1) has an invertible solution only if ∣ρ^(1)∣≤1/2|\hat\rho(1)| \le 1/2. By the delta method and Bartlett's formula, this moment estimator has asymptotic variance 1+θ2+4θ4+θ6+θ8n(1−θ2)2\frac{1 + \theta^2 + 4\theta^4 + \theta^6 + \theta^8}{n(1 - \theta^2)^2}, against (1−θ2)/n(1 - \theta^2)/n for the Gaussian maximum likelihood estimator. At θ=0.5\theta = 0.5 these are 2.70/n2.70/n and 0.75/n0.75/n, so the moment estimator needs about 3.6 times as many observations. The innovations algorithm gives consistent preliminary estimates (Brockwell and Davis 1991, Section 8.3), and the maximum likelihood estimate refines them.
  • Exact likelihood. The Gaussian likelihood of X1,…,XnX_1, \ldots, X_n is computed exactly by the innovations algorithm in O(nq2)O(nq^2) operations, or by the Kalman filter on a state space form with a state of dimension q+1q + 1.
  • Slutsky effect. Repeated moving sums and differences of white noise give MA processes whose spectral density has a sharp peak, so the series look as if they had a period that is not there. This was Slutsky's explanation of business cycles.

References

  1. Eugen Slutzky, The summation of random causes as the source of cyclic processes, Econometrica 5(2), 1937, pp. 105 to 146 (moving sums of random series and the cycles they produce)
  2. Peter J. Brockwell and Richard A. Davis, Time Series: Theory and Methods, second edition, Springer, 1991, Section 3.1 (causality and invertibility, pp. 77 to 88), Section 3.2 (MA processes and autocovariances that vanish after lag q, p. 89), Section 7.2 (Bartlett's formula, p. 220) and Section 8.3 (preliminary MA estimates by the innovations algorithm, p. 245)
  3. Peter J. Brockwell and Richard A. Davis, Introduction to Time Series and Forecasting, third edition, Springer, 2016, Section 2.2 (linear processes, p. 44), Section 3.1 (ARMA processes, p. 73) and Section 5.1.3 (the innovations algorithm for MA estimation, p. 132)
  4. James D. Hamilton, Time Series Analysis, Princeton University Press, 1994, Chapter 3 (moving average processes and invertibility, pp. 43 to 71)

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/7V2BCK/text.yaml