Rank condition not satisfied

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Rank condition not satisfied

Postby econik16 » Tue Apr 11, 2017 1:53 pm

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.
Attachments
steady_stateNS.m
(1.09 KiB) Downloaded 79 times
nk.mod
(4.72 KiB) Downloaded 79 times
main.m
(2.03 KiB) Downloaded 73 times
econik16
 
Posts: 2
Joined: Tue Apr 11, 2017 1:39 pm

Re: Rank condition not satisfied

Postby jpfeifer » Tue Apr 11, 2017 6:28 pm

What is the intuition of
Code: Select all
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
Code: Select all
1/R = beta*C(+1)/C*1/Pi(+1);   

But that is not what you implement.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Rank condition not satisfied

Postby econik16 » Wed Apr 12, 2017 10:50 am

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'(C) 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.
econik16
 
Posts: 2
Joined: Tue Apr 11, 2017 1:39 pm

Re: Rank condition not satisfied

Postby jpfeifer » Wed Apr 12, 2017 11:26 am

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 https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Gali_2015/Gali_2015_chapter_3_nonlinear.mod
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 6 guests