introduction to var models - nicola · pdf fileintroduction to var models. nicola viegi var...

24
1/23 Nicola Viegi Var Models Nicola Viegi University of Pretoria July 2010 Introduction to VAR Models Introduction to VAR Models

Upload: buinhan

Post on 24-Feb-2018

246 views

Category:

Documents


3 download

TRANSCRIPT

1/23Nicola Viegi Var Models

Nicola ViegiUniversity of Pretoria

July 2010

Introduction to VAR ModelsIntroduction to VAR Models

2/23Nicola Viegi Var Models

Introduction

Origins of VAR models

Sims "Macroeconomics and Reality" Econometrica 1980

It should be feasible to estimate large macromodels as unrestricted reduced forms, treating all variables as endogenous

Natural extension of the univariate autoregressive model to multivariate time series

Especially useful for describing the dynamic behaviour of economic and financial time series

Benchmark in forecasting Used for structural inference

3/23Nicola Viegi Var Models

Structural VARStructural VAR

t 10 12 t 11 t 1 12 t 1 yt

t 20 21 t 21 t 1 22 t 1 zt

y b b z y z

z b b y y z− −

− −

= − +γ +γ +ε

= − +γ +γ +ε

• The two variables y and z are endogenous.

• The error terms (structural shocks) εyt and εzt are white noise innovations with standard deviations σy and σz and a zerocovariance.

• Shock εyt affects y directly and z indirectly.• There are 10 (8 coefficients and two standard deviations of the

errors) parameters to estimate.

Consider a bivariate Yt=(yt, zt), first-order VAR model:

4/23Nicola Viegi Var Models

Standard VARStandard VAR

• The structural is not estimable directly• VAR in reduced form is estimable.• In a reduced form representation y and z are just

functions of lagged y and z.• To solve for a reduced form write the structural VAR

in matrix form as:

⎥⎦

⎤⎢⎣

⎡+⎥⎦

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡+⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

zt

yt

t

t

t

t

zy

bb

zy

bb

εε

γγγγ

1

1

2221

1211

20

10

21

12

11

ttt YBY ε+Γ+Γ= −110

or, in short

5/23Nicola Viegi Var Models

Standard VARStandard VAR

• Premultipication by B-1 allow us to obtain a standard VAR(1):

• This reduced form can be estimated (by OLS equation by equation)• Before estimating

• Determine the optimal lag length of the VAR• Determine stability conditions (roots of the system inside the unit circle)

• After estimating the reduced form• Hypothesis Testing – Granger Casuality• Impulse Response Function• Variance Decomposition• Identification of Structural VAR

ttt

ttt

ttt

aYAAYBYBBY

YBY

++=+Γ+Γ=

+Γ+Γ=

−−

−−

110

111

10

1110

ε

ε

6/23Nicola Viegi Var Models

Determining the optimal lag length: Determining the optimal lag length: Information Criterion in a Standard VAR(p)Information Criterion in a Standard VAR(p)

( )

( )

2

2

2AIC ln p (n p n)T

ln(T)SBC ln p (n p n)T

= + +

= + +

Σ

Σ

Information Criteria (IC) can be used to choose the“right” number of lags in a VAR(p): that minimizes IC(p) for p=1, ..., P .

AIC criterion asymptotically overestimates the order with positive probability

SBC criterion estimates the order consistently if the true p is less than the p(max)

7/23Nicola Viegi Var Models

Stability of the system Stability of the system —— roots of the companion matrixroots of the companion matrix

Same concept of stability than in univariate time series

The system is stable if the root of the matrix A1 of the system are all less than 1 in absolute value

ttt aYAAY ++= −110

If not Vector Error Correction Models and Cointegration Models more appropriate.

8/23Nicola Viegi Var Models

GrangerGranger CausalityCausality TestTest

ahead periods , ofForecast t sX

tt

tt

tt

tt

XYYX

sXYsXMSEsXMSE

forecast toeinformativlinearly not is respect to with exogenous is

