Dynamic Identi cation of DSGE Models: Web Appendixsn2294/papers/kn_spectral_web.pdf · Dynamic...
Transcript of Dynamic Identi cation of DSGE Models: Web Appendixsn2294/papers/kn_spectral_web.pdf · Dynamic...
Dynamic Identification of DSGE Models:
Web Appendix
Ivana Komunjer and Serena Ng
October
This Appendix consists of details in ? along with two additional examples.
Details of Example 1
LetQ∗, C∗,K∗ be steady state values of output, consumption, and capital, and letR∗ = (1−δ)+αQ∗K∗ .The log-linearized model is
qt = αkt + zt
qt = (1− δK∗
Q∗)ct +
K∗
Q∗kt+1 − (1− δ)K
∗
Q∗kt
0 = Et
[ν(ct+1 − ct)− φβ
Q∗
K∗kt+2 + (α(1− α) + βφ(2− δ))βQ
∗
K∗kt+1
−φβ(1− δ)Q∗
K∗kt − αβ
Q∗
K∗zt+1
]zt = ψzt−1 + σεt
The structural model can be rewritten as
qt = γ1kt + zt
qt = γ2ct + γ3kt+1 + (1− γ2 − γ3)kt
= Et
[γ4(ct+1 − ct) + γ5kt+2 +
( γ1(1− γ1)γ1 + γ2 + γ3 − 1
+(1− γ2 − 2γ3)γ5
γ3
)kt+1
−(1− γ2 − γ3)γ5
γ3kt −
γ1
γ1 + γ2 + γ3 − 1zt+1
]zt = γ5zt−1 + γ6εt
where the structural parameters are
γ = (γ1, γ2, γ3, γ4, γ5, γ6) ≡(α, 1− δK
∗
Q∗,K∗
Q∗, ν, −φβQ
∗
K∗, ψ, σ
).
For this model, λkk is given by:
λkk =−B +
√B2 − 4AC2A
1
where
A ≡ −νK∗
C∗− φβ Y
∗
K∗, B ≡ ν
(1 +
1β
)K∗C∗
+ [α(1− α) + φ(2− δ)]β Y∗
K∗, C ≡ −ν
β
K∗
C∗− φβ(1− δ)Y
∗
K∗.
And λkz, λck, λcz equal:
λkz =(1− ψ)ν Y
∗
C∗ + αβψ Y ∗
K∗
ν[ 1β − λkk + 1− ψ]K∗
C∗ + β [α(1− α)− φ(2− δ)− φλkk − ψφ] Y ∗K∗
λck =K∗
C∗[1β− λkk]
λcz =K∗
C∗[Y ∗
K∗− λkz].
Solution Methods
θ0 = (α0, β0, δ0, φ0, ν0, ψ0, σ20) = (0.36, .95, 0.025, .16, 2, 0.85, 0.04).
For this model, direct the method of undetermined coefficients yields
kt = .9557kt−1 + .1521ztct = .5086kt−1 + .3334ztzt = .85zt−1 + εt.
Uhlig’s toolkit Let Wt = (yt, ct). The code
alpha=.36;beta=.95;delta=.025;nu=2;rho_Z=.85;phi=.16;sig2_Z=.04;Rstar=1/beta;kstar= (alpha/(Rstar-1+delta))^(1/(1-alpha));ystar=kstar^alpha;cstar=ystar-delta*kstar;AA=[ 0 ; kstar/ystar ; ];BB=[ alpha ; -((1-delta)/(1+g))*kstar/ystar ; ];CC=[-1 0; -1 1-delta*kstar/ystar];DD=[1 ; 0 ];FF=phi*beta*ystar/kstar;GG= -((alpha*(1-alpha)+phi*(2-delta))*beta*ystar/kstar);HH= phi*beta*(1-delta)*ystar/kstar;JJ= [0 -nu];KK= [ 0 nu];LL= alpha*beta*ystar/kstar;
2
MM=0;NN=rho_Z;Sigma=sig2_Z;[l_equ,m_states] = size(AA);[l_equ,n_endog ] = size(CC);[l_equ,k_exog ] = size(DD);
message = ’ ’;warnings = [];options;solve;disp(’PP’);mymprint(PP);disp(’QQ’);mymprint(QQ);disp(’RR’);mymprint(RR);disp(’SS’);mymprint(SS);
gives
P = .9557, Q = .1521, R =(.3600.5086
), S =
(1
.3334
). (1)
Sim’s code The code
n_k=1;n_w=2;n_z=1;n_f_k=1;n_f_w=2;n_y=n_f_k+n_f_w+ n_k+n_w+n_z;Jam0=zeros(n_y,n_y);Jam0(1:3,4:6)=eye(3);Jam0(4,end-1:end)=[1 -1];Jam0(5,4:6)=[-kstar/ystar -(1-delta*kstar/ystar) 1];Jam0(6,1:5)=[-phi*beta*ystar/kstar nu -alpha*beta*ystar/kstar ...
(alpha+phi*(2-delta))*beta*ystar/kstar -nu];Jam0(7,7)=1;Jam1=zeros(n_y,n_y);Jam1(1:3,1:3)=eye(3);Jam1(4,4)=alpha;Jam1(5,4)=-(1-delta)*kstar/ystar;Jam1(6,4)= phi*beta*(1-delta)*ystar/kstar;Jam1(end,end)=rho_Z;Jam2=zeros(n_y,1); Jam2(end)=1;
3
Jam3=zeros(n_y,n_f_k+n_f_w);Jam3(1:n_f_k+n_f_w,1:n_f_k+n_f_w)=-eye(n_f_k+n_f_w);;cons=zeros(ny,1);[G1,C,impact,fmat,fwt,ywt,gev,eu]=gensys(Jam0,Jam1,cons,Jam2,Jam3);
gives
Etkt+1
Etct+1
Etyt+1
ktctytzt
=
0 0 −0 0.9133 −0 −0 0.23340 0 −0 0.4860 −0 −0 0.30660 0 0 0.3440 −0 −0 0.76900 0 −0 0.9557 −0 −0 0.12930 0 −0 0.5086 −0 −0 0.28340 −0 −0 0.3600 −0 0 0.8500−0 0 0 −0 −0 0 0.8500
Et−1ktEt−1ctEt−1ytkt−1
ct−1
yt−1
zt−1
+
0.27460.36070.90470.15210.33341.00001.0000
εt
+
−1.3022 0.1681 0.2913−0.0213 1.0169 0.28910.0000 −0.0689 1.34500.0000 −0.1913 −0.04420.0000 1.0034 0.23160.0000 0.0000 −0.0000
0 −0.0000 0
∞∑s=1
−0.0000 0.3916 0.0904−0.0000 0.9081 0.2096−0.0000 −0.0000 −0.0000
s−1.0972.0956.7348
Etεt+s.
Thus
kt = .9557kt−1 + .1293zt−1 + .1521εtct = .5086kt−1 + .2834zt−1 + .3334εtyt = .3600kt−1 + .8500zt−1 + εt
zt = .85zt−1 + εt.
Note that since ψ = .85,
.1293zt−1 + .1521εt = .1521(ψzt−1 + εt) = .1521zt
.2834zt−1 + .3334εt = .3334(ψzt−1 + εt) = .3334zt.
Simple rearranging gives (??).
Klein’s alogirthm The code
A0=[ 1 0 0 0 0;0 1 0 0 0;0 0 0 0 0;0 -kstar/ystar 0 0 0;
0 (alpha+phi*(2-delta))*beta*ystar/kstar -phi*beta*ystar/kstar -alpha*beta*ystar/kstar\nu];B0=[rho_Z 0 0 0 0;
4
0 0 1 0 0;1 alpha 0 -1 0;0 -(1-delta)*kstar/ystar 0 -1 1-delta*kstar/ystar;0 phi*beta*(1-delta)*ystar/kstar 0 0 nu];
[f0,p0]=solab(A0,B0,2)
gives
F0 =
0.1521 0.95571.0000 0.36000.3334 0.5086
P0 =(
0.8500 00.1521 0.9557
)Thus, P,Q,R, S as defined in (??) can be easily extracted.
Details of Example 2
Uhlig’s Toolkit The code
tau = 2.0000;nu = 0.1000;kap = 0.3300;cyst = 0.8500;psi1 = 1.5000;psi2 = 0.1250;rhor = 0.7500;rhog = 0.9500;rhoz = 0.9000;rrst = 1.0000;pist = 3.2000;gamst= 0.5500;pistar2=exp(pist/400);rrstar2=exp(rrst/400);phi= tau*(1-nu)/nu/kap/pist^2;beta=1/rrstar2;gstar=1/cyst;cstar=(1-nu)^(1/tau);ystar=cstar*gstar;sig2r= .002^2;sig2g= .006^2;sig2z=.003^2;
par=[tau; kap; beta; psi1; psi2; rhor; rhog; rhoz; ];
Rstar=1/beta; gstar=.1; cstar=.1; ystar=.1; pistar=0.005; Zstar=0;ss0=[Rstar;gstar;cstar;ystar;pistar;;Zstar];[ss,fval,flag]=fsolve(’model_as_ss’,ss0);Rstar=ss(1);
5
gstar=ss(2);cstar=ss(3);ystar=ss(4);pistar=ss(5);Zstar=ss(6);disp(’Steady State’);disp(ss’);
VARNAMES=’R’;VARNAMES=strvcat(VARNAMES,’g’);VARNAMES=strvcat(VARNAMES,’c’);VARNAMES=strvcat(VARNAMES,’y’);VARNAMES=strvcat(VARNAMES,’pi’);VARNAMES=strvcat(VARNAMES,’e_R’);VARNAMES=strvcat(VARNAMES,’e_g’);VARNAMES=strvcat(VARNAMES,’e_Z’);
AA= [-1 -(1-rhor)*psi2 0;0 -1 0;0 -1 -1];
BB= [rhor 0 0;0 rhog 0;0 0 0];
CC= [ (1-rhor)*psi2 (1-rhor)*psi1;0 0;1 0];
DD= [1 0 0;0 1 0;0 0 0];
FF= [0 -1 0;0 0 0];
GG= [-1/tau 1 0;0 -kap 0];
HH = [0 0 0;0 0 0];
JJ= [ 1 1/tau;0 beta];
6
KK= [-1 0kap -1];
LL= [ 0 0 1/tau;0 0 0];
MM=[0 0 0;0 0 0];
NN= [ 0 0 0;0 0 0;0 0 rhoz];
Sigma=[sig2r 0 0;0 sig2g 0;0 0 sig2z];
[l_equ,m_states] = size(AA);[l_equ,n_endog ] = size(CC);[l_equ,k_exog ] = size(DD);
message = ’ ’;warnings = [];options;DISPLAY_IMMEDIATELY=1;solve;
gives Rtgtct
=
.5143 0 00 0 0
−1.1011 0 0
Rt−1
gt−1
ct−1
+
.6858 0 .60550 0 0
−1.1011 0 1.4863
εRtεgtzt
(ytπt
)=
(−.8528 .95 0−.5596 0 0
)Rt−1
gt−1
ct−1
+(−1.1011 1 1.4863−.7462 0 1.4909
)εRtεgtzt
(ztgt
)=
(.9 00 .95
)(zt−1
gt−1
)+(εztεgt
)Let Kt =
(Rt gt ct
)′ and Wt =(ytπt
). The solution is of the form P,Q,R,S with
P =
.5143 0 00 0 0
−1.1011 0 0
, Q =(−1.1011 1 1.4863−.7462 0 1.4909
), R =
(−.8528 .95 0−.5596 0 0
), S =
(−1.1011 1 1.4863−.7462 0 1.4909
)(2)
7
Dynare gives
Rt = .514326Rt−1 + .544980zt−1 + .605533εzt + .685769εrt= .514326Rt−1 + .606553zt + .685789εrt
gt = .95gt−1 + εgt
zt = .9zt−1 + εzt
yt = −.825828Rt−1 + .95gt−1 + εgt + 1.337764zt−1 + 1.486294εzt − 1.101104εrt= −.825828Rt−1+, 95gt−1 + 1.4868294zt + εgt − 1.101104εrt
ct = −.825828Rt−1 + 1.33764zt−1 + 1.486294εzt − 1.101104εrt= −.825828Rt−1 + 1.486294zt + 1.101104εrt
πt = −.559644Rt−1 + 1.341807zt−1 + 1.490897εzt − .746192εrt
Simple rearranging leads to the P,Q,R,S as defined in (??).
Sims’s Code Putting Gauss code provided by An and Schorfheide (2007) in Matlab:
tau = 2.0000;nu = 0.1000;kap = 0.3300;cyst = 0.8500;psi1 = 1.5000;psi2 = 0.1250;rhor = 0.7500;rhog = 0.9500;rhoz = 0.9000;rrst = 1.0000;pist = 3.2000;gamst= 0.5500;pistar2=exp(pist/400);rrstar2=exp(rrst/400);phi= tau*(1-nu)/nu/kap/pist^2;beta=1/rrstar2;gstar=1/cyst;cstar=(1-nu)^(1/tau);ystar=cstar*gstar;sig2r= .002^2;sig2g= .006^2;sig2z=.003^2;
Gam0=[ 1 0 0 0 0 0 0 0;0 1 0 0 0 0 0 0;
8
0 (1-rhor)*psi2 1 -(1-rhor)*psi2 -(1-rhor)*psi1 0 0 0;0 -kap 0 kap -1 0 beta 0 ;rhoz/tau (1-rhog) -1/tau -1 0 0 1/tau 1 ;0 0 0 0 0 0 0 0;0 0 0 0 1 0 0 00 0 0 1 0 0 0 0;];
Gam1=[ rhoz 0 0 0 0 0 0 0 ;0 rhog 0 0 0 0 0 0 ;0 0 rhor 0 0 0 0 0;0 0 0 0 0 0 0 0 ;g0 0 0 0 0 0 0 0 ;0 -1 0 1 0 -1 0 0 ;0 0 0 0 0 0 1 0;0 0 0 0 0 0 0 1;];
Gam2=zeros(8,3); Gam2(1:3,1:3)=eye(3);Gam3=zeros(8,2); Gam3(7:8,7:8)=eye(2);cons=zeros(8,1);[G1,C,impact,fmat,fwt,ywt,gev,eu]=gensys(Gam0,Gam1,cons,Gam2,Gam3);
gives
ztgtRtytπtct
Etπt+1
Etyt+1
=
0.9000 −0 0 0 −0 0 0 0−0 0.9500 −0 −0 0 −0 0 −0
0.5450 0 0.5143 0 0 −0 0 01.3377 0.9500 −0.8258 −0 −0 0 −0 −01.3418 0 −0.5596 −0 −0 0 −0 01.3377 0 −0.8258 −0 −0 0 −0 −00.9026 0 −0.2878 −0 −0 0 −0 00.7538 0.9025 −0.4247 −0 −0 0 −0 0
zt−1
gt−1
Rt−1
yt−1
πt−1
ct−1
Et−1πtEt−1yt
+
1.0000 −0 00 1.0000 −0
0.6055 0 0.68581.4863 1.0000 −1.10111.4909 0 −0.74621.4863 0 −1.10111.0029 0 −0.38380.8376 0.9500 −0.5663
εztεgtεRt
P,Q,R, S as defined in (??) can be easily extracted.
Example 3
An and Schorfheide (2007) considered two structural models with the same solution:
yt = ψyt−1 + ηt, ηt ∼ iid(0, 1) (3)
9
Model M1 has ψ = ρ, and is given by:
yt =1αEtyt+1 + ut, ut = ρut−1 + εt, εt ∼ iid(0, (1− ρ/α)2)
with θ ≡ (α, ρ). Model M2 has ψ = 12
(α−
√α2 − 4φα
)and is given by:
yt =1αEtyt+1 + εt, εt ∼ iid
(0,[α+
√α2 − 4φα2α
]2)with θ ≡ (α, φ).
The solution (1) is a special case of Equation (1) in ? obtained by setting Zt = ηt, Kt = yt, andleaving Wt empty. This implies nZ = 1, nK = 1, nW = 0. The solution parameters are P (θ) = ψ,Q(θ) = 1, Ψ(θ) = 0, and Σ(θ) = 1. They satisfy Assumptions 1 through whenever 0 < |ψ| < 1.Now note that nΛ = (nW + nK)(nK + nZ) + 2n2
Z = 4, nZ = 1, nθ = 2, so for both models we have:
nθ = 2 < (nW + nK)(nK + nZ) +nZ(nZ + 1)
2= 3.
Both models satisfy our order condition in Proposition 2. To examine the rank condition, the 4×3matrix ∆(θ) defined in Proposition 2 calculated for each of the two models is:
M1 : ∆(θ) =
0 1 00 0 10 0 00 0 −2
and M2 : ∆(θ) =
12
(1− α−2φ√
α2−4φα
)α√
α2−4φα0
0 0 10 0 00 0 −2
Hence, for both models the rank of ∆(θ) equals 2 < nθ + n2
Z = 3, so θ is not identifiable. This isnot surprising as in model M1, α can never be identified from (1), while in M2 the two componentsα and φ cannot be identified separately.
Indeed, we now confirm this intuitive observation by applying our partial and conditional iden-tification results. First, we show that the model M1 is partially identifiable in ρ. For this, set θi = ρand θ−i = α. Then, in Proposition 4 it holds that
rank(∂λ(θ,Id)∂θ−i
)= rank
0000
= 0 = rank∆(θ)− (nθ,i + n2Z) = 2− 2
which shows that model M1 is indeed partially identified in ρ.Next, we search for a priori restrictions that would allow for θ to be identified in each of
the models. For model M1, any scalar restriction such that ∂ϕ/∂α 6= 0 will be such that thecorresponding 5× 3 matrix ∆ϕ(θ) becomes of rank 3. Hence, θ will be identifiable under any suchrestriction. A simple example is the restriction α = α, i.e. ϕ(θ) = α − α. Of course, lettingϕ(θ) = ρ − ρ would fail to satisfy the rank condition. For model M2, the restrictions that willsatisfy the rank condition in Proposition 3 must be such that:
det
∂ϕ(θ)∂α
∂ϕ(θ)∂φ
12
(1− α−2φ√
α2−4φα
)α√
α2−4φα
6= 0.
For instance, setting α = α is sufficient to identify θ at any value θ0 = (α0, φ0) such that α0 6= 0.Similarly, setting φ = φ is also sufficient for identification provided φ0 6= 0.
10
Example 4
Chang- Doh and Schorfheide (2007) consider a one-sector stochastic growth model with technologyand labor supply shocks. Let Ct be consumption and Ht be hours. Utility is
Et
∞∑t=0
βt+s(
logCt+s −Ht+s/B
1+1/νt+s
1 + 1/ν
).
Resource constraint is
Yt = Ct +Kt+1 − (1− δ)Kt
= WtHt +RtKt
= (AtHt)αK1−αt
[1− φ
(Ht
Ht−1− 1)2]
.
Shocks are
logAt = γ + logAt−1 + εAt
logBt = ρBBt−1 + (1− ρB) logB0 + εBt
The parameter vector of interest is: θ = (α, β, γ, δ, φ, ν, ρB, lnA0, lnB0, σ2A, σ
2B)′ which is of
dimension nθ = 11. We focus on version 2 of the model (denoted A0) with stationary hours,0 6 ρB < 1, and with adjustment cost, φ > 0. The gensys code for this model is
1ν + 1− α+ 2φ(1 + β)/α 0 1 0 0 −2β φα −1− 1
ν
0 α(1− β (1−δ)exp(γ)) −1 0 1 −α(1− β 1−δ
exp(γ)) 0α −K∗
Y ∗ −C∗
Y ∗ 0 0 0 0−α 0 0 1 0 0 00 0 1 0 0 0 01 0 0 0 0 0 00 0 0 0 0 0 1
htkt+1
ctyt
Etct+1
Etht+1
Bt
=
2φα 1− α 0 0 0 0 00 0 0 0 0 0 00 −(1− α− I∗
Y ∗ + K∗
Y ∗ ) 0 0 0 0 00 1− α 0 0 0 0 00 0 0 0 1 0 00 0 0 0 0 1 00 0 0 0 0 0 ρB
ht−1
ktct−1
yt−1
Et−1ctEt−1htBt−1
+
−(1− α) 00 0
(1− α− I∗
Y ∗ + K∗
Y ∗ ) 0α− 1 0
0 00 00 1
(εAtεBt
)+
0 00 00 00 01 00 10 0
(ηctηht
)
11
Let Zt ≡ (at, bt)′, where at = ∆ lnAt − γ, bt = lnBt. Rearranging the ‘gensys’ output of Sims(2002), we obtain the P,Q,R, S representation of the model as follows:
Kt+1 =(htkt+1
)=
(Phh(θ) Phk(θ)Pkh(θ) Pkk(θ)
)(ht−1
kt
)+(Qha(θ) Qhb(θ)Qka(θ) Qkb(θ)
)(atbt
)Wt =
(ctyt
)=
(Ryh(θ) Ryk(θ)Rch(θ) Rck(θ)
)(ht−1
kt
)+(Sya(θ) Syb(θ)Sca(θ) Scb(θ)
)(atbt
)Zt =
(atbt
)=
(0 00 Ψb(θ)
)(at−1
bt−1
)+(εAtεBt
).
This model has two exogenous shocks εt ≡ (εAt, εBt)′ (nZ = 2), two observed state variablesKt ≡ (ht−1, kt)′ (nK = 2), and two endogenous variables Wt ≡ (yt, ct)′ (nW = 2). We have nΛ =(nK+nW )(nZ+nK)+2n2
Z = 24. Since nθ = 11 < (nK+nW )(nZ+nK)+nZ(nZ+1)/2 = 19 the ordercondition in Proposition 2 is satisfied. To check the rank condition, we use Table 2 of Chang, Doh,and Schorfheide (2009): θ0 = (0.658, 0.995, 0.004, 0.023, 11.36, 0.433, 0.8, 5.748, 3.171, 0.0112, 0.0342)′.Since rank∆(θ0) = 14 < nθ+n2
Z = 15, the parameter vector θ0 is not identifiable from the spectrumof {(ht−1, kt, yt, ct)′}.
To check for partial identifiability of each of the components of θ, we let θi be one among 11components of θ. The table below reports the ranks of ∂λ(θ0,Id)
∂θ−i. For the model to be partially
identifiable in θi, this rank should be equal to rank∆(θ0) − (nθ,i + n2Z) = 9. As can be seen from
Table 1, A0 is not partially identifiable in this model. Indeed, since lnAt is a unit root process withdrift, lnA0 cannot be identified from the stationary variables.
θi α β γ δ φ ν ρB A0 B0 σ2A σ2
B
9 9 9 9 9 9 9 10 9 9 9
Table 1: Rank of ∂λ(θ0,Id)∂θ−i
12