esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione...

42
Structural-VAR II Dean Fantazzini Dipartimento di Economia Politica e Metodi Quantitativi University of Pavia

Transcript of esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione...

Page 1: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

Structural-VAR II

Dean Fantazzini

Dipartimento di Economia Politica e Metodi Quantitativi

University of Pavia

Page 2: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

Overview of the Lecture

1st Structural VARs with Combinations of I(1) and I(0) Data: The

Blanchard and Quah (1989) model

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 2

Page 3: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

Overview of the Lecture

1st Structural VARs with Combinations of I(1) and I(0) Data: The

Blanchard and Quah (1989) model

2nd Identifying the SVAR Using Long-Run Restrictions

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 2-a

Page 4: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

Overview of the Lecture

1st Structural VARs with Combinations of I(1) and I(0) Data: The

Blanchard and Quah (1989) model

2nd Identifying the SVAR Using Long-Run Restrictions

3rd Estimating the SVAR in the Presence of Long-Run Restrictions

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 2-b

Page 5: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

Overview of the Lecture

1st Structural VARs with Combinations of I(1) and I(0) Data: The

Blanchard and Quah (1989) model

2nd Identifying the SVAR Using Long-Run Restrictions

3rd Estimating the SVAR in the Presence of Long-Run Restrictions

4rd An empirical example with the BQ model (I)

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 2-c

Page 6: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

Overview of the Lecture

1st Structural VARs with Combinations of I(1) and I(0) Data: The

Blanchard and Quah (1989) model

2nd Identifying the SVAR Using Long-Run Restrictions

3rd Estimating the SVAR in the Presence of Long-Run Restrictions

4rd An empirical example with the BQ model (I)

5th An empirical example: Impulse responses with the BQ model (II)

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 2-d

Page 7: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

Overview of the Lecture

1st Structural VARs with Combinations of I(1) and I(0) Data: The

Blanchard and Quah (1989) model

2nd Identifying the SVAR Using Long-Run Restrictions

3rd Estimating the SVAR in the Presence of Long-Run Restrictions

4rd An empirical example with the BQ model (I)

5th An empirical example: Impulse responses with the BQ model (II)

6th A review empirical example: Cholesky factorization as structural

factorization

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 2-e

Page 8: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

Structural VARs with Combinations of I(1) and I(0) Data:The Blanchard and Quah (1989) model

Consider two observed series y1t and y2t such that y1t is I(1) and y2t is

I(0). This is the case, for example, in the famous analysis in Blanchard and

Quah (1989):

y1 = log of real GDP

y2 = unemployment rate

Define

yt = (∆y1t, y2t)′ =⇒ yt ∼ I(0)

Suppose yt has the structural representations

Byt = γ0 + Γ1yt−1 + εt

yt = µ + Θ(L)εt

Θ(L) = Ψ(L)B−1

E[εtε′

t] = D (= diagonal)

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 3

Page 9: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

Structural VARs with Combinations of I(1) and I(0) Data:The Blanchard and Quah (1989) model

The reduced form representations are:

yt = B−1

γ0 + B−1

Γ1yt−1 + B−1

εt = a0 + A1yt−1 + ut

= µ + Ψ(L)ut,

Ψ(L) = (I2 − A1L)−1,

E[utu′

t] = B−1

E[εtε′

t]B−1′

= B−1

DB−1′

= Ω

Note: BQ loosely interpret ε1t as a permanent (supply) shock since it is the

innovation to the I(1) real output series yt and interpret ε2t as a transitory

(demand) shock since it is the innovation to the I(0) unemployment series.

The structural IRFs are given by

∂∆y1t+s

∂ε1t

= θ(s)11 ,

∂∆y1t+s

∂ε2t

= θ(s)12

∂y2t+s

∂ε1t

= θ(s)21 ,

∂y2t+s

∂ε2t

= θ(s)22

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 4

Page 10: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

Structural VARs with Combinations of I(1) and I(0) Data:The Blanchard and Quah (1989) model

