Replication for Jermann and Quadrini (2012)

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!
JQ2012.mod (6.81 KB)

Your line 120 reads

exp(x) = (exp(b(-1))/((1+exp(r(-1))))-exp(b)/(1+exp(r)))/*exp(y);
You cannot have

at the end. It is not a valid operation

[quote=“jpfeifer”]Your line 120 reads

exp(x) = (exp(b(-1))/((1+exp(r(-1))))-exp(b)/(1+exp(r)))/*exp(y);
You cannot have


at the end. It is not a valid operation[/quote]

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.
rbc.mod (2.29 KB)

What are you doing? I provide full replication files at, 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!
jj111.mod (7.38 KB)

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.

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!