Unit 2, lesson 14

Stationarity autocovariance and ARMA models

What weak stationarity and the autocovariance function are, how an AR(1) process gets its causal stationary representation and conditional forecast variance, when an ARMA model is stationary, and what a unit root changes.

  • Video 14
  • Time series, volatility and filtering

One model treats the spread between two interest rates as fluctuating around a fixed level, while another treats a log price as a random walk. The two choices give very different answers to a practical question, how uncertain the value is a month from now. This lesson defines weak stationarity and the autocovariance function, derives the causal stationary representation of an AR(1) process together with its autocovariances and its forecast variance, states the polynomial conditions for ARMA models, and shows why a unit root makes the stationary formulas fail.

Key terms

Weak stationarity

Definition Throughout, dates t∈Zt \in \mathbb{Z} are integers counting periods. A process (Xt)t∈Z(X_t)_{t \in \mathbb{Z}} with E[Xt2]<∞\mathbb{E}[X_t^2] < \infty for every tt is weakly stationary if its mean is constant and the covariance between two dates depends only on their distance, that is, for all t,h∈Zt, h \in \mathbb{Z},

E[Xt]=μ,Cov⁡(Xt,Xt−h)=γ(h),\begin{gathered} \mathbb{E}[X_t] = \mu, \\[0.4em] \operatorname{Cov}(X_t, X_{t-h}) = \gamma(h), \end{gathered}

with a constant μ\mu and a function γ\gamma that do not depend on tt. The process is strictly stationary if for every kk, all dates t1,…,tkt_1, \dots, t_k and every shift ss, the vector (Xt1+s,…,Xtk+s)(X_{t_1 + s}, \dots, X_{t_k + s}) has the same joint distribution as (Xt1,…,Xtk)(X_{t_1}, \dots, X_{t_k}). Strict stationarity together with finite second moments implies weak stationarity. The converse fails in general, but for a Gaussian process, whose finite-dimensional distributions are multivariate normal and therefore fixed by means and covariances, the two notions coincide. A strictly stationary process need not be weakly stationary, since its second moments may be infinite, as for independent standard Cauchy variables.

In plain words Weak stationarity is a property of the probability model, not of one observed path. It says that the mean, the variance and the covariance between any two dates a fixed distance apart are the same wherever the dates fall. A calm stretch of data does not prove it.

Example White noise with variance σε2\sigma_\varepsilon^2, meaning uncorrelated variables εt\varepsilon_t with mean 00 and variance σε2\sigma_\varepsilon^2, is weakly stationary with μ=0\mu = 0, γ(0)=σε2\gamma(0) = \sigma_\varepsilon^2 and γ(h)=0\gamma(h) = 0 for h≠0h \ne 0. The trend model Xt=0.1 t+εtX_t = 0.1\,t + \varepsilon_t has mean 0.1 t0.1\,t, so it is not weakly stationary, although Xt−0.1 tX_t - 0.1\,t is. Weak stationarity does not imply strict stationarity. Independent variables that are standard normal at even dates and equal to 11 or −1-1 with probability 12\tfrac12 each at odd dates all have mean 00 and variance 11 and are uncorrelated, so they form white noise, yet their distributions differ from date to date.

Autocovariance

Definition For a weakly stationary process, the autocovariance function assigns to each lag h∈Zh \in \mathbb{Z} the covariance

γ(h)=Cov⁡(Xt,Xt−h),\gamma(h) = \operatorname{Cov}(X_t, X_{t-h}),

the same for every tt. It satisfies γ(0)=Var⁡(Xt)\gamma(0) = \operatorname{Var}(X_t), γ(−h)=γ(h)\gamma(-h) = \gamma(h) and ∣γ(h)∣≤γ(0)\lvert \gamma(h) \rvert \le \gamma(0) by the Cauchy-Schwarz inequality. It is positive semidefinite, meaning ∑i,jaiajγ(ti−tj)≥0\sum_{i,j} a_i a_j \gamma(t_i - t_j) \ge 0 for all real aia_i and dates tit_i, because this sum is the variance of ∑iaiXti\sum_i a_i X_{t_i}. When γ(0)>0\gamma(0) > 0, the autocorrelation function is ρ(h)=γ(h)/γ(0)\rho(h) = \gamma(h)/\gamma(0), with ρ(0)=1\rho(0) = 1 and ∣ρ(h)∣≤1\lvert \rho(h) \rvert \le 1. From one observed path x1,…,xnx_1, \dots, x_n, the sample autocovariance