−→ Since y1t (output) is I(1), the long-run impacts on the level of y1 of

shocks to ε1 and ε1 are

lims→∞

∂y1t+s

∂ε1t

= θ11(1) =

∞∑

s=0

θ(s)11

lims→∞

∂y1t+s

∂ε2t

= θ12(1) =

∞∑

s=0

θ(s)12

−→ Since y2t (unemployment) is I(0), the long-run impacts on the level of

y2 of shocks to ε1 and ε2 are zero:

lims→∞

∂y2t+s

∂ε1t

= lims→∞

θ(s)2j = 0

For y2,

θ21(1) =

∞∑

s=0

θ(s)21

θ22(1) =

∞∑

s=0

θ(s)22

represent the cumulative impact of shocks to ε1 and ε2 on the level of y2.

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 5

Page 11: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

Identifying the SVAR Using Long-Run Restrictions

BQ (1989) achieve identification of the SVAR/SMA by assuming

• Transitory (demand) shocks (shocks to ε2) have no long-run impact on

the level of output or unemployment.

• They allow permanent (supply) shocks (shocks to ε1) to have a

long-run impact on the level of output but not on the level of

unemployment.

The restriction that shocks to ε2 have no long-run impact on the level of y1

implies that

θ12(1) =∞

s=0

θ(s)12 = 0.

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 6

Page 12: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

Identifying the SVAR Using Long-Run Restrictions

The restriction that shocks to ε1 and ε2 have no long-run effect on the

level of y2 is

lims→∞

∂y2t+s

∂εjt

= lims→∞

θ(s)2j = 0

which follows automatically since y2 ∼ I(0).

BQ (1989) assumptions imply that the long-run impact matrix Θ(1) is

lower triangular

Θ(1) =

θ11(1) 0

θ21(1) θ22(1)

Claim: The lower triangularity of Θ(1) can be used to identify B.

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 7

Page 13: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

Identifying the SVAR Using Long-Run Restrictions

To see why, consider the long-run covariance matrix of yt defined from the

Wold representation

Λ = Ψ(1)ΩΨ(1)′ = (I2 − A1)−1Ω(I2 − A1)−1′

Since

Ω = B−1

DB−1′

Θ(1) = Ψ(1)B−1 = (I2 − A1)−1B

−1,

Λ may be re-expressed as,

Λ = (I2 − A1)−1B

−1DB

−1′(I2 − A1)−1′ = Θ(1)DΘ(1)′

In order to identify B, BQ (1989) make the additional assumption

D = I2

so that the structural shocks ε1t and ε2t have unit variances. Then

Λ = Θ(1)Θ(1)′.

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 8

Page 14: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

Identifying the SVAR Using Long-Run Restrictions

Since Θ(1) is lower triangular, Λ can be obtained uniquely using the

Choleski factorization; that is, Θ(1) can be computed as the lower

triangular Choleski factor of Λ. The Choleski factorization of Λ is

Λ = PP′ = Θ(1)Θ(1)′

=⇒ Θ(1) = P

Given that Θ(1) = P can be computed directly from Λ, B can then be

computed using

P = Θ(1) = Ψ(1)B−1 = (I2 − A1)−1B

−1

=⇒ B = [(I2 − A1)P]−1

and the SVAR model is exactly identified.

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 9

Page 15: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

Estimating the SVAR in the Presence of Long-Run Restrictions

The estimation of B and Θ(L) using the BQ identification scheme can be

accomplished with the following steps:

• Estimate the reduced form VAR by OLS equation by equation:

yt = a0 + A1yt−1 + ut

Ω =1

T

T∑

t=1

utu′

t

• Compute a parametric estimate of the long-run covariance matrix:

Λ = (I2 − A1)−1Ω(I2 − A1)−1′

• Compute the Choleski factorization of Λ:

Λ = PP′

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 10

Page 16: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

Estimating the SVAR in the Presence of Long-Run Restrictions

• Define the estimate of Θ(1) as the lower triangular Choleski factor of

Λ,

Θ(1) = P

• Estimate B using

