Quant Memo
Core

Vector Autoregression (VAR)

A way to model several time series at once, letting each one depend on the recent past of itself and of every other series. The standard first tool when variables feed back into each other.

Prerequisites: ARMA Models, Stationarity

Most real systems are not one lonely series drifting on its own; they are several series pushing on each other. Interest rates move inflation, inflation moves rates back. A stock's return and its trading volume shove each other around. A vector autoregression, or VAR, is the simplest honest way to model that back-and-forth: you let every variable depend on the recent history of itself and of all the others, and you estimate the whole tangle at once.

Think of it as stacking several AR models side by side and wiring them together. An ordinary AR(1) says "today is a multiple of yesterday plus noise." A VAR(1) says the same, but "today" is now a list of numbers, and each entry can lean on yesterday's value of every other entry.

The model

Collect your kk series into a single vector YtY_t. A VAR with pp lags is

Yt=c+A1Yt1+A2Yt2++ApYtp+εt.Y_t = c + A_1 Y_{t-1} + A_2 Y_{t-2} + \dots + A_p Y_{t-p} + \varepsilon_t .

Here YtY_t is the vector of all variables at time tt; cc is a vector of constants; each AiA_i is a k×kk \times k matrix of coefficients that says how strongly lag ii of every variable feeds into every variable today; and εt\varepsilon_t is a vector of shocks (mean zero, no correlation across time, but the shocks at the same instant may be correlated with each other). The off-diagonal entries of the AiA_i matrices are the whole point: they are the cross-effects, one series reaching into another.

Returns Volume past returns predict volume past volume predicts returns
A two-variable VAR. Each box depends on the recent past of itself (the loops) and of the other box (the crossing arrows). The crossing arrows are what a plain AR model cannot capture.

A VAR lets every series depend on the lagged values of every series, itself included. The cross-terms (off-diagonal coefficients) are the extra structure a stack of separate AR models would miss.

Worked example: returns and volume

Suppose two demeaned daily series, returns rtr_t and (standardized) volume vtv_t, follow a VAR(1):

rt=0.10rt10.05vt1+εtr,vt=0.30rt1+0.60vt1+εtv.\begin{aligned} r_t &= 0.10\, r_{t-1} - 0.05\, v_{t-1} + \varepsilon^r_t,\\ v_t &= 0.30\, r_{t-1} + 0.60\, v_{t-1} + \varepsilon^v_t. \end{aligned}

Yesterday's numbers were rt1=2.0r_{t-1} = 2.0 (a big up day) and vt1=1.0v_{t-1} = 1.0. The one-step-ahead forecasts are just the equations with the noise set to its average of zero:

r^t=0.10(2.0)0.05(1.0)=0.15,v^t=0.30(2.0)+0.60(1.0)=1.20.\hat r_t = 0.10(2.0) - 0.05(1.0) = 0.15, \qquad \hat v_t = 0.30(2.0) + 0.60(1.0) = 1.20 .

Read the second equation: a big return day pushes tomorrow's volume up hard (coefficient 0.300.30), and volume is sticky on its own (0.600.60). That cross-effect, return leading volume, is exactly what a separate AR model of volume would have thrown away.

Reading a VAR

You rarely stare at the raw coefficient matrices; they are hard to interpret. Three tools translate a VAR into answers:

  • Granger causality asks whether one variable's past helps predict another beyond that other's own past, i.e. whether a block of off-diagonal coefficients is jointly zero.
  • Impulse response functions trace what happens to every series over the next weeks if one shock hits today; the natural "what if" of a VAR.
  • Forecast error variance decomposition splits each series' forecast uncertainty into how much comes from its own shocks versus the others'.

Where it goes wrong

  • Parameter explosion. A kk-variable VAR(pp) has k2pk^2 p slope coefficients. Three variables at four lags is already 36 numbers; add a fourth variable and you are fitting 64. Data runs out fast, so keep kk and pp small and lean on information criteria (AIC/BIC) to pick the lag length.
  • Stationarity first. The math assumes the vector is stationary. Fitting a VAR to trending, unit-root series can produce nonsense, the multivariate cousin of spurious regression. If the series move together in the long run, they may be cointegrated, and you should use a vector error-correction model instead of differencing everything away.
  • Ordering matters for structure. Turning a VAR into impulse responses requires assumptions about which shock hits which variable first; change the ordering and the story can change. That is the hard, contested part of the tool.

Coefficients balloon as k2pk^2 p, so a VAR overfits quickly, and it assumes stationarity. Difference or test for Cointegration before fitting, and resist the urge to throw in more variables and lags than your sample can support.

When you only want to know "does A help forecast B?", you do not need the full VAR machinery, run a Granger-causality test, which is just an F-test on the cross-lag coefficients.

VAR is the workhorse for interacting time series, the multivariate step up from ARMA, the home of Granger causality, and, once you allow hidden drivers, a stepping stone to state-space models.

Related concepts

Practice in interviews

Further reading

  • Sims (1980), Macroeconomics and Reality
  • Hamilton, Time Series Analysis (Ch. 10–11)
  • Lütkepohl, New Introduction to Multiple Time Series Analysis
ShareTwitterLinkedIn