γ^(h)=1n∑t=h+1n(xt−xˉ)(xt−h−xˉ),\begin{aligned} &\hat\gamma(h) \\[0.4em] &= \frac{1}{n}\sum_{t=h+1}^{n}(x_t - \bar x)(x_{t-h} - \bar x), \end{aligned}

for 0≤h<n0 \le h < n, is an estimate, and statements about its sampling error need further assumptions on the dependence of the process. Autocovariance compares one series with itself at different dates. It is not the covariance between two assets at the same date.

In plain words The autocovariance at lag hh measures how strongly the value now moves together with the value hh periods earlier. In a stationary model this relation is the same at every date, so one function of the lag describes it.

Example The moving average Xt=εt+0.5 εt−1X_t = \varepsilon_t + 0.5\,\varepsilon_{t-1}, with white noise of variance σε2=4\sigma_\varepsilon^2 = 4, has

γ(0)=4 (1+0.52)=5,γ(1)=0.5⋅4=2,\begin{aligned} \gamma(0) &= 4\,(1 + 0.5^2) = 5, \\[0.4em] \gamma(1) &= 0.5 \cdot 4 = 2, \end{aligned}

since XtX_t and Xt−1X_{t-1} share only the shock εt−1\varepsilon_{t-1}, and γ(h)=0\gamma(h) = 0 for ∣h∣≥2\lvert h \rvert \ge 2, since XtX_t and Xt−hX_{t-h} then share no shock. So ρ(1)=0.4\rho(1) = 0.4, and the dependence stops after one lag.

AR(1) process

Definition An AR(1) process with coefficient ϕ∈R\phi \in \mathbb{R} satisfies, for every date t∈Zt \in \mathbb{Z},

Xt=ϕXt−1+εt,X_t = \phi X_{t-1} + \varepsilon_t,

where (εt)(\varepsilon_t) is white noise with variance σε2>0\sigma_\varepsilon^2 > 0. A solution is causal if each XtX_t depends only on the current and past shocks εs\varepsilon_s, s≤ts \le t. If ∣ϕ∣<1\lvert \phi \rvert < 1, the causal stationary representation

Xt=∑j=0∞ϕjεt−jX_t = \sum_{j=0}^{\infty}\phi^j\varepsilon_{t-j}

converges in mean square and is the unique weakly stationary solution. To derive it, iterate the recursion kk times,

Xt=ϕkXt−k+∑j=0k−1ϕjεt−j.X_t = \phi^k X_{t-k} + \sum_{j=0}^{k-1}\phi^j\varepsilon_{t-j}.

For a weakly stationary solution the first term has second moment ϕ2k E[Xt−k2]\phi^{2k}\,\mathbb{E}[X_{t-k}^2], a constant times ϕ2k\phi^{2k}, which tends to zero. The partial sums converge in mean square because the shocks are uncorrelated, so a block of terms from j=mj = m to j=kj = k has second moment σε2∑j=mkϕ2j\sigma_\varepsilon^2\sum_{j=m}^{k}\phi^{2j}, which tends to zero as mm grows. The limit has mean zero and

γ(0)=σε21−ϕ2,γ(h)=ϕ∣h∣ γ(0).\begin{gathered} \gamma(0) = \frac{\sigma_\varepsilon^2}{1 - \phi^2}, \\[0.4em] \gamma(h) = \phi^{\lvert h \rvert}\,\gamma(0). \end{gathered}