B =[

(I2 − A1)Θ(1)]

−1

• Estimate Θk using

Θk = ΨkB−1 = A

k

1B−1

From the estimated Θk matrices the structural IRF may then be

computed. Also, estimates of the structural shocks ε1t and ε2t may be

extracted using εt = But.

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 11

Page 17: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

An empirical example with the BQ model (I)

The following program replicates the long-run restriction model by

Blanchard-Quah (1989) (the data are not the same as those in the original

paper so that the results do not match). The ∆Y (output growth) and U

(unemployment) series are already demeaned following the procedure by

Blanchard-Quah (1989).

−→ The program estimates the factorization matrix by two different

methods which should all yield the same result.

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 12

Page 18: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

An empirical example with the BQ model (I)

’ Blanchard-Quah long-run restriction (11/5/99)

’ verify estimates using two methods

’change path to program path

%path = @runpath

cd %path

’ create workfile

wfcreate blanquah q 1948:1 1987:4

’ fetch data from database (already demeaned)

fetch(d=data svar) dy u

’ estimate VAR (no constant)

var var1.ls 1 8 dy u @

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 13

Page 19: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

An empirical example with the BQ model (I)

’-------------------------------------------------------------------

’ method 1: text form long-run restrictions

’-------------------------------------------------------------------

var1.cleartext(svar) var1.append(svar) @lr1(@u1)=0

freeze(tab1) var1.svar(rtype=text,conv=1e-4)

show tab1

’ store estimated A and B matrices from method 1

matrix mata1 = var1.@svaramat

’ A should be identity

matrix matb1 = var1.@svarbmat

’-------------------------------------------------------------------

’ method 2: long-run restrictions in short-run form

’ *not recommended; only for checking*

’-------------------------------------------------------------------

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 14

Page 20: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

An empirical example with the BQ model (I)

’ get unit (cumulated) long-run response

var1.impulse(imp=u)

matrix clr = var1.@lrrsp

var1.cleartext(svar)

var1.append(svar) @e1 = c(1)*@u1 + c(2)*@u2

var1.append(svar) @e2 = -clr(1,1)*c(1)/clr(1,2)*@u1 + c(4)*@u2

freeze(tab2) var1.svar(rtype=text,conv=1e-5)

show tab2

’ store estimated A and B matrices from method 2

matrix mata2 = var1.@svaramat

’ A should be identity

matrix matb2 = var1.@svarbmat

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 15

Page 21: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

An empirical example with the BQ model (I)

You should get these results:

Structural VAR Estimates

Sample (adjusted): 1950Q2 1987Q4

Convergence achieved after 9 iterations

Structural VAR is just-identified

Model: Ae = Bu where E[uu’]=I

Restriction Type: long-run text form

Long-run response pattern:

0 C(2)

C(1) C(3)

Coefficient Std. Error z-Statistic Prob.

C(1) 4.043213 0.232661 17.37815 0.0000

C(2) 0.005186 0.000298 17.37815 0.0000

C(3) 0.008335 0.329032 0.025333 0.9798

Log likelihood 495.5765

Estimated A matrix:

1.000000 0.000000

0.000000 1.000000

Estimated B matrix:

0.009296 0.000746

-0.208221 0.219819

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 16

Page 22: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

An empirical example with the BQ model (I)

-0.2

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1 2 3 4 5 6 7 8 9 10

Response of DY to DY

-0.2

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1 2 3 4 5 6 7 8 9 10

Response of DY to U

-50

-40

-30

-20

-10

0

10

1 2 3 4 5 6 7 8 9 10

Response of U to DY

-50

-40

-30

-20

-10

0

10

1 2 3 4 5 6 7 8 9 10

Response of U to U

Response to Nonfactorized One Unit Innovations

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 17

Page 23: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

An empirical example with the BQ model (I)

Structural VAR Estimates

Sample (adjusted): 1950Q2 1987Q4

Included observations: 151 after adjustments

Convergence achieved after 8 iterations

Structural VAR is just-identified

Model: Ae = Bu where E[uu’]=I

