Module 5 — Systems, Seasonality, and Cointegration

Express vector autoregressions, seasonal operators, cointegration, and forecast constraints with block matrices and stable linear systems.

Module 5 — Systems, Seasonality, and Cointegration

Core question

What changes when variables forecast one another, seasonal positions have their own dynamics, or non-stationary levels remain tied by a stable long-run relation?

Learning outcomes

You will be able to:

  • formulate and check the stability of a VAR;
  • solve a stationary VAR covariance with a Kronecker-product equation;
  • distinguish Granger predictability from causal effect;
  • compute and qualify an impulse response;
  • choose among seasonal indicators, seasonal differencing, and SARIMA terms;
  • recognise cointegration and interpret an error-correction model;
  • explain why forecasts across products or time aggregates must be reconciled.

1. VAR: every variable can use every lag

For a kk-variable VAR(pp),

yt=c+A1yt1++Apytp+εt.\mathbf y_t=\mathbf c+A_1\mathbf y_{t-1}+\cdots+A_p\mathbf y_{t-p}+\boldsymbol\varepsilon_t.

A VAR(1) is stationary when every eigenvalue of A1A_1 has modulus below one. For VAR(pp), use the equivalent companion matrix.

Parameter growth is the first constraint

With an intercept, a VAR has k(kp+1)k(kp+1) regression coefficients. For k=5k=5 and p=4p=4, that is 105 coefficients before the 15 distinct innovation-covariance terms. A rich system estimated from 80 quarters is not automatically informative; shrinkage, fewer variables/lags, or theory-based restrictions may be necessary.

Stacked regression form

For VAR(1), collect rows y2,,yn\mathbf y_2^\top,\ldots,\mathbf y_n^\top in YY and rows (1,yt1)(1,\mathbf y_{t-1}^\top) in X\mathcal X. Then

Y=XB+E,vec(Y)=(IkX)vec(B)+vec(E).Y=\mathcal XB+E, \qquad \operatorname{vec}(Y) =(I_k\otimes\mathcal X)\operatorname{vec}(B)+\operatorname{vec}(E).

Equation-by-equation OLS and multivariate least squares give the same coefficient estimates when every equation has the same regressors. The innovation covariance still matters for joint inference.

2. A two-variable shock calculation

Let demeaned electricity demand and price follow

yt=[0.60.20.10.5]yt1+εt.\mathbf y_t= \begin{bmatrix} 0.6&0.2\\ 0.1&0.5 \end{bmatrix} \mathbf y_{t-1}+\boldsymbol\varepsilon_t.

Starting from a one-unit shock to the first innovation, ψ0=(1,0)\boldsymbol\psi_0=(1,0)', propagation is ψh=Ahψ0\boldsymbol\psi_h=A^h\boldsymbol\psi_0:

hhfirst responsesecond response
01.0000.000
10.6000.100
20.3800.110
30.2500.093
40.1690.072

Propagation of one identified shock

The first variable reacts immediately; the second receives a delayed spillover.

0.000.260.530.791.10.001.534.56impactpeak spilloverbaselineResponseHorizon h
First variable Second variable
An impulse response is a path conditional on a model and shock-identification rule, not a static correlation.

If contemporaneous innovations are correlated, “a shock to variable 1 while variable 2 is unchanged” is not identified by the reduced-form covariance alone. Cholesky ordering, long-run restrictions, sign restrictions, external instruments, or a structural model add different assumptions and may produce different paths.

3. Stationary covariance is a Lyapunov equation

For VAR(1),

yt=Ayt1+εt,Var(εt)=Σ,\mathbf y_t=A\mathbf y_{t-1}+\boldsymbol\varepsilon_t, \qquad \operatorname{Var}(\boldsymbol\varepsilon_t)=\Sigma,

the unconditional covariance Γ0\Gamma_0 satisfies

Γ0=AΓ0A+Σ.\Gamma_0=A\Gamma_0A^\top+\Sigma.

Using vec(AXB)=(BA)vec(X)\operatorname{vec}(AXB)=(B^\top\otimes A)\operatorname{vec}(X),

vec(Γ0)=(Ik2AA)1vec(Σ).\boxed{ \operatorname{vec}(\Gamma_0) =(I_{k^2}-A\otimes A)^{-1}\operatorname{vec}(\Sigma) }.
R

Solve and verify a stationary VAR(1) covariance

Idle

The eigenvalues check stability, the covariance eigenvalues check validity, and the residual norm checks the Lyapunov equation. These are separate claims.

4. Granger predictability is deliberately modest

xx Granger-causes yy when lags of xx improve forecasts of yy after conditioning on the included history. Operationally, compare

yt=c+aiyti+uty_t=c+\sum a_i y_{t-i}+u_t

with

yt=c+aiyti+bixti+uty_t=c+\sum a_i y_{t-i}+\sum b_i x_{t-i}+u_t

and test b1==bp=0b_1=\cdots=b_p=0.

ResultSupported claimNot supported without more design
reject restrictionsxx has incremental lagged predictive content in this specificationintervention on xx changes yy
fail to rejectsample does not show incremental linear contentxx is irrelevant in all horizons/regimes

