Rank condition not satisfied

Hi,

I’m sorry to be asking this question, because there are so many threads covering this topic, but I’m having a rank condition problem, and having looked through all the threads, I still can’t figure out what the problem with my code is.

I have a simple NK mode, without K or wage rigidities. I have a much larger model that I want to work with, but as always advised, started with the simplest form. However even with this the rank condition is not satisfied. The model as it is gives the following error:

There are 5 eigenvalue(s) larger than 1 in modulus
for 5 forward-looking variable(s)

and when I run a model_diagnostics, I get told that Lambda isn’t present at current value, which is true, since Lambda only appears as Lambda(+1). But the rank problem doesn’t change when I only use Lambda (well now I only have 4 forward-looking vars, but still a rank condition issue).

Lambda is the stochastic discount factor of the HH. I need it as it’s needed in my bigger model. But I have also tried to add a lambda in the dynare code which is the lagrangian (so lambda = 1/C), and calculate Lambda from that, or even completely replace Lambda. But none of these solve the problem. I have tried to change the timing of R as well, and again, no avail.

Would greatly appreciate some help.
steady_stateNS.m (1.09 KB)
nk.mod (4.72 KB)
main.m (2.03 KB)

What is the intuition of

1/R = Lambda(+1)/Pi(+1); % (2) EE in bond market beta*C = Lambda(+1)*C(+1); % (3) Stochastic discount rate of stockholders
Usually, the Euler equation should read

But that is not what you implement.

Hi,

That’s just the step before getting the euler equation. The EE is reached by combining the FOC wrt bonds with FOC wrt consumption that gives lambda = u’© which is = 1/C in this case (I have log utility). So instead of doing the combination I just left it in the first stage, and just replace beta*lambda(+1)/lambda by Lambda(+1), which is the stochastic discount factor of the households.

This doesn’t make any difference in my problem, as what you wrote is basically what I have with Lambda(+1) substituted. I actually just ran it with your EE and get the same error.

Please use the Euler equation I provided, get rid of Lambda and check the exponents of Pi in the Gammas as well as the law of motion for price dispersion. Please refer to github.com/JohannesPfeifer/DSGE_mod/blob/master/Gali_2015/Gali_2015_chapter_3_nonlinear.mod