Restriction Type: short-run text form

@E1 = C(1)*@U1 + C(2)*@U2

@E2 = -CLR(1,1)*C(1)/CLR(1,2)*@U1 + C(4)*@U2

where

@e1 represents DY residuals

@e2 represents U residuals

Coefficient Std. Error z-Statistic Prob.

C(1) 0.009296 0.000535 17.37815 0.0000

C(2) 0.000746 0.000758 0.984581 0.3248

C(4) 0.219819 0.021145 10.39558 0.0000

Log likelihood 495.5765

Estimated A matrix:

1.000000 0.000000

0.000000 1.000000

Estimated B matrix:

0.009296 0.000746

-0.208221 0.219819

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 18

Page 24: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

An empirical example: Impulse responses with the BQ model (II)

The following program replicates the long-run restriction model by

Blanchard-Quah (1989) (the data are not the same as those in the original

paper so that the results do not match). The ∆Y (output growth) and U

(unemployment) series are already demeaned following the procedure by

Blanchard-Quah (1989).

−→ To plot the accumulated response and the level response in one graph,

we first store the impulse responses in separate matrices, extract and place

the relevant columns into a third matrix, and use the line view of that

matrix.

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 19

Page 25: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

An empirical example: Impulse responses with the BQ model (II)

’ replicate impulse response graph

’ from long-run restriction (Blanchard-Quah 1989)

’change path to program path

%path = @runpath

cd %path

’ create workfile

wfcreate blanquah q 1948:1 1987:4

’ fetch data from database (already demeaned)

fetch(d=data svar) dy u

’ change to percentage

dy = 100*dy

’ estimate VAR (no constant)

var var1.ls 1 8 dy u @

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 20

Page 26: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

An empirical example: Impulse responses with the BQ model (II)

’ impose long-run restrictions

’ @u1 = aggregate demand shock

’ @u2 = aggregate supply shock

var1.cleartext(svar)

var1.append(svar) @lr1(@u1)=0

’ estimate factorization

freeze(tab1) var1.svar(rtype=text,conv=1e-5)

’ set response horizon

!hrz = 40

’ replicate Figures 3-4 (p.662)

’ accumulate to get level response of output

freeze(fig3) var1.impulse(!hrz,imp=struct,se=a,a,matbys=rsp acc) dy @ 1

freeze(fig4) var1.impulse(!hrz,imp=struct,se=a,a) dy @ 2

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 21

Page 27: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

An empirical example: Impulse responses with the BQ model (II)

freeze(fig34) fig3 fig4

show fig34

’ replicate Figures 5-6

freeze(fig5) var1.impulse(!hrz,imp=struct,se=a,matbys=rsp lvl) u @ 1

freeze(fig6) var1.impulse(!hrz,imp=struct,se=a) u @ 2

freeze(fig56) fig5 fig6

show fig56

’ replicate Figure 1

matrix(!hrz,2) mtmp

’ get accumulated output response

vector v = @columnextract(rsp acc,1)

colplace(mtmp,v,1)

’ get level unemployment response

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 22

Page 28: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

An empirical example: Impulse responses with the BQ model (II)

v = @columnextract(rsp lvl,2)

colplace(mtmp,v,2)

freeze(fig1) mtmp.line

fig1.draw(line,left) 0

fig1.elem(1) legend(Output response to demand)

fig1.elem(2) legend(Unemployment response to demand)

show fig1

’ replicate Figure 2

’ get accumulated output response

vector v = @columnextract(rsp acc,3)

colplace(mtmp,v,1)

’ get level unemployment response

v = @columnextract(rsp lvl,4)

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 23

Page 29: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

An empirical example: Impulse responses with the BQ model (II)

colplace(mtmp,v,2)

freeze(fig2) mtmp.line

fig2.draw(line,left) 0

fig2.elem(1) legend(Output response to supply)

fig2.elem(2) legend(Unemployment response to supply)

show fig2

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 24

Page 30: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

An empirical example: Impulse responses with the BQ model (II)

-0.8

