VAR in Time Series
VAR in Time Series
Alexander Opoku
1 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Overview
1 Vector Autoregression (VAR)
2 Objectives of VAR Modeling
3 Assumptions of VAR Models
4 Mathematical Representation of VAR Models
5 Representing Equations in Matrix Form
6 VAR Model with One Predictor in Matrix Form
7 VAR Models: Higher Orders
8 Stationary VAR and Variable Selection
9 Wold’s Decomposition Representation
10 Wold’s Decomposition: Layman Explanation
11 Lag Selection Criteria
2 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
3 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
What is VAR?
Vector Autoregression (VAR) is a statistical model used to
study the dynamic relationships among multiple time series
variables. It is particularly useful in analyzing systems where:
Variables influence each other over time.
Past values (lags) of one variable can affect the present and
future values of another.
Example:
Consider a macroeconomic system with GDP, inflation, and
interest rates:
How does a rise in interest rates today impact GDP and
inflation in the future?
How do past inflation rates influence current interest rates?
Key Feature: Every variable in the system is treated as
endogenous (both influenced by and influencing other variables).
This makes VAR suitable for uncovering complex interdependencies
in time series data.
4 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
6 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
7 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Macroeconomic Analysis:
Analyze interactions between GDP, inflation, interest rates,
and unemployment.
Example: How does a central bank’s interest rate hike impact
GDP and inflation over the next few quarters?
Finance:
Study relationships between asset prices, exchange rates, and
market indices.
Example: How do fluctuations in the SP 500 affect bond yields
or currency values?
Policy Analysis:
Evaluate the effects of government interventions, such as
stimulus packages or tax reforms.
Example: What is the impact of fiscal stimulus on
unemployment and consumer spending?
9 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
11 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Assumption 1: Linearity
Definition:
The VAR model assumes that the relationships between
variables are linear. Each variable is explained as a weighted
sum of its own past values and the past values of other
variables.
Example:
12 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Assumption 2: Stationarity
Definition:
The mean, variance, and autocovariance of each variable are
constant over time.
A non-stationary series (e.g., one with trends or changing
variances) can lead to spurious relationships.
Example:
Stationary: GDP growth rate (percent change in GDP) is
usually stationary.
Non-stationary: The level of GDP often exhibits trends and
needs to be differenced to achieve stationarity.
13 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Definition:
The residuals (errors) of the VAR model should not exhibit
serial correlation.
Serial correlation indicates that residuals from one time period
are correlated with residuals from another period.
Example:
If GDP residuals are serially correlated, this implies missing
variables or inadequate lag selection.
14 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Assumption 4: Homoscedasticity
Definition:
The variance of the residuals should remain constant over
time.
If the residual variance changes (heteroscedasticity), it can
lead to inefficient estimates.
Example:
In financial data, stock returns often exhibit
heteroscedasticity, with periods of high volatility followed by
periods of low volatility.
15 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Assumption 5: Endogeneity
Definition:
All variables in the VAR system are treated as endogenous,
meaning each variable is both influenced by and influences
other variables.
No variable is strictly dependent or independent.
Example:
GDP affects inflation, but inflation also affects GDP, creating
a feedback loop.
Benefit:
This assumption allows VAR to capture mutual dependencies
and dynamic interactions without imposing restrictive causal
assumptions.
16 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Multivariate Regression
Definition: Multivariate regression models explain the relationship
between multiple dependent variables and one or more predictors.
General Form:
Y = XB + E
Where:
Y: A n × m matrix of m dependent variables (e.g., sales of
different products),
X: A n × p matrix of predictors (e.g., advertising expenditure,
seasonality),
B: A p × m matrix of coefficients,
E: A n × m matrix of residuals (errors).
Key Feature: Multivariate regression accounts for correlations
between the dependent variables, allowing for more robust
modeling compared to multiple separate regressions.
17 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Case: When there is only one predictor, the model simplifies to:
Y = XB + E
18 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Y = X1 B1 + X2 B2 + · · · + E
Example:
y
Y = 1t represents sales of apples (y1t ) and oranges (y2t ),
y2t
Predictors X1 = advertising spend and X2 = pricing strategy.
The regression accounts for how advertising and pricing affect
sales simultaneously.
19 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
20 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
yt = c + A1 yt−1 + ut
Where:
y
yt = 1t : vector of variables at time t,
y2t
c
c = 1 : vector of constants,
c2
a11 a12
A1 = : coefficient matrix,
a21 a22
u
ut = 1t : vector of white noise error terms.
u2t
Compact Form:
yt = c + A1 yt−1 + ut
21 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
What is a Matrix?
Where:
aij : Entry in row i and column j.
m: Number of rows.
n: Number of columns.
22 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
β: Coefficient.
ϵ1
ϵ2
ϵ = . : Residuals.
..
ϵn
24 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
y1 = β1 x + ϵ1
y2 = β2 x + ϵ2
Matrix Form:
Y = XB + E
Where:
y11 y12
y21 y22
Y= . .. : Dependent variables (e.g., sales of Apples and
.. .
yn1 yn2
Oranges).
25 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
x1
x2
X = . : Common predictor (e.g., advertising).
..
xn
β
B = 1 : Coefficients.
β2
ϵ1
ϵ2
E = . : Residuals.
..
ϵn
26 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
29 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
VAR(2) Model
Question: How do the current values of variables depend on their
lagged values from one and two periods ago?
System of Equations:
(1) (1) (2) (2)
y1t = c1 + a11 y1t−1 + a12 y2t−1 + a11 y1t−2 + a12 y2t−2 + u1t ,
(1) (1) (2) (2)
y2t = c2 + a21 y1t−1 + a22 y2t−1 + a21 y1t−2 + a22 y2t−2 + u2t .
Matrix Form:
" (1) (1) # " (2) (2) #
y1t c1 a11 a12 y1t−1 a11 a12 y1t−2 u
yt = = + (1) (1) + (2) (2) + 1t .
y2t c2 a21 a22 y2t−1 a21 a22 y2t−2 u2t
Compact Form:
yt = c + A1 yt−1 + A2 yt−2 + ut
30 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
VAR(3) Model
System of Equations:
(1) (1) (2) (2)
y1t = c1 + a11 y1t−1 + a12 y2t−1 + a11 y1t−2 + a12 y2t−2
(3) (3)
+ a11 y1t−3 + a12 y2t−3 + u1t ,
(1) (1) (2) (2)
y2t = c2 + a21 y1t−1 + a22 y2t−1 + a21 y1t−2 + a22 y2t−2
(3) (3)
+ a21 y1t−3 + a22 y2t−3 + u2t .
Matrix Form:
" (1) (1) # " (2) (2) # " (3)
y1t c1 a11 a12 y1t−1 a11 a12 y1t−2 a a
yt = = + (1) (1) + (2) (2) + 11(3)
y2t c2 a21 a22 y2t−1 a21 a22 y2t−2 a21 a
Compact Form:
VAR(p) Model
System of Equations:
p
(i) (i)
X
y1t = c1 + a11 y1t−i + a12 y2t−i + u1t ,
i=1
p
(i) (i)
X
y2t = c2 + a21 y1t−i + a22 y2t−i + u2t .
i=1
Matrix Form:
p
" #
X (i) (i)
y1t c1 a11 a12 y1t−i u
yt = = + (i) (i) + 1t .
y2t c2 a21 a22 y2t−i u2t
i=1
Compact Form:
p
X
yt = c + Ai yt−i + ut
i=1
32 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
yt = c + A1 yt−1 + A2 yt−2 + ut
33 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
yt = c + A1 yt−1 + ut
Example:
GDPt : GDP growth rate (stationary).
INFt : Inflation rate (stationary).
The VAR(1) model captures how GDPt and INFt influence each
other.
34 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Common Tests:
Example:
35 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
36 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Selected Variables:
GDPt
yt = INFt
IRt
37 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
VAR(1) Model:
yt = c + A1 yt−1 + ut
Expanded Form:
Matrix Form:
GDPt c1 a11 a12 a13 GDPt−1 u1t
yt = INFt = c2 + a21 a22 a23
INFt−1 + u2t .
IRt c3 a31 a32 a33 IRt−1 u3t
38 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Implication of Stationarity:
If stationary, the VAR can be rewritten as a Moving Average (MA)
process:
∞
X
yt = µ + Ψi ut−i
i=0
Where Ψi are moving average coefficients derived from A(L)−1 .
41 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
yt = c + A(L)−1 ut
Expand A(L)−1 :
A(L)−1 = (I + Ψ1 L + Ψ2 L2 + . . .
) ut
Substitute into the equation:
yt = c + ut + Ψ1 ut−1 + Ψ2 ut−2 + . . .
Interpretation:
yt is expressed as an infinite sum of past shocks ut−i .
Ψi : Matrices capturing how shocks propagate over time.
42 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Decomposition:
Interpretation:
Recent shocks (εt ) have greater influence than older shocks (εt−2 ).
43 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Applications:
44 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Closer ripples (recent shocks) have more impact than ripples from
stones thrown further back (older shocks).
47 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Why is it important?
Ensures that the model is neither underfitted nor overfitted.
Helps balance goodness of fit and model complexity. 49 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
AIC measures the trade-off between the goodness of fit and the
complexity of the model.
Formula:
RSS 2k
AIC = ln +
n n
Where: RSS: Residual Sum of Squares, n: Sample size, k:
Number of parameters (including intercept)
Interpretation:
Formula:
RSS 2k ln(ln(n))
HQC = ln +
n n
Where: ln(ln(n)): Logarithmic term reduces the penalty compared
to SIC.
Interpretation:
Often used when neither AIC nor SIC provides a clear choice.
52 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Comparison of Criteria
Key Points:
All three criteria balance model fit and complexity but differ in
their penalties for additional parameters.
AIC: Less harsh penalty, may favor slightly overfitted models.
SIC/BIC: Harsher penalty, suitable for large datasets.
HQC: Moderate penalty, balances between AIC and SIC.
Selection Rule:
Choose the model with the lowest value of the respective criterion.
In software outputs (e.g., Stata, EViews, R):
AIC, SIC, and HQC are reported for various lag lengths.
The lag length corresponding to the lowest criterion value is optimal.
53 / 54
Vector Autoregression (VAR) Objectives of VAR Modeling Assumptions of VAR Models Mathematical Representation of VAR Mod
Example in Practice
AIC selects lag 2 (lowest value: 11.789), SIC selects lag 1 (lowest value:
13.456).
54 / 54