The variance is σε2∑jϕ2j\sigma_\varepsilon^2\sum_j \phi^{2j}. For h≥1h \ge 1 the iterated recursion writes XtX_t as ϕhXt−h\phi^h X_{t-h} plus the shocks dated after t−ht - h, which are uncorrelated with Xt−hX_{t-h}, so Cov⁡(Xt,Xt−h)=ϕhγ(0)\operatorname{Cov}(X_t, X_{t-h}) = \phi^h\gamma(0). Only second moments are used, and independent shocks are needed only for statements about distributions. If ∣ϕ∣>1\lvert \phi \rvert > 1, a stationary solution still exists, but it is a series in future shocks and so is not causal. If ∣ϕ∣=1\lvert \phi \rvert = 1, no stationary solution exists. A process with mean μ\mu follows Xt−μ=ϕ(Xt−1−μ)+εtX_t - \mu = \phi(X_{t-1} - \mu) + \varepsilon_t.

In plain words Each period keeps the fraction ϕ\phi of the previous value and adds a fresh shock. A shock from jj periods ago still contributes with weight ϕj\phi^j, so when ∣ϕ∣<1\lvert \phi \rvert < 1 old shocks fade geometrically and the variance settles at a finite level.

Example Take ϕ=0.6\phi = 0.6 and σε2=4\sigma_\varepsilon^2 = 4, with the process measured in constructed return units. The weights on the current and past shocks are 11, 0.60.6, 0.360.36, 0.2160.216, and so on. The stationary variance is 4/(1−0.36)=6.254/(1 - 0.36) = 6.25, and the autocovariances at lags 11 and 22 are 3.753.75 and 2.252.25, so ρ(1)=0.6\rho(1) = 0.6 and ρ(2)=0.36\rho(2) = 0.36. With ϕ=−0.6\phi = -0.6 the variance would be the same, and the autocorrelations would alternate in sign.

ARMA model

Definition Let LL be the lag operator, LXt=Xt−1LX_t = X_{t-1}, and define the autoregressive and moving-average polynomials

ϕ(z)=1−ϕ1z−⋯−ϕpzp,θ(z)=1+θ1z+⋯+θqzq.\begin{gathered} \phi(z) = 1 - \phi_1 z - \dots - \phi_p z^p, \\[0.4em] \theta(z) = 1 + \theta_1 z + \dots + \theta_q z^q . \end{gathered}

Here ϕ(z)\phi(z) and θ(z)\theta(z) are polynomials, and for p=1p = 1 the coefficient ϕ1\phi_1 is the ϕ\phi of the AR(1) model. A weakly stationary process satisfies an ARMA(pp, qq) model if ϕ(L)Xt=θ(L)εt\phi(L)X_t = \theta(L)\varepsilon_t for white noise (εt)(\varepsilon_t), that is,

Xt−ϕ1Xt−1−⋯−ϕpXt−p=εt+θ1εt−1+⋯+θqεt−q.\begin{aligned} &X_t - \phi_1 X_{t-1} - \dots - \phi_p X_{t-p} \\[0.4em] &= \varepsilon_t + \theta_1\varepsilon_{t-1} \\[0.4em] &\quad + \dots + \theta_q\varepsilon_{t-q}. \end{aligned}

The moving-average part uses a plus sign, and software conventions differ, so the sign must be checked. Assume that ϕ(z)\phi(z) and θ(z)\theta(z) have no common zeros, after any common factors are canceled. The following results are stated without proof. A weakly stationary solution exists, and is then unique, exactly when ϕ(z)≠0\phi(z) \ne 0 for every complex zz with ∣z∣=1\lvert z \rvert = 1. It is causal, Xt=∑j≥0ψjεt−jX_t = \sum_{j \ge 0}\psi_j\varepsilon_{t-j} with ∑j∣ψj∣<∞\sum_j \lvert \psi_j \rvert < \infty and ∑jψjzj=θ(z)/ϕ(z)\sum_j \psi_j z^j = \theta(z)/\phi(z), exactly when ϕ(z)≠0\phi(z) \ne 0 for all ∣z∣≤1\lvert z \rvert \le 1. It is invertible, meaning εt=∑j≥0πjXt−j\varepsilon_t = \sum_{j \ge 0}\pi_j X_{t-j} with ∑j∣πj∣<∞\sum_j \lvert \pi_j \rvert < \infty, exactly when θ(z)≠0\theta(z) \ne 0 for all ∣z∣≤1\lvert z \rvert \le 1. For ϕ≠0\phi \ne 0 the only root of 1−ϕz1 - \phi z is 1/ϕ1/\phi, which lies outside the unit circle exactly when ∣ϕ∣<1\lvert \phi \rvert < 1. A finite moving average is weakly stationary for any coefficients, invertible or not.

