Page 1 of 1

Replication for Jermann and Quadrini (2012)

PostPosted: Wed Apr 26, 2017 5:23 am
by tue40885
Dear All,

I am now replicating the NK model in Jermann and Quadrini (2012), using Johannes Pfeifer's dynare code as reference. When I run my code, it keeps saying that "line 212, cols 1-0: syntax error, unexpected $end". Could anyone explain to me where I went wrong? Thanks so much!

Re: Replication for Jermann and Quadrini (2012)

PostPosted: Wed Apr 26, 2017 4:51 pm
by jpfeifer
Your line 120 reads
Code: Select all
exp(x) = (exp(b(-1))/((1+exp(r(-1))))-exp(b)/(1+exp(r)))/*exp(y);       

You cannot have
Code: Select all
/*

at the end. It is not a valid operation

Re: Replication for Jermann and Quadrini (2012)

PostPosted: Thu Apr 27, 2017 7:16 am
by tue40885
jpfeifer wrote:Your line 120 reads
Code: Select all
exp(x) = (exp(b(-1))/((1+exp(r(-1))))-exp(b)/(1+exp(r)))/*exp(y);       

You cannot have
Code: Select all
/*

at the end. It is not a valid operation


Thanks so much for your help! Since I could not find the steady state in NK model, I decided to start replicating the basic RBC model. The system says that "The steadystate file did not compute the steady state", is that mean that I have problems in the initial state I put? The model part seems ok to me. Thanks so much for your concern.

Re: Replication for Jermann and Quadrini (2012)

PostPosted: Thu Apr 27, 2017 7:35 am
by jpfeifer
What are you doing? I provide full replication files at https://github.com/JohannesPfeifer/DSGE_mod/tree/master/Jermann_Quadrini_2012, including the _steady_state.m files that compute the steady state

Re: Replication for Jermann and Quadrini (2012)

PostPosted: Sat Apr 29, 2017 8:50 am
by tue40885
jpfeifer wrote:What are you doing? I provide full replication files at https://github.com/JohannesPfeifer/DSGE_mod/tree/master/Jermann_Quadrini_2012, including the _steady_state.m files that compute the steady state


Thanks so much! I have successfully code the RBC model! However I have problem coding NK model, the steady state occurs, but it says '"There are 15 eigenvalue(s) larger than 1 in modulus
for 14 forward-looking variable(s). The rank condition ISN'T verified!"

I used the same equation as you did in the tutorial file, so could you please notify me where I went wrong? Or is that possible to do the estimation without solving the trouble above? I am really new to Dynare and trying to practice as much as I could, please forgive my stupid questions. I am really appreciate for your help. The new code is att. Thanks!

Re: Replication for Jermann and Quadrini (2012)

PostPosted: Mon May 01, 2017 12:04 am
by tue40885
jpfeifer wrote:What are you doing? I provide full replication files at https://github.com/JohannesPfeifer/DSGE_mod/tree/master/Jermann_Quadrini_2012, including the _steady_state.m files that compute the steady state


Dear Jpfeifer,

I figured out where I did wrong, and thanks for your code. I have one more question, since I use exp() form in my model, for those variables have steady state values equal zero and do not have percentage deviations, should I just leave it without putting exp()? Thanks for your concerns.

Re: Replication for Jermann and Quadrini (2012)

PostPosted: Mon May 01, 2017 4:50 pm
by jpfeifer
Yes, variables with mean 0 are usually linearized, not log-linearized (particularly as they often are already in percent)

Re: Replication for Jermann and Quadrini (2012)

PostPosted: Mon May 01, 2017 6:20 pm
by tue40885
jpfeifer wrote:Yes, variables with mean 0 are usually linearized, not log-linearized (particularly as they often are already in percent)


Thanks so much! I am really appreciate for your help!