Linear and Linear-Nonlinear Models in DYNARE - Google Sites

0 downloads 267 Views 188KB Size Report
Apr 11, 2008 - iss = 1 β while in the steady-state, all the adjustment should cancel out so that xss = yss yflex,ss. =
Linear and Linear-Nonlinear Models in DYNARE Agostino Consolo [ [email protected] ] April 11, 2008

../Research/DSGE/NKM/MCodes/.../

A. Consolo

Introduction This is a technical note which describes how to deal with Dynare codes in case some of the equations are in linear form and others in nonlinear form. This can happen when a standard benchmark model is extended to accounf for other modeling features of the economy. In this case we don’t need to log-linearize the additional equations, but to appropriately writing them in the Dynare code. Any comment is welcome.

Dynare: A Linear NKM The description of a small macro model for monetary policy has been extensively discussed in the economic literature (see, for example, Clarida, Gal, and Gertler (2000) and Woodford (2003)). Here we present its log-linearized version: π ˜t x ˜t ˜ıt

= βEt π ˜ t+1 + κ˜ xt + e˜π,t , = Et x ˜t+1 − σ (˜ıt − Et π ˜ t+1 ) + e˜x,t , = φπ π ˜ t + φx x ˜t + e˜i,t ,

where the set of¡shocks¢ are the log deviations from their zero-mean steady-state value and are normally distributed - N µj , σ 2j , µj = 0 with j = π, x, i.

Dynare: A Mixed (Linear and Non-linear) NKM Here we use both linear and non-linear equations1 to check how dynare can handle such a mixed system " µ ¶−σ # σ 1 xt+1 (ex,t ) = βEt , (1) it πt+1 xt π ˜t ˜ıt

= βEt π ˜ t+1 + κ˜ xt + e˜π,t , = φπ π ˜ t + φx x ˜t + e˜i,t ,

(2) (3)

where equation (1) is standard nonlinear Euler equation deriving from the optimization problem in which, for simplicity, we add the shock ex,t to guarantee a straightforward comparison with the linear model.2 Here we should create a mapping between the variable in log-deviations from the steady state, {˜ πt, x ˜t , ˜ıt }, and the original variable in the system, {πt , xt , it }. A similar transformation needs to be done for the exogenous shocks processes.

Steady-State Values From equation (1) we obtain iss =

1 β

while in the steady-state, all the adjustment should cancel out so that xss =

yss

= 1 (no deviations yf lex,ss from potential/flexible output level, yf lex,ss ). The log-linearization assumption behind the Phillips curve is that there is no prices dispersion in the steady state and π ss = 1. 1I

thank Alessandro Notarpietro for helping me to fix the Dynare code. shock needs to be raised to the power of σ to guarantee that the effect of one standard deviation shock is comparable to the log-linearized model. By log-linearizing equation (1), we get: 2 The

Note on DSGE Models

σ˜ ex,t − ˜ıt

=

x ˜t

=

−Et π ˜ t+1 − σ (Et x ˜t+1 − x ˜t ) , 1 Et x ˜t+1 − (˜ıt − Et π ˜ t+1 ) + e˜x,t . σ

1 of 7

April 11, 2008

../Research/DSGE/NKM/MCodes/.../

A. Consolo

Hence, ˜ıt π ˜t x ˜t

= ln (it ) − ln (iss ) = ln (it ) + ln (β) , = ln (π t ) − ln (π ss ) = ln (π t ) , µ ¶ µ ¶ yt yss = ln − ln = ln (xt ) − ln (1) . yf lex,t yf lex,ss

Now, I turn to the exogenous process(es) e˜x,t = ρx e˜x,t−1 + u ˜x,t where u ˜x,t e˜x,t

¡ ¢ ∼ N 0, σ 2u,x , Ã ∼ N

µx , σ 2x

σ 2u,x = 1 − ρx

!

,

and = ln (ex,t ) − ln (ex,ss ) , ³ ³ 2 ´ ´ 2 2 ex,t ∼ LN eµx +σx /2 , eσx − 1 e2µx +σx , µ 2¶ σx E (ex,t ) | µx =0 = exp . 2 e˜x,t

Numerical Exercise about the size of the shock If σ x < 1 then the log-normal distribution looks like the normal one. Here a sample for Σ = {.01, .05, .1, .25, .5, .75, 1.0, 1.5} given the log-normal pdf ⎛ à ! ⎞¯ 2 2 ¯¯ 1 1 ln (x) ⎠¯ f (x) = √ exp ⎝− ¯ 2 σ σ 2π ¯ σ∈Σ

2.5

2

1.5

1

0.5

0 0

1.25

2.5

3.75

5

Range for Log-Normal PDF

Note on DSGE Models