In plain words The autoregressive polynomial decides whether the model has a stationary solution built only from current and past shocks, which happens when all its roots lie strictly outside the unit circle. The moving-average polynomial decides whether the shocks can be recovered from current and past observations. These are two separate conditions.

Example The model Xt=0.6Xt−1+εt+0.5 εt−1X_t = 0.6X_{t-1} + \varepsilon_t + 0.5\,\varepsilon_{t-1} has ϕ(z)=1−0.6z\phi(z) = 1 - 0.6z with root 5/35/3 and θ(z)=1+0.5z\theta(z) = 1 + 0.5z with root −2-2. Both lie outside the unit circle, so the model is causal and invertible, with weights ψ0=1\psi_0 = 1 and ψj=(0.6+0.5) 0.6 j−1\psi_j = (0.6 + 0.5)\,0.6^{\,j-1}, that is 11, 1.11.1, 0.660.66, 0.3960.396, and so on. The moving average Xt=εt+2 εt−1X_t = \varepsilon_t + 2\,\varepsilon_{t-1} with σε2=1\sigma_\varepsilon^2 = 1 has the root −0.5-0.5 inside the unit circle and is not invertible, yet its autocovariances γ(0)=5\gamma(0) = 5 and γ(1)=2\gamma(1) = 2 equal those of εt+0.5 εt−1\varepsilon_t + 0.5\,\varepsilon_{t-1} with σε2=4\sigma_\varepsilon^2 = 4. In Xt−0.5Xt−1=εt−0.5 εt−1X_t - 0.5X_{t-1} = \varepsilon_t - 0.5\,\varepsilon_{t-1} both polynomials equal 1−0.5z1 - 0.5z, and after the common factor is canceled the stationary solution is the white noise Xt=εtX_t = \varepsilon_t.

Conditional forecast variance

Definition Let Ft\mathcal{F}_t be the information generated by XsX_s, s≤ts \le t. For a causal stationary AR(1) process with ∣ϕ∣<1\lvert \phi \rvert < 1, assume beyond white noise that for every tt

E[εt+1∣Ft]=0,E[εt+12∣Ft]=σε2.\begin{gathered} \mathbb{E}[\varepsilon_{t+1} \mid \mathcal{F}_t] = 0, \\[0.4em] \mathbb{E}[\varepsilon_{t+1}^2 \mid \mathcal{F}_t] = \sigma_\varepsilon^2 . \end{gathered}

By the tower property the future shocks then have conditional mean 00, conditional variance σε2\sigma_\varepsilon^2 and zero conditional covariances given Ft\mathcal{F}_t. Writing

Xt+h=ϕhXt+∑j=0h−1ϕjεt+h−j\begin{aligned} X_{t+h} &= \phi^h X_t \\[0.4em] &\quad + \sum_{j=0}^{h-1}\phi^j\varepsilon_{t+h-j} \end{aligned}

for a horizon h≥1h \ge 1 gives the conditional mean and the conditional forecast variance

E[Xt+h∣Ft]=ϕhXt,Var⁡(Xt+h∣Ft)=σε2∑j=0h−1ϕ2j=γ(0)(1−ϕ2h).\begin{aligned} &\mathbb{E}[X_{t+h} \mid \mathcal{F}_t] = \phi^h X_t, \\[0.4em] &\operatorname{Var}(X_{t+h} \mid \mathcal{F}_t) \\[0.4em] &\quad = \sigma_\varepsilon^2\sum_{j=0}^{h-1}\phi^{2j} \\[0.4em] &\quad = \gamma(0)\bigl(1 - \phi^{2h}\bigr). \end{aligned}