-0.4

0.0

0.4

0.8

1.2

1.6

5 10 15 20 25 30 35 40

Output response to demandUnemployment response to demand

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 25

Page 31: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

An empirical example: Impulse responses with the BQ model (II)

-0.2

0.0

0.2

0.4

0.6

0.8

1.0

5 10 15 20 25 30 35 40

Output response to supplyUnemployment response to supply

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 26

Page 32: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

An empirical example: Impulse responses with the BQ model (II)

-0.2

0.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

5 10 15 20 25 30 35 40

Accumulated Response of DY to StructuralOne S.D. Shock1

-0.2

0.0

0.2

0.4

0.6

0.8

1.0

5 10 15 20 25 30 35 40

Accumulated Response of DY to StructuralOne S.D. Shock2

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 27

Page 33: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

An empirical example: Impulse responses with the BQ model (II)

-.6

-.5

-.4

-.3

-.2

-.1

.0

.1

5 10 15 20 25 30 35 40

Response of U to StructuralOne S.D. Shock1

-.2

-.1

.0

.1

.2

.3

5 10 15 20 25 30 35 40

Response of U to StructuralOne S.D. Shock2

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 28

Page 34: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

A review empirical example: Cholesky factorization asstructural factorization

−→ The following program illustrates the two forms of imposing the

identifying restrictions in structural decompositions.

For illustration purposes and to check that the restrictions are correctly

imposed, we impose restrictions that replicate the Cholesky factorization.

As you can see the results resulting from the three methods are the same.

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 29

Page 35: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

A review empirical example: Cholesky factorization asstructural factorization

’ replicate cholesky factorization using SVAR

’change path to program path

%path = @runpath

cd %path

’ create workfile

wfcreate cholsvar q 1948:1 1979:3

’ fetch data from database

fetch(d=data svar) rgnp rinv m1

’ take log of each series

series lgnp = log(rgnp)

series linv = log(rinv)

series lm1 = log(m1)

’ estimate unrestricted VAR

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 30

Page 36: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

A review empirical example: Cholesky factorization asstructural factorization

var var1.ls 1 4 lgnp linv lm1 @ c

’-------------------------------------------------------------------

’ method 1: short-run restrictions in text form

’-------------------------------------------------------------------

var1.cleartext(svar)

var1.append(svar) @e1 = c(1)*@u1

var1.append(svar) @e2 = -c(2)*@e1 + c(3)*@u2

var1.append(svar) @e3 = -c(4)*@e1 - c(5)*@e2 + c(6)*@u3

freeze(tab1) var1.svar(rtype=text,conv=1e-5)

show tab1

’ store estimated A and B matrices from method 1

matrix mata1 = var1.@svaramat

matrix matb1 = var1.@svarbmat

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 31

Page 37: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

A review empirical example: Cholesky factorization asstructural factorization

’ compute factorization matrix

matrix fact1 = @inverse(mata1)*matb1

’-------------------------------------------------------------------

’ method 2: short-run restrictions in pattern matrix

’-------------------------------------------------------------------

’ create pattern matrices

matrix(3,3) pata

’ fill matrix in row major order

pata.fill(by=r) 1,0,0, na,1,0, na,na,1

matrix(3,3) patb

patb.fill(by=r) na,0,0, 0,na,0, 0,0,na

freeze(tab2) var1.svar(rtype=patsr,conv=1e-5,namea=pata,nameb=patb)

show tab2

’ store estimated A and B matrices from method 2

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 32

Page 38: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

A review empirical example: Cholesky factorization asstructural factorization

matrix mata2 = var1.@svaramat

matrix matb2 = var1.@svarbmat

’ compute factorization matrix

matrix fact2 = @inverse(mata2)*matb2

’-------------------------------------------------------------------

’ method 3: built-in cholesky

’-------------------------------------------------------------------

’ do impulse response with default Cholesky ordering

var1.impulse(10)

’ store cholesky factor

matrix fact3 = var1.@impfact

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 33

Page 39: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

