# Question about Financial Accelerator in an estimated New Keynesian model by Christensen and Dib (2008)

#1

Dear all，
I recently read the Financial Accelerator in an estimated New Keynesian model by Christensen and Dib (2008). I’d like to repeat the basic model, but it’s a bit unclear that the steady-state calculation is the same for different accelerator factors when the accelerator factor equals zero. I’m not sure if I did the right thing.
Another question is why my figure is not hump type.Each formula is expressed in the form of logarithmic linearization in the appendix of the article.And there is also capital adjustment cost.why my figure is not hump？
Can anyone help me? I will be very grateful.

#2

Unfortunately, that paper is very hard to replicate. Some of the equations in the paper contain typos.

#3

jpfeifer,I’ve tried to add investment adjustment costs or capital adjustment costs in the model, but why the graph isn’t hump-shaped?

#4

Have you checked the equations in the original paper for correctness. I remember that at least one equation had to be entered with a different timing structure.

#5

jpfeifer, When running the MMB database of US_CD08 , I can get humped IRFS(like attachments picture).
But when I rewrite US_CD08 without changing any parameters and variables, why do I have to produce a hump-shaped IRFS?The attachment is code I rewrote. There should be no mistake.
CD08.mod (2.3 KB)

#6

@aibenaimer1 Please do not ask twice the same question in different threads (I removed one of your posts). Your question here seems also related to (again another thread) the response I have just given here:

In the figure you are showing here, the initial condition (ie the steady state) is the first point of the IRF, this is not the Dynare convention.

Best,
Stéphane.

#7

Stéphane, thank you for your reply. The picture is produced When running the MMB database of US_CD08, and It’s like the graphics in the paper ‘The financial accelerator in an estimated New Keynesian model’.
My question is when I want to try to repeat US_CD08 code in separate code, why don’t I have similar IRFs?I didn’t change any parameters and variables.I am really puzzled.

#8

I am not familiar with this database of models… You should ask to the guys developing this project, they also have a forum here. If you do not find the same results when using the mod file they distribute, it may be an issue on their side, and as I do not know what they do…

Best,
Stéphane.

#9

Sorry, I misunderstood your problem here. Did you check if the eigenvalues (a returned by the check command) are the same? I suppose they are not… The most obvious reason being that you must not have the same model. It is difficult to compare both mod files because you are not using the same notations. If I were in your position I would first rewrite the mod file with the same notations.

Without understanding the details, I can see an obvious difference. Your production function is slightly different. If I compare your third equation (for yh) and the fifth equation in US_CD08.mod (for y) I can infer that the productivity does not affect production the same way in both models. In the original mod file productivity is with hours under the power 1-\alpha while in your model productivity appears before the Cobb-Douglas (as would a Hicks neutral trend). This difference is obvious, but I suspect you may have more differences.

Also if you look into the Macroeconomic Model Data Base codes (here lines 13-16) you will see that they append the initial condition (steady state) to the IRFs. So the timing convention is different than the one we have in Dynare figures (which explains the initial jumps).

Best,
Stéphane.

#10

Stéphane, thank you for answering my question in such a detail. However, I did not change any notation in US_CD08.mod to CD08.mod which was made by me . I just deleted some unrelated code like ‘ Flexible price case’ in US_CD08.mod，in order to make the dynare code run independently. The notations, steady state value，parameters and variables have not been changed. I didn’t change anything. Code is CD08.mod In the appendix. CD08.mod (2.3 KB)

// Model: US_CD08

// Created by Jens Kruk
// Last edited: 2010/09/07 by S. Schmidt

// Christensen, Ian and Ali Dib. 2008. “The financial accelerator in an estimated
// New Keynesian model,” Review of Economic Dynamics 11, pp. 155-178.

var lambda c b m e r h w y k a i cost z mu pi q x f n rp;

varexo e_r u_x u_a u_e u_b ;

parameters
gamma alpha rho_pi rho_y rho_mu delta chi beta phi psi nu
rho_a rho_e rho_x rho_b c1 m1 r1 h1 cy1 iy1 f1 z1 kn1 pi_ss r_ss xi_ss f_ss z_ss
lambda_c lambda_m k__y c__y w_h_y h_ss i__y b_ss k__n S;

gamma=0.0598;
alpha=0.3384;
rho_pi=1.4059;
rho_y=0.2947;
rho_mu=0.6532;
delta=0.025;
b_ss=0.062;
chi=0.5882;
beta=0.9928;
eta=1.315;
phi=0.7418;
psi=0.042; // 0 in the NoFa
nu=0.9728;
rho_a=0.7625;
rho_e=0.6156;
rho_x=0.6562;
rho_b=0.7206;
pi_ss=1.0079;
xi_ss=5/6;
k__n=2;