0 cause-Grangernot does then ))(ˆ())(ˆ( If )2()1(

⇔⇔

>∀=

Granger (1969) “Investigating Causal Relations by Econometric Models and Cross-Spectral Methods”, Econometrica, 37

Consider two random variables tt YX ,

,....),,....,|()(ˆ,....),|()(ˆ11

)2(1

)1(−−+−+ == ttttsttttstt YYXXXEsXXXXEsX

2))(ˆ())(ˆ( sXXEsXMSE tstt −= +Define Minimum square error

9/23Nicola Viegi Var Models

Assume a lag length of p

tptpttptpttt aXYYXXXcX +++++++= −−−−−− βββααα ......... 221122111

Estimate by OLS and test for the following hypothesis

0any :) cause-Grangernot does ( 0......:

1

210

====

i

ttp

HXYH

β

βββ

Unrestricted sum of squared residuals

Restricted sum of squared residuals

∑=t

taRSS 21 ˆ

∑=t

taRSS 22

ˆ

( )12,,

1

12

ifreject )12/(

/)(

−−>−−

−=

pTpFFpTRSS

pRSSRSSF

α

Important – Stationarity of the data

GrangerGranger CausalityCausality TestTest

10/23Nicola Viegi Var Models

Impulse Response FunctionImpulse Response Function

Objective: Show the reaction of the system to a shock

........: at time Redating

)]([)(

....)(,stationary-covariance is system theIf

....

112211

12211

2211

+Ψ+Ψ++Ψ+Ψ++=+

Φ=Ψ

+Ψ+Ψ++=Ψ+=

+Φ++Φ+Φ+=

−+−+−+++

−−

−−−

tstsstststst

ttttt

tptpttt

aaaaaYst

LL

aaaaLY

aYYYcY

µ

µµ

[ ])(,

)(

'

sij

jt

sti

sijs

t

st

ayaY

ψ

ψ

=∂∂

=Ψ=∂∂

+

+

n x n

Reaction of the i-variable to a unit changein innovation j

(multipliers)

11/23Nicola Viegi Var Models

Impulse Response FunctionImpulse Response Function

Impulse-response function: response of to one-time impulse in with all other variables dated t or earlier held constant.

stiy +,

jty

ijjt

sti

ay

ψ=∂∂ +,

s

ijψ

1 2 3

12/23Nicola Viegi Var Models

ExampleExample: IRF : IRF forfor a VAR(1)a VAR(1)

⎥⎥⎦

⎢⎢⎣

⎡=Σ⎥

⎤⎢⎣

⎡+⎥

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

2212

122

1

2

1

2

11

2221

1211

2

1 ;1 σσ

σσφφφφ

at

tt

t

t

aa

yy

yy

t

occur) shocks more no(unit) 1by increases (10

00

220

21

t

tt

yatyyt

====<

Reaction of the system

⎥⎦

⎤⎢⎣

⎡Φ=⎥

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

⎥⎦

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

10

10

10

10

10

12221

1211

2

1

2

2221

1211

21

11

2221

1211

22

12

22

11

2221

1211

21

11

20

10

ss

s

s

yy

yy

yy

yy

yy

φφφφ

φφφφ

φφφφ

φφ

φφφφ

M

(impulse)

13/23Nicola Viegi Var Models

ForecastForecast Error Error VarianceVariance DecompositionDecomposition

Contribution of the j-th orthogonalized innovation to the MSE of the s-period ahead forecast

If shocks does not explain none of the forecast error variance of at all forecast horizon we can say that the sequence is exogenous

14/23Nicola Viegi Var Models

Identification in a Standard VAR(1)Identification in a Standard VAR(1)

ytt 10 t 111 1212

t 20 21 22 t 1 zt

y b y1 bz b z0 1

εγ γ ⎡ ⎤⎡ ⎤ ⎡ ⎤ ⎡ ⎤⎡ ⎤⎡ ⎤= + + ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥⎢ ⎥ γ γ ε⎣ ⎦ ⎣ ⎦⎣ ⎦ ⎣ ⎦ ⎣ ⎦ ⎣ ⎦

Is it possible to recover the parameters in the structural VAR from the estimated parameters in the standard VAR? No!!

There are 10 parameters in the bivariate structural VAR(1) and only 9 estimated parameters in the standard VAR(1).

The VAR is underidentified.

If one parameter in the structural VAR is restricted the standard VAR is exactly identified.

Sims (1980) suggests a recursive system to identify the model letting b21=0. Choleski decomposition.

15/23Nicola Viegi Var Models

Identification in a Standard VAR(1) Identification in a Standard VAR(1)

ytt 10 t 111 1212 12 12

t 20 21 22 t 1 zt

t 10 t 1 1t11 12

t 20 21 22 t 1 2t

y b y1 b 1 b 1 bz b z0 1 0 1 0 1

y a y ea az a a a z e

εγ γ− − − ⎡ ⎤⎡ ⎤ ⎡ ⎤ ⎡ ⎤⎡ ⎤⎡ ⎤ ⎡ ⎤ ⎡ ⎤= + + ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥γ γ ε⎣ ⎦ ⎣ ⎦ ⎣ ⎦⎣ ⎦⎣ ⎦ ⎣ ⎦ ⎣ ⎦ ⎣ ⎦

⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤⎡ ⎤= + +⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥

⎣ ⎦⎣ ⎦ ⎣ ⎦ ⎣ ⎦ ⎣ ⎦

The parameters of the structural VAR can now be identified from the following 9 equations

2 2 210 10 12 20 20 20 1 y 12 z

211 11 12 21 21 21 2 z

212 12 12 22 22 22 1 2 12 z

a b b b a b var(e ) b

a b a var(e )a b a cov(e ,e ) b

= − = =σ + σ

= γ − γ = γ =σ

= γ − γ = γ = − σ

b21=0 implies

16/23Nicola Viegi Var Models

Identification in a Standard VAR(1)Identification in a Standard VAR(1)

Both structural shocks can now be identified

b21=0 implies y does not have a contemporaneous effect on z.

Both εyt and εzt affect y contemporaneously but only εzt affects z contemporaneously.

The residuals of e2t are due to pure shocks to z.

There are other methods used to identify models – Restrictions coming from theory – (Sims Bernake, Blanchard and Quah etc)

17/23Nicola Viegi Var Models

CriticsCritics onon VARVAR

A VAR model can be a good forecasting model, but it is an atheoreticalmodel (as all the reduced form models are).

To calculate the IRF, the order matters: Identification not unique.

Sensitive to the lag selection

Dimensionality problem.

Standard Tool for Macroeconomic Analysis

18/23Nicola Viegi Var Models

An example of VAR analysisAn example of VAR analysis

Leeper Sims and Zha (1996) “What does monetary policy do”

19/23Nicola Viegi Var Models

The model

..

Money M Income, X Prices,

2

2

2

2

1

1

1

1

t

t

pt

pt

pt

p

t

t

t

t

t

t

t

t

t

t

t

tt

a

M

X

P

MXP

MXP

cYMXP

Y

P

+⎥⎥⎥

⎢⎢⎢

Φ+⎥⎥⎥

⎢⎢⎢

⎡Φ+

⎥⎥⎥

⎢⎢⎢

⎡Φ+=

⎥⎥⎥

⎢⎢⎢

⎡=

===

)1(

333231

232221

131211

1

⎥⎥⎥

⎢⎢⎢

⎡=Φ

φφφφφφφφφ

⎩⎨⎧

≠=Ω

==ττ

τ tt

aaEaE tt 0)'(0)(

Where And

Steps: • Optimal Lag Length• Stability• Residual Analysis• Identification (if interest in structural form or in structural shocks)• Impulse Response Function • Variance Decomposition

20/23Nicola Viegi Var Models

Optimal VAR Lag Length Selection Criteria

21/23Nicola Viegi Var Models

-1-.

50

.51

Imag

inar

y

-1 -.5 0 .5 1Real

Roots of the companion matr ix

Command varstable, graph after var or svar

Stability of the VAR — Roots of the companion matrix

22/23Nicola Viegi Var Models

Granger Causality Test

Command – vargranger after varbasic, var or svar

23/23Nicola Viegi Var Models

-.005

0

.005

.01

.015

-.005

0

.005

.01

.015

-.005

0

.005

.01

.015

0 50 0 50 0 50

varbasic, lm2, lm2 varbasic, lm2, lp varbasic, lm2, ly

varbasic, lp, lm2 varbasic, lp, lp varbasic, lp, ly

varbasic, ly, lm2 varbasic, ly, lp varbasic, ly, ly

95% CI orthogonalized irf

step

Graphs by irfname, impulse variable, and response variable

Cholesky Decomposition – Order Prices/Income/Money

varbasic lp ly lm2, lags(1/6) step(50) oirf

24/23Nicola Viegi Var Models

0

.5

1

0

.5

1

0

.5

1

0 50 0 50 0 50

varbasic, lm2, lm2 varbasic, lm2, lp varbasic, lm2, ly

varbasic, lp, lm2 varbasic, lp, lp varbasic, lp, ly

varbasic, ly , lm2 varbasic, ly, lp varbasic, ly, ly

95% CI fraction of mse due to impulse

step

Graphs by irfname, impulse variable, and response variable

Forecast Error Variance Decomposition - FEVD

varbasic lp ly lm2, lags(1/6) step(50) fevd