Handout 15 DSGE Iris
Handout 15 DSGE Iris
Handout 15 DSGE Iris
Model
1. Introduction
2. Households
3. Firms
7. IRIS
Introduction
Dynamic Stochastic General Equilibrium (DSGE) models
u(C, O)
uC > 0 uO > 0
U (C0 , C1 , . . . , C∞ , O0 , O1 , . . . , O∞ )
Pt (Ct + St ) ≤ Wt Lt + Rt Kt + Πt
where
Ot + Lt = 1 ∀t
Kt+1 = (1 − δ)Kt + It
Ct ≤ Wt Lt + Rt Kt + Πt − St
≤ Wt Lt + Rt Kt + Πt − It
≤ Wt Lt + Rt Kt + Πt + (1 − δ)Kt − Kt+1
≤ Wt Lt + Πt + (1 + Rt − δ)Kt − Kt+1
Ct = Wt Lt + Πt + (1 + Rt − δ)Kt − Kt+1 ∀t = 0, 1, . . .
where K0 is predetermined.
*
We impose equality
©Randall Romero Aguilar, PhD
because uC > 0. EC-3201 / 2019.I 10
The consumer problem: dynamic programming
C = W L + Π + (1 + R − δ)K − K ′
uO = W uC (wrt labor)
′ ′
uC = β E V (K ) (wrt capital)
V ′ (K) = (1 + R − δ) uC
u (Ct , 1 − Lt ) = γ ln Ct + (1 − γ) ln(1 − Lt )
[ ]
Ct
1 = β E (1 + Rt+1 − δ)
Ct+1
γ
Ct = W (1 − Lt )
1−γ
Kt+1 = (1 − δ)Kt + It
Yt = At F (Kt , Lt )
FK > 0 FL > 0
We assume that
I Production has constant returns to scale:
At F (0, Lt ) = 0 At F (Kt , 0) = 0
lim FK = ∞ lim FL = ∞
K→0 L→0
lim FK = 0 lim FL = 0
K→∞ L→∞
max Πt = Yt − Wt Lt − Rt Kt
Kt ,Lt
s.t. Yt = At F (Kt , Lt )
or simply
max At F (Kt , Lt ) − Wt Lt − Rt Kt
Kt ,Lt
Rt Kt + Wt Lt = Yt
Πt = Yt − Rt Kt − Wt Lt = 0
ln At = (1 − ρ) ln Ā + ρ ln At−1 + ϵt
I In equilibrium, At = Ā.
I Productivity shocks cause persistent deviations in productivity
from its equilibrium value:
( )
∂ ln At+s − ln Ā
= ρs−1 > 0
∂ϵt
as long as ρ > 0.
I Although persistent, the effect of a shock is not permanent
( )
∂ ln At+s − ln Ā
lim = ρs−1 = 0
s→∞ ∂ϵt
( )α
Kt Yt
Wt = (1 − α)At = (1 − α)
Lt Lt
( )1−α
Lt Yt
Rt = αAt =α
Kt Kt
Yt = At Ktα L1−α
t
ln At = ρ ln At−1 + ϵt
Ct + It = Yt (resource constraint)
Yt = At F (Kt , Lt ) (technology constraint)
Kt+1 = (1 − δ)Kt + It (capital accumulation)
C = AF (K, L) + (1 − δ)K − K ′
u (Ct , 1 − Lt ) = γ ln Ct + (1 − γ) ln(1 − Lt )
F (Kt , Lt ) = Ktα L1−α
t
[( ) ]
Yt+1 Ct
1=βE α +1−δ
Kt+1 Ct+1
γ Yt
Ct = (1 − α) (1 − Lt )
1−γ Lt
Kt+1 = (1 − δ)Kt + It
[( ) ]
Yt+1 Ct
1=βE +1−δ
α
Kt+1 Ct+1
Ct γ Yt
= (1 − α)
1 − Lt 1−γ Lt
Kt+1 = (1 − δ)Kt + It
Yt = At Ktα Lt1−α
ln At = ρ ln At−1 + ϵt
Yt = Ct + It
I These equations characterize
solution of the social planner
problem
I There are no market
equilibrium conditions, because
©Randall Romero Aguilar, PhD EC-3201 / 2019.I 34
Central planner vs. competitive market equilibria
In this case, the steady state consists of prices W̄ and R̄, and
¯ L̄ and K̄ such that:
quantities Ā, Ȳ , C̄, I,
γ
1 = β(1 + R̄ − δ) C̄ = W̄ (1 − L̄)
1−γ
Ȳ
I¯ = δ K̄ W̄ = (1 − α)
L̄
Ȳ
R̄ = α Ȳ = ĀK̄ α L̄1−α
K̄
Ā = 1 Ȳ = C̄ + I¯
IRIS, part 1
I The .model file is a text file,
where we declare (usually) ! transition_variables
’ Income ’ Y
four sections: ’ Consumption ’ C
I !transition_variables ’ Investment ’ I
I !transition_shocks ’ Capital ’ K
’ Labour ’ L
I !parameters ’Wage ’ W
I !transition_equations ’ Real i n t e r e s t r a t e ’ R
’ Productivity ’ A
I Although not required, using
'labels' greatly improves ! transition_shocks
’ P r o d u c t i v i t y shock ’ e
readability.
IRIS, part 2
! parameters
’ Income s h a r e o f c a p i t a l ’ a l p h a = 0 . 3 5
’ Discount f a c t o r ’ beta = 0 . 9 7
’ P r e f e r e n c e s parameter ’ gamma = 0 . 4 0
’ Depreciation r a t e ’ d e l t a = 0.06
’ A u t o r r e g r e s i v e parameter ’ rho = 0 . 9 5
! transition_equations
’ Consumption v s . l e i s u r e c h o i c e ’
C = (gamma/(1−gamma) ) *(1−L ) *(1− a l p h a ) *Y/L ;
’ Euler equation ’
1 = beta * ( (C/C{+1}) * (R{+1} + (1− d e l t a ) ) ) ;
’ Production function ’
Y = A*(K{−1}^ a l p h a ) * ( L^(1− a l p h a ) ) ;
’ C a p i t a l accumulation ’
K = I + (1 − d e l t a ) * K{−1};
’ Investment equals savings ’
I = Y − C;
’ Labor demand ’
W = (1− a l p h a ) * A * (K{−1} / L ) ^ a l p h a ;
’ C a p i t a l demand ’
R = a l p h a * A * ( L / K{−1})^(1− a l p h a ) ;
’ P r o d u c t i v i t y AR( 1 ) p r o c e s s ’
l o g (A) = rho * l o g (A{−1}) + e ;
©Randall Romero Aguilar, PhD EC-3201 / 2019.I 43
The .m file: Working with the model
Matlab, part 1
I The .m file is a Matlab file,
where we work with the
clear all
model close all
I To work with IRIS, we need clc
to add it to the path using addpath C: \ IRIS
addpath i r i s s t a r t u p ()
I It is recommended to start %% READ MODEL FILE
with a clean session m = model ( ’ t o r r e s −
I We read the model using c h a p t e r 2 . model ’ ) ;
model
Matlab, part 2
%% INITIAL VALUES
P = g e t (m, ’ params ’ ) ;
I IRIS uses the sstate P .Y = 1 ;
command to look for the P.C = 0 . 8 ;
P. L = 0 . 3 ;
steady state P .K = 3 . 5 ;
I To use it, we have to guess P. I = 0 . 2 ;
P .W = (1−P . a l p h a ) *P .Y/P . L ;
initial values, which we P . R = P . a l p h a * P .Y/P .K;
assign to the model, P .A = 1 ;
starting with the initial
%% STEADY STATE
parameters in m = a s s i g n (m, P) ;
get(m,'params') m = s s t a t e (m, ’ b l o c k s=’ , t r u e ) ;
c h k s s t a t e (m)
g e t (m, ’ s s t a t e ’ )
A
1.12
1.1
1.08
1.06
1.04
1.02
1
-10 0 10 20 30 40 50
Y, @-1 C, @-1
0.15 0.1
0.08
0.1
0.06
0.04
0.05
0.02
0 0
0 20 40 0 20 40
I, @-1 K, @-1
0.4 0.15
0.3
0.1
0.2
0.05
0.1
0 0
0 20 40 0 20 40
L, @-1 W, @-1
0.06 0.1
0.08
0.04
0.06
0.02
0.04
0
0.02
-0.02 0
0 20 40 0 20 40
K, @-1 R, @-1
0.15 0.15
0.1
0.1
0.05
0.05
0
0 -0.05
0 20 40 0 20 40