S=1.0075; // Jens Kruk replicated the standard deviations of CD more accurately when setting S=1. However, S should be 1.0075 (see p.163 in DC).

r_ss=pi_ss/beta;
f_ss=(Sr_ss)/pi_ss;
z_ss=f_ss+ delta-1;
lambda_c=(1+b_ss
(pi_ss/(pi_ss-beta))^(gamma-1))^(-1);
lambda_m=lambda_cb_ss(pi_ss/(pi_ss-beta))^(gamma);
k__y=alpha*(xi_ss/z_ss);
c__y=1-delta*(k__y);
w_h_y=(1-alpha)lambda_cxi_ss/(c__y);
h_ss=w_h_y/(eta+w_h_y);
i__y=1-c__y;

model(linear);

((1-gamma)lambda_c-1)c=gammalambda+lambda_m((r_ss-1)/r_ss)*(b+(gamma-1)m)-gammae;

(gamma*r)/(r_ss-1)=b+c-m;

h_ssh=(1-h_ss)(w+lambda);

lambda(+1)=lambda-r+pi(+1);

y=alpha*k(-1)+(1-alpha)*h+(1-alpha)*a;

y=c__yc+i__yi;

w=y+cost-h;

z=y+cost-k(-1);

mu=m-m(-1)+pi;

r=rho_pipi+rho_mumu+rho_y*y+e_r;

f=(z_ss/f_ss)z+(1-delta)/f_ssq-q(-1);

q=chi*(i-k(-1))-x;//q=chidelta(i-k(-1))-x;

pi=betapi(+1)+((1-betaphi)*(1-phi)/phi)*cost;

k=deltai+deltax+(1-delta)*k(-1);

f(+1)=r-pi(+1)+psi*(q+k-n);

rp=psi*(q+k-n);
n/(nuf_ss)=k__n((z_ss/f_ss)z+(1-delta)/f_ssq-q(-1))-(k__n-1)(r(-1)-pi)-psi(k__n-1)(k(-1)+q(-1))+(psi(k__n-1)+1)*n(-1);

x=rho_xx(-1)+u_x;
a=rho_a
a(-1)+u_a;
e=rho_ee(-1)+u_e;
b=rho_b
b(-1)+u_b;

end;

shocks;
var e_r ; stderr 0.0058 ;
//var u_e ; stderr 0.0073 ;
//var u_b ; stderr 0.0103 ;
//var u_a ; stderr 0.0096 ;
//var u_x ; stderr 0.0331 ;
end;

stoch_simul(irf=20);

You mentioned‘ Also if you look into the Macroeconomic Model Data Base codes (here lines 13-16) you will see that they append the initial condition (steady state) to the IRFs.So the timing convention is different than the one we have in Dynare figures (which explains the initial jumps).’ I don’t know if my understanding is correct？Do you mean that even if my code are consistent with the code in MMB, I will not get the same IRFs like the MMB model?
I still want to ask how the IRFs in ‘The financial accelerator in an estimated New Keynesian model’ generated.In other papers references to Christensen and Dib (2008)，they did get IRFs similar to Christensen and Dib (2008), and how did they make them?
Thank you very much for answering my doubts in advance .Best wishes.

#11

Sorry I may be lost. I was comparing the file accelerate.mod (attached in the first post of this thread) and US_CD08.mod (available in the model database).

Yes, even if the IRFs are the same, the IRFs plotted by Dynare will look different because Dynare does not put the initial condition (steady state) as a first point. The IRFs returned by the model database from periods 2 to the last one should be identical to the IRFs returned by Dynare from period 1 to the last one.

For the rest I do not know…

Best,
Stéphane.

#12

Stéphane,I’m not sure whether I understand your meaning accurately. I needn’t have to deliberately repeat IRFs in the paper ‘ The financial accelerator in an estimated New Keynesian model ’？ ‘Because Dynare does not put the initial condition (steady state) as a first point’，So it is almost impossible for me to repeat the IRFs in the paper of Christensen and Dib (2008). Is my understanding right?

#13

Once again… I do not know anything of this paper (and I will probably never). My point is just a matter of graphical representation. Even if the IRFs are the same (because the models are the same). The plots returned by Dynare are different from the one in in the model database (I do not know for the paper), because they add a point (the first one) for the initial condition. The IRFs can look different even if they are identical.

Best,
Stéphane.

#14

Stéphane, thank you . You have solved many of my doubts.