Omitted common causes, measurement timing, anticipation, aggregation, and regime changes can all alter the result.

5. Seasonality is not one phenomenon

For monthly data, s=12s=12. Choose the smallest assumption that matches the mechanism:

MechanismModel deviceInterpretation
stable January effect11 month indicatorsdeterministic seasonal mean
smoothly changing recurring patternFourier sine/cosine termsparsimonious deterministic cycle
seasonal shocks accumulate(1B12)Xt(1-B^{12})X_tseasonal stochastic trend
dependence remains at seasonal lagsseasonal AR/MA termsshocks propagate across years

A multiplicative SARIMA model is written

ϕ(B)Φ(B12)(1B)d(1B12)DXt=θ(B)Θ(B12)εt.\phi(B)\Phi(B^{12})(1-B)^d(1-B^{12})^D X_t =\theta(B)\Theta(B^{12})\varepsilon_t.

Reading the notation

SARIMA(1,1,1)(0,1,1)12(1,1,1)(0,1,1)_{12} means:

  • one ordinary difference and one annual seasonal difference;
  • one non-seasonal AR and MA term;
  • one seasonal MA term linking shocks 12 months apart.

It does not mean the order is appropriate. Compare it with seasonal naive and inspect whether double differencing created strong negative autocorrelation.

6. Cointegration preserves a long-run relation

Suppose xtx_t is a random walk and

yt=2xt+ut,y_t=2x_t+u_t,

where utu_t is stationary. Both levels are non-stationary, but

yt2xt=uty_t-2x_t=u_t

is stationary. The pair is cointegrated. Differencing both series independently would hide the equilibrium error yt12xt1y_{t-1}-2x_{t-1}.

A two-variable error-correction equation may be

Δyt=α(yt12xt1)+ΓΔyt1+εt.\Delta y_t=\alpha(y_{t-1}-2x_{t-1}) +\Gamma\Delta\mathbf y_{t-1}+\varepsilon_t.

If α=0.3\alpha=-0.3 and the previous equilibrium error is 10, the correction contributes 3-3 to the next change in yy. The sign tells how deviations are repaired; cointegration alone does not tell which variable adjusts or identify a causal mechanism.

7. Hierarchical forecasts must add up

Campus demand may be forecast for buildings, faculties, and the whole university; monthly forecasts must also aggregate to quarters and years. Independently fitted forecasts are usually incoherent:

y^totaly^A+y^B.\widehat y_{\text{total}}\ne \widehat y_A+\widehat y_B.

Reconciliation projects or conditions base forecasts so aggregation constraints hold. Recent work on mixed-type probabilistic reconciliation extends this idea when a hierarchy combines counts and continuous quantities. Coherence is a logical requirement; accuracy gains remain empirical and must be backtested at every level.

8. Model-choice map

Data questionFirst modelAdd only if needed
one stationary seriesARMAnonlinear/volatility structure
one seasonal seriesseasonal naive + regression/SARIMAmultiple seasonalities or state space
several stationary seriesVARstructural identification or shrinkage
non-stationary levels with stable spreadVECMbreaks or time-varying relation
many aggregation levelslocal models + reconciliationjoint probabilistic hierarchy

Practice

  1. Multiply the worked VAR matrix by (0.38,0.11)(0.38,0.11)' to verify the horizon-3 response.
  2. For k=8,p=3k=8,p=3, count VAR regression coefficients with intercepts.
  3. Give a predictive but non-causal explanation for why temperature lags improve electricity-demand forecasts.
  4. Explain why seasonal indicators and seasonal differencing encode different counterfactuals.
  5. If yt12xt1=5y_{t-1}-2x_{t-1}=-5 and α=0.2\alpha=-0.2, what is the error-correction contribution to Δyt\Delta y_t?
  6. For the R example, substitute the printed Γ0\Gamma_0 into AΓ0A+ΣA\Gamma_0A^\top+\Sigma and verify one matrix entry by hand.
Answers
  1. (0.6)(0.38)+(0.2)(0.11)=0.25(0.6)(0.38)+(0.2)(0.11)=0.25 and (0.1)(0.38)+(0.5)(0.11)=0.093(0.1)(0.38)+(0.5)(0.11)=0.093.
  2. k(kp+1)=8(25)=200k(kp+1)=8(25)=200, before 36 innovation-covariance parameters.
  3. Temperature may proxy a common seasonal/calendar process; predictive timing alone does not identify an intervention effect.
  4. Indicators assume repeating mean levels; seasonal differencing assumes shocks can accumulate across the same season.
  5. (0.2)(5)=+1(-0.2)(-5)=+1, moving yy upward toward the relation.
  6. Any entry should agree up to printed rounding; the executable residual uses full precision.

Takeaway

Multivariate and seasonal models are block-matrix extensions of the univariate theory, but identification becomes harder as dimension grows. The 2024/25 VARMA review is a graduate bridge from these classical equations to current identification and estimation research. Continue to Spectral Analysis to study covariance by frequency rather than lag.

Copyright © 2026