So far, the AR(1) model has described how a single variable depends on its own past:
\[
X_t = \phi X_{t-1} + \varepsilon_t.
\]
This captures memory within one time series. However, many real-world systems involve several variables that evolve together. In such systems, the future value of one variable may depend not only on its own past, but also on the past values of other variables.
For example:
energy demand may depend on past temperature,
stock returns may depend on past interest rates,
infection levels may depend on past mobility patterns,
queue length may depend on past arrival rates and service rates.
To model this kind of interaction, we extend AR(1) to a vector autoregressive model, or VAR.
shocks to one variable can influence the other variable later,
the two series move as an interacting system rather than as isolated processes.
This is the main conceptual leap from AR(1) to VAR.
Isolating a Shock
To see cross-variable shock propagation more clearly, we can remove random noise and introduce a one-time shock to \(X\).
Example: A one-time shock to \(X\) propagates through both \(X\) and \(Y\).
n <-50X <-numeric(n)Y <-numeric(n)X[1] <-1# initial shock to XY[1] <-0for (t in2:n) { X[t] <-0.6* X[t -1] +0.3* Y[t -1] Y[t] <-0.4* X[t -1] +0.5* Y[t -1]}plot( X,type ="o",main ="Shock Propagation in a VAR(1) System",xlab ="Time",ylab ="Value")lines(Y, type ="o", lty =2, col ="blue")abline(h =0, col ="red", lty =2)legend("topright",legend =c("X", "Y"),lty =c(1, 2),pch =c(1, 1),col =c("black", "blue"),bty ="n")
Python Version
import numpy as npimport matplotlib.pyplot as pltn =50X = np.zeros(n)Y = np.zeros(n)X[0] =1# initial shock to XY[0] =0for t inrange(1, n): X[t] =0.6* X[t -1] +0.3* Y[t -1] Y[t] =0.4* X[t -1] +0.5* Y[t -1]plt.plot(X, marker="o", label="X")plt.plot(Y, marker="o", linestyle="--", label="Y")plt.axhline(0, color="red", linestyle="--")plt.title("Shock Propagation in a VAR(1) System")plt.xlabel("Time")plt.ylabel("Value")plt.legend()plt.show()
The plot shows that the initial shock directly affects \(X\), but then spreads to \(Y\) through the cross-effect term \(a_{21}\). Once \(Y\) changes, it can also feed back into \(X\) through \(a_{12}\).
Thus, a VAR model allows us to study not only whether shocks persist, but also where they travel.
Comparison: AR(1) vs VAR(1)
Feature
AR(1)
VAR(1)
Number of variables
One
Two or more
Dependence
Own past only
Own past and other variables’ past
Shock propagation
Through time
Through time and across variables
Main idea
Memory
Interaction
VAR extends the AR idea from a single time series to an interacting system of time series.
The same ideas remain central:
memory,
persistence,
shock propagation,
stability,
simulation.
The only difference is that shocks can now move between variables, not just through time within one variable.