A review empirical example: Cholesky factorization asstructural factorization

Model: Ae = Bu where E[uu’]=I

Restriction Type: short-run text form

@E1 = C(1)*@U1

@E2 = -C(2)*@E1 + C(3)*@U2

@E3 = -C(4)*@E1 - C(5)*@E2 + C(6)*@U3 where

@e1 represents LGNP residuals

@e2 represents LINV residuals

@e3 represents LM1 residuals

Coefficient Std. Error z-Statistic Prob.

C(2) -1.267693 0.174224 -7.276223 0.0000

C(4) -0.163608 0.052334 -3.126221 0.0018

C(5) 0.024427 0.022646 1.078662 0.2807

C(1) 0.010597 0.000676 15.68439 0.0000

C(3) 0.020475 0.001305 15.68439 0.0000

C(6) 0.005142 0.000328 15.68439 0.0000

Estimated A matrix:

1.000000 0.000000 0.000000

-1.267693 1.000000 0.000000

-0.163608 0.024427 1.000000

Estimated B matrix:

0.010597 0.000000 0.000000

0.000000 0.020475 0.000000

0.000000 0.000000 0.005142

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 34

Page 40: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

A review empirical example: Cholesky factorization asstructural factorization

Model: Ae = Bu where E[uu’]=I Restriction Type: short-run pattern matrix

A =

1 0 0

C(1) 1 0

C(2) C(3) 1

B =

C(4) 0 0

0 C(5) 0

0 0 C(6)

Coefficient Std. Error z-Statistic Prob.

C(1) -1.267693 0.174224 -7.276223 0.0000

C(2) -0.163608 0.052334 -3.126221 0.0018

C(3) 0.024427 0.022646 1.078662 0.2807

C(4) 0.010597 0.000676 15.68439 0.0000

C(5) 0.020475 0.001305 15.68439 0.0000

C(6) 0.005142 0.000328 15.68439 0.0000

Estimated A matrix:

1.000000 0.000000 0.000000

-1.267693 1.000000 0.000000

-0.163608 0.024427 1.000000

Estimated B matrix:

0.010597 0.000000 0.000000

0.000000 0.020475 0.000000

0.000000 0.000000 0.005142

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 35

Page 41: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

A review empirical example: Cholesky factorization asstructural factorization

-.010

-.005

.000

.005

.010

.015

1 2 3 4 5 6 7 8 9 10

Response of LGNP to LGNP

-.010

-.005

.000

.005

.010

.015

1 2 3 4 5 6 7 8 9 10

Response of LGNP to LINV

-.010

-.005

.000

.005

.010

.015

1 2 3 4 5 6 7 8 9 10

Response of LGNP to LM1

-.01

.00

.01

.02

.03

1 2 3 4 5 6 7 8 9 10

Response of LINV to LGNP

-.01

.00

.01

.02

.03

1 2 3 4 5 6 7 8 9 10

Response of LINV to LINV

-.01

.00

.01

.02

.03

1 2 3 4 5 6 7 8 9 10

Response of LINV to LM1

-.004

.000

.004

.008

.012

1 2 3 4 5 6 7 8 9 10

Response of LM1 to LGNP

-.004

.000

.004

.008

.012

1 2 3 4 5 6 7 8 9 10

Response of LM1 to LINV

-.004

.000

.004

.008

.012

1 2 3 4 5 6 7 8 9 10

Response of LM1 to LM1

Response to Cholesky One S.D. Innovations

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 36

Page 42: esercitazione SVAR 2 - economia.unipv.iteconomia.unipv.it/pagp/pagine_personali/dean/esercitazione SVAR_2.pdf · Overview of the Lecture ... This is the case, for example, ... Blanchard-Quah

A review empirical example: Cholesky factorization asstructural factorization

−→ The matrices FACT1, FACT2 and FACT3 are all equal to:

0.010597 0.000000 0.000000

0.013433 0.020475 0.000000

0.001406 -0.000500 0.005142

Advanced Time Series Econometrics

Dean Fantazzini 10 − 15 July 2006 37