2 of 7

April 11, 2008

../Research/DSGE/NKM/MCodes/.../

A. Consolo

Moments from the Log-normal and Normal PDF Σ = {.01, .05, .1, .25, .5, .75, 1.0, 1.5} then µ

¶¯ σ 2x ¯¯ = 1.0001 Mean: σx = 0.01 =⇒ exp 2 ¯σx =0.01 q¡ ¢ 2¯ 2 Standard Deviation: σ x = 0.01 =⇒ eσx − 1 eσx ¯σx =0.01 = 1.0001 × 10−2 µ

1 ¶¯ σ2x ¯¯ Mean (2): σ x = 1 =⇒ exp = e 2 = 1.6487 2 ¯σx =1 q¡ ¢ 2¯ 2 Standard Deviation (2): σx = 1 =⇒ eσx − 1 eσx ¯σx =1 = 2.1612

For small values of σ, the standard deviation of the log-normal distribution is almost equal to the one from the normal distribution!

Impulse Response Functions Impulse responses from the two models above are shown in order to compare their equivalence.

Linear Model −3

y 0.02

5

pai

x 10

4

0.015

3 0.01 2 0.005

0

1

20

40

60

0

80

20

r

40

60

80

60

80

ey

0.02

0.012 0.01

0.015 0.008 0.01

0.006 0.004

0.005 0.002 0

20

40

60

80

0

Linear Model - shock :

Note on DSGE Models

3 of 7

20

40

y

April 11, 2008

../Research/DSGE/NKM/MCodes/.../

A. Consolo

y

pai

0

0.04

−0.005 0.03

−0.01 −0.015

0.02 −0.02 −0.025

0.01

−0.03 −0.035

20

40

60

0

80

20

r

40

60

80

60

80

60

80

60

80

ep

0.05

0.012

0.04

0.01 0.008

0.03 0.006 0.02 0.004 0.01

0.002

0

20

40

60

0

80

20

Linear Model - shock :

−3

y 0

0

−0.002

−0.5

−0.004

−1

−0.006

−1.5

−0.008

−2

−0.01

20

−3

2.5

40

60

pai

x 10

−2.5

80

20

r

x 10

40

p

40

er 0.012 0.01

2

0.008 1.5 0.006 1 0.004 0.5 0

0.002 20

40

60

80

0

Linear Model - shock :

Note on DSGE Models

4 of 7

20

40

i

April 11, 2008

../Research/DSGE/NKM/MCodes/.../

A. Consolo

Nonlinear Model −3

y 0.02

6

0.015

pai

x 10

r 0.02 0.015

4

0.01

0.01 2

0.005 0

20

40

60

80

0

0.005 20

ey

40

60

0

80

0.015

0.02

6

0.015

0.01

20 −3

yt

x 10

40

60

80

60

80

60

80

60

80

pait

4

0.01 0.005 0

2

0.005 20

40

60

80

0

20

rt

40

60

80

60

80

0

20

40

eyt

0.02

0.015

0.015

0.01

0.01 0.005

0.005 0

20

40

60

80

0

20

40

Nonlinear Model - shock :

y

pai

0

0.04

−0.01

0.03

−0.02

0.02

−0.03

0.01

−0.04

20

40

60

80

0

0.04 0.02

20

0.01 0.005

40

60

80

0.03

−0.02

0.02

−0.03

0.01

−0.04

20

40

40

60

80

60

80

0

20

40

ept

0.04

0.01

0.02

0.005

60

80

0

20

40

Nonlinear Model - shock :

Note on DSGE Models

20

pait 0.04

0.015

40

0

80

0

0.06

20

60

−0.01

rt

0

40 yt

0.015

20

r 0.06

ep

0

y

5 of 7

p

April 11, 2008

../Research/DSGE/NKM/MCodes/.../

A. Consolo

−3

y 0

0

−3

pai

x 10

3

−1

2

−2

1

x 10

r

−0.005

−0.01

20

40

60

80

−3

20

er

40

60

0

80

0.015

20 −3

yt 0

0

0.01

x 10

40

60

80

60

80

pait

−1 −0.005

0.005

−2

0

20 −3

3

x 10

40

60

80

−0.01

rt

40

60

80

60

80

20

40

0.015 0.01

1

0.005

20

40

60

80

0

20

40

Nonlinear Model - shock :

Note on DSGE Models

−3

ert

2

0

20

6 of 7

i

April 11, 2008

Bibliography Clarida, R., J. Gal, and M. Gertler (2000): “Monetary Policy Rules and Macroeconomic Stability: Evidence and Some Theory,” The Quarterly Journal of Economics. Woodford, M. (2003): “Interest and Prices,” Princeton University Press.

7

Suggest Documents