When ϕ≠0\phi \ne 0 the conditional variance is strictly below γ(0)\gamma(0) for every hh and increases to γ(0)\gamma(0) as h→∞h \to \infty, while the forecast tends to the mean 00. When ϕ=0\phi = 0 the past carries no information, and every forecast is 00 with variance γ(0)=σε2\gamma(0) = \sigma_\varepsilon^2. Uncorrelated white noise alone does not give these conditional statements. It still makes ϕhXt\phi^h X_t the best linear predictor of Xt+hX_{t+h} from XsX_s, s≤ts \le t, with mean squared error given by the same sum.

In plain words Knowing today’s value removes the uncertainty from all shocks that have already happened. Only the shocks still to come remain, so whenever today’s value carries information about the future, a forecast is less uncertain than the unconditional spread of the process. As the horizon grows, the forecast returns to the mean and its uncertainty grows to the stationary variance. This describes the forecast distribution. Individual paths keep fluctuating, because new shocks keep arriving.

Example With ϕ=0.6\phi = 0.6, σε2=4\sigma_\varepsilon^2 = 4 and current value Xt=10X_t = 10, the two-step forecast is 0.36⋅10=3.60.36 \cdot 10 = 3.6 with conditional variance 4 (1+0.36)=5.444\,(1 + 0.36) = 5.44, less than the stationary variance 6.256.25. One step ahead the variance is 44, and ten steps ahead it is about 6.24986.2498. If the shocks are moreover independent and normal, the conditional law of Xt+2X_{t+2} is normal, and 3.6±1.965.443.6 \pm 1.96\sqrt{5.44}, about [−0.97,8.17][-0.97, 8.17], is a 9595 percent prediction interval under the model.

Unit root

Definition An autoregressive model has a unit root when its polynomial has the root z=1z = 1, that is, ϕ(1)=0\phi(1) = 0, or equivalently ϕ1+⋯+ϕp=1\phi_1 + \dots + \phi_p = 1. The simplest case is the random walk

Xt=Xt−1+εt,X_t = X_{t-1} + \varepsilon_t,

the AR(1) recursion with ϕ=1\phi = 1. Started at X0=0X_0 = 0, it equals Xt=∑s=1tεsX_t = \sum_{s=1}^{t}\varepsilon_s for t≥1t \ge 1, so with white noise shocks Var⁡(Xt)=t σε2\operatorname{Var}(X_t) = t\,\sigma_\varepsilon^2, which grows with tt, and the process is not weakly stationary. No stationary solution exists at all. For any solution, Xt−Xt−nX_t - X_{t-n} is a sum of nn uncorrelated shocks with variance nσε2n\sigma_\varepsilon^2, while for a weakly stationary process Var⁡(Xt−Xt−n)≤4γ(0)\operatorname{Var}(X_t - X_{t-n}) \le 4\gamma(0) for every nn. The formula σε2/(1−ϕ2)\sigma_\varepsilon^2/(1 - \phi^2) cannot be used at ϕ=1\phi = 1, because its derivation needed ∣ϕ∣<1\lvert \phi \rvert < 1. The first difference ΔXt=Xt−Xt−1=εt\Delta X_t = X_t - X_{t-1} = \varepsilon_t is stationary, and a process that is not stationary but whose first difference is a stationary ARMA process is called integrated of order one. Under the conditional assumptions of the previous card, the random walk forecast is E[Xt+h∣Ft]=Xt\mathbb{E}[X_{t+h} \mid \mathcal{F}_t] = X_t with conditional variance h σε2h\,\sigma_\varepsilon^2, which grows without bound in hh. Deciding from data whether a root equals one is a statistical testing problem outside this lesson.

In plain words With a unit root, shocks never fade. Every past shock stays in the level, so the uncertainty about the level keeps growing with time, even though the changes from one period to the next can be stationary.

Example With σε2=4\sigma_\varepsilon^2 = 4 and X0=0X_0 = 0, the random walk has variance 4t4t, which is 2020 at t=5t = 5. A coefficient close to one is a different regime. The AR(1) model with ϕ=0.99\phi = 0.99 is stationary with variance σε2/(1−0.9801)≈50.25 σε2\sigma_\varepsilon^2/(1 - 0.9801) \approx 50.25\,\sigma_\varepsilon^2, large but finite, and its forecasts return to the mean. Rounding 0.990.99 to 11 changes which formulas apply.

Check yourself

  1. An AR(1) process has ϕ=−0.5\phi = -0.5 and white noise variance σε2=3\sigma_\varepsilon^2 = 3. Is the causal stationary representation available? Find the stationary variance, the autocovariances at lags 11 and 22 and the autocorrelation at lag 33.
Show the answer

Yes, because ∣ϕ∣=0.5<1\lvert \phi \rvert = 0.5 < 1, and the root 1/ϕ=−21/\phi = -2 of 1+0.5z1 + 0.5z lies outside the unit circle. The stationary variance is

γ(0)=31−0.25=4.\gamma(0) = \frac{3}{1 - 0.25} = 4 .

The autocovariances are γ(1)=−0.5⋅4=−2\gamma(1) = -0.5 \cdot 4 = -2 and γ(2)=0.25⋅4=1\gamma(2) = 0.25 \cdot 4 = 1, and the autocorrelation at lag 33 is ρ(3)=(−0.5)3=−0.125\rho(3) = (-0.5)^3 = -0.125. A negative coefficient makes the autocorrelations alternate in sign.

  1. A model reads Xt=0.5Xt−1+0.5Xt−2+εtX_t = 0.5X_{t-1} + 0.5X_{t-2} + \varepsilon_t with white noise of positive variance. A colleague argues that both coefficients are below 11 in size, so the process is stationary. Check the claim with the autoregressive polynomial and describe the differences ΔXt=Xt−Xt−1\Delta X_t = X_t - X_{t-1}.
Show the answer

The polynomial factors as

ϕ(z)=1−0.5z−0.5z2=(1−z)(1+0.5z),\begin{aligned} \phi(z) &= 1 - 0.5z - 0.5z^2 \\[0.4em] &= (1 - z)(1 + 0.5z), \end{aligned}

with roots 11 and −2-2. The root z=1z = 1 lies on the unit circle, so there is no stationary solution, and the coefficients summing to 11 signal exactly this. Checking the coefficients one at a time is not the criterion. Subtracting Xt−1X_{t-1} from both sides gives

ΔXt=−0.5 ΔXt−1+εt,\Delta X_t = -0.5\,\Delta X_{t-1} + \varepsilon_t ,

an AR(1) model for the differences with coefficient −0.5-0.5, whose polynomial 1+0.5z1 + 0.5z has its root −2-2 outside the unit circle. This model for the differences has a causal stationary solution, and a level whose differences follow it is integrated of order one.

  1. A constructed model for an interest-rate spread, in percentage points, is Xt−2=0.8 (Xt−1−2)+εtX_t - 2 = 0.8\,(X_{t-1} - 2) + \varepsilon_t, with shocks of conditional mean 00 and constant conditional variance 0.50.5 given the past. The spread is 55 today. Find the three-step forecast and its conditional variance, and compare that variance with the stationary variance.
Show the answer

The deviation from the mean 22 is 33 today and shrinks by the factor 0.80.8 each period on average, so

E[Xt+3∣Ft]=2+0.83⋅3=2+1.536=3.536.\begin{aligned} \mathbb{E}[X_{t+3} \mid \mathcal{F}_t] &= 2 + 0.8^3 \cdot 3 \\[0.4em] &= 2 + 1.536 = 3.536 . \end{aligned}

The conditional forecast variance is

0.5 (1+0.64+0.4096)=0.5⋅2.0496=1.0248.\begin{aligned} &0.5\,(1 + 0.64 + 0.4096) \\[0.4em] &\quad = 0.5 \cdot 2.0496 = 1.0248 . \end{aligned}

The stationary variance is 0.5/(1−0.64)≈1.38890.5/(1 - 0.64) \approx 1.3889, larger because it also contains the uncertainty from shocks before today, which observing today’s spread removes. Two common mistakes are to apply 0.830.8^3 to the level 55 instead of the deviation 33, which gives 2.562.56, and to report the stationary variance as the forecast variance.

How this lesson connects

It also uses complex roots of polynomials.