VAR Lecture2
VAR Lecture2
VAR Lecture2
1
Overview
Vector Autoregression (VAR) model is an extension of univariate
autoregression model to multivariate time series data
2
VAR Model
VAR(p) model:
Yt = a + A1Yt-1 + A2Yt-2 + … + ApYt-p + εt
where:
Yt = (y1t, y2t, …, ynt)’ : an (nx1) vector of time series variables
a: an (nx1) vector of intercepts
Ai (i=1, 2, …, p): (nxn) coefficient matrices
εt : an (nx1) vector of unobservable i.i.d. zero mean error term
(white noise)
3
VAR Model
Example: Bivariate VAR(2) Model
4
The Simplest VAR Model
Example: Bivariate VAR(1) Model with no intercepts
5
The Marginal Models
6
The Simplest VAR Model
Example: Bivariate VAR(1) Model with no intercepts
7
The Final Equation
8
The Simplest VAR Model
9
VAR Stationarity
Based on the Final Equation
The LEFT-HAND SIDE of the univariate series {Yt} is a
stationary AR(2) if both roots of ϕ(L)=0 are outside the unit
circle.
This is equivalent to: both roots of P(λ)=0 are inside the unit
circle.
(What process does the error term on the right-hand side
follow? White noise? MA(1)? Other model?)
Question: What about the univariate series {Xt}?
10
Check for Stationarity
11
The Simplest VAR Model
Example: Bivariate VAR(1) Model with no intercepts
12
The Companion Form
13
The Companion Form II
14
The Companion Form
F is an example of a companion matrix.
Since (9) is the same equation as the characteristic equation
for the final equation for yt , we have that [yt , xt ] is a
stationary process if and only if the eigenvalues of F have
moduli less than 1 (inside the unit circle).
15
The Companion Form
16
The Companion Form
17
The Companion Form
The VAR(p) is a stationary process if and only if all the
eigenvalues of F have moduli less than 1 (inside the unit
circle).
Recall, the eigenvalues are the solutions of
18
Why do we need VAR?
Time-series data with autoregressive in nature (serially
correlated)
VAR model is one of the most successful and flexible models
for the analysis of multivariate time series
Especially useful for describing the dynamic behavior of
economic and financial time series
Useful for forecasting
19
Applications of VAR
20
Applications of VAR
21
Applications of VAR
22
Forecasting
23
Applications of VAR:
Forecasting
1-step forecast based on information available at time T:
YT+1|T = a + A1YT + A2YT-1 + … + ApYT-p+1
h-step forecast:
YT+h|T = a + A1YT+h-1|T + A2YT+h-2|T + … + ApYT+h-p|T
24
Implementation
All data have to have same frequency
Data with mixed frequency need to be converted to the same
frequency
25
SAS & R for VAR
26
Example of VAR usage
27
Dataset
Obs year month ret_dji ret_totval
1 1961 1 . .
28
SAS
29
SAS Implementation
PROC VARMAX
proc varmax data=comb;
run;
ret_djit = a1 + b11 ret_djit-1 + b12 ret_totvalt-1 + ε1t
ret_totvalt = a2 + b21 ret_djit-1 + b22 ret_totvalt-1 +ε2t
30
SAS Output
Mode l Param e te r Es tim ate s
S tandard
Equation Param e te r Es tim ate Error t Value Pr > |t| Variable
re t_dji CONS T1 0.00542 0.00195 2.78 0.0057 1
AR 1_1_1 -0.29801 0.06973 -4.27 0.0001 ret_dji(t-1)
AR 1_1_2 0.37788 0.07499 5.04 0.0001 ret_totval(t-1)
re t_totval CONS T2 0.00802 0.00185 4.32 0.0001 1
AR 1_2_1 0.06674 0.06627 1.01 0.3144 ret_dji(t-1)
AR 1_2_2 -0.04813 0.07127 -0.68 0.4998 ret_totval(t-1)
31
SAS Output
32
R
33
R for VAR
VARs are implemented in the vars package in R. It contains
a function VARselect to choose the number of lags p using
four different information criteria: AIC, HQ, SC and FPE.
We have met the AIC before, and SC is simply another name
for the BIC (SC stands for Schwarz Criterion after Gideon
Schwarz who proposed it). HQ is the Hannan-Quinn
criterion and FPE is the “Final Prediction Error” criterion.
Care should be taken using the AIC as it tends to choose
large numbers of lags. Instead, for VAR models, we prefer to
use the BIC.
34
Concerns
Assuming all variables are endogenous
If time-series data are nonstationary (containing stochastic
trends), while it is possible to estimate VAR in levels, it is
preferable to estimate VAR in first differences
Uncertainty about number of lags (using LR test,
Information criteria: AIC, BIC etc.)
35
Concerns
Data requirements (long time series)
Imprecise estimated coefficients (overfitting the model).
Solution – restrict or weight coefficients
Computationally intensive
36
References
courses.ttu.edu/isqs6348-westfall/VARPresentation.ppt
Chapter 1: Vector Autoregressions.
https://www2.bc.edu/~iacoviel/teach/0809/EC751_files/var.p
df
Chapter 6: Multivariate time series models.
www.nek.lu.se/.../Ch6%20Multivar
iate%20time%20series%20models
37
References
http://www.uio.no/studier/emner/sv/oekonomi/ECON5101/v
11/undervisningsmateriale/Lect7v11.pdf
Dwyer, Gerald P., Jr. Why Are Vector Autoregressions Useful
in Finance? http://jerrydwyer.com/pdf/lectvar.pdf
Vector Autoregressions: Forecasting and Reality.http://
www.frbatlanta.org/filelegacydocs/robtallman.pdf
38
References
Chapter 11: Vector Autoregressive Models for Multivariate
Time Series.
http://faculty.washington.edu/ezivot/econ584/notes/varMode
ls.pdf
https://www.otexts.org/fpp/9/2
39