# Blanchard Kahn conditions

**URL:** <https://forum.dynare.org/t/blanchard-kahn-conditions/4814>\
**Category:** Dynare help (legacy posts)\
**Created:** [9 July 2015 10:09 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814 "2015-07-09T10:09:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhkarami](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/278dde/32.png) [@mhkarami](https://forum.dynare.org/u/mhkarami)\
**Post date:** [9 July 2015 10:09 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/1 "2015-07-09T10:09:39Z")

</div>

Dear professor jpfeifer:  
When I run pass\_through\_two\_two.mod file in dynare, there is a trouble I don’t know how to solve it. The  
error information coming up with the following message:  
There are 3 eigenvalue(s) larger than 1 in modulus  
for 4 forward-looking variable(s)

The rank condition ISN’T verified!

STEADY-STATE RESULTS:

c 0  
r 0  
pi 0  
n 0  
w 0  
m 0  
y 0  
a 0  
g 0  
mc 0  
gama\_H 0  
pi\_H 0  
pi\_F 0  
psi\_F 0  
s 0  
q 0  
epsilon 0  
pistar 0  
dc 0  
fr 0  
gamastar\_H 0  
pistar\_o 0  
gamastar\_o 0  
o 0  
gama\_F 0  
c\_F 0  
c\_H 0  
cstar\_H 0  
ystar 0  
Error using print\_info (line 45)  
Blanchard Kahn conditions are not satisfied:  
indeterminacy

Error in stoch\_simul (line 98)  
print\_info(info, options\_.noprint,  
options\_);

Error in pass\_through\_two\_two (line 459)  
info = stoch\_simul(var\_list\_);

Error in dynare (line 180)  
evalin(‘base’,fname) ;

* * *

please guide me

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [11 July 2015 08:13 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/2 "2015-07-11T08:13:17Z")

</div>

Run model\_diagnostics to see that there is still a collinearity issue in your model.

---

<div class="post-metadata">

**Author:** ![mhkarami](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/278dde/32.png) [@mhkarami](https://forum.dynare.org/u/mhkarami)\
**Post date:** [13 July 2015 08:23 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/3 "2015-07-13T08:23:18Z")

</div>

Dear professor jpfeifer:  
Thank you very much for your help！Under the guidance of you, I did it and I received the following message:

> > model\_diagnostics(M\_,options\_,oo\_)  
> > model\_diagnostic: the Jacobian of the static model is singular  
> > there is 3 colinear relationships between the variables and the equations  
> > Relation 1  
> > Colinear variables:  
> > n  
> > w  
> > y  
> > gama\_H  
> > s  
> > q  
> > dc  
> > fr  
> > gamastar\_H  
> > gamastar\_o  
> > gama\_F  
> > c\_F  
> > c\_H  
> > cstar\_H  
> > Relation 2  
> > Colinear variables:  
> > n  
> > w  
> > y  
> > gama\_H  
> > s  
> > q  
> > dc  
> > fr  
> > gamastar\_H  
> > gamastar\_o  
> > gama\_F  
> > c\_F  
> > c\_H  
> > cstar\_H  
> > Relation 3  
> > Colinear variables:  
> > n  
> > w  
> > y  
> > gama\_H  
> > s  
> > q  
> > dc  
> > fr  
> > gamastar\_H  
> > gamastar\_o  
> > gama\_F  
> > c\_F  
> > c\_H  
> > cstar\_H  
> > Relation 1  
> > Colinear equations  
> > 7 10 12 20

Relation 2  
Colinear equations  
15 18 19

Relation 3  
Colinear equations  
7 10 12 20

## The presence of a singularity problem typically indicates that there is one redundant equation entered in the model block, while another non-redundant equation is missing. The problem often derives from Walras Law.

what should I do now, please help me

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [13 July 2015 10:32 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/4 "2015-07-13T10:32:45Z")

</div>

Find the missing and redundant equations and interchange them.

---

<div class="post-metadata">

**Author:** ![mhkarami](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/278dde/32.png) [@mhkarami](https://forum.dynare.org/u/mhkarami)\
**Post date:** [13 July 2015 15:24 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/5 "2015-07-13T15:24:57Z")

</div>

but I can’t find that. I think every thing is ok, but I don’t know why I receive this error !! ☹

---

<div class="post-metadata">

**Author:** ![mhkarami](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/278dde/32.png) [@mhkarami](https://forum.dynare.org/u/mhkarami)\
**Post date:** [22 July 2015 08:08 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/6 "2015-07-22T08:08:16Z")

</div>

Dear professor jpfeifer:  
I noticed that one of my equations was incorrect and I corrected it (I used positive instead of negative in one of my equations) , after that my Blanchard Kan error disappeared and I could run my code and received outputs. But still when I use the command that u introduced me “model\_diagnostics(M\_,options\_,oo\_)” I receive this:  
Relation 1  
Colinear equations  
7 10 12 20

Relation 2  
Colinear equations  
7 10 12 20

Relation 3  
Colinear equations  
15 18 19

Relation 4  
Colinear equations  
29 30

## The presence of a singularity problem typically indicates that there is one redundant equation entered in the model block, while another non-redundant equation is missing. The problem often derives from Walras Law.

Do u think my model still has problem or my problem has solved?  
Any advice will be appreciated.

Thank you so much!

---

<div class="post-metadata">

**Author:** ![mhkarami](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/278dde/32.png) [@mhkarami](https://forum.dynare.org/u/mhkarami)\
**Post date:** [26 July 2015 16:14 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/7 "2015-07-26T16:14:42Z")

</div>

[quote=“mhkarami”]Dear professor jpfeifer:  
I noticed that one of my equations was incorrect and I corrected it (I used positive instead of negative in one of my equations) , after that my Blanchard Kan error disappeared and I could run my code and received outputs. But still when I use the command that u introduced me “model\_diagnostics(M\_,options\_,oo\_)” I receive this:  
Relation 1  
Colinear equations  
7 10 12 20

Relation 2  
Colinear equations  
7 10 12 20

Relation 3  
Colinear equations  
15 18 19

Relation 4  
Colinear equations  
29 30

## The presence of a singularity problem typically indicates that there is one redundant equation entered in the model block, while another non-redundant equation is missing. The problem often derives from Walras Law.

Do u think my model still has problem or my problem has solved?  
Any advice will be appreciated.

Thank you so much![/quote]

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [27 July 2015 06:45 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/8 "2015-07-27T06:45:13Z")

</div>

Please provide the updated codes.

---

<div class="post-metadata">

**Author:** ![mhkarami](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/278dde/32.png) [@mhkarami](https://forum.dynare.org/u/mhkarami)\
**Post date:** [27 July 2015 13:33 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/9 "2015-07-27T13:33:06Z")

</div>

Dear Johannes,

Thank you for your answer.  
I will email them for you

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [28 July 2015 07:05 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/10 "2015-07-28T07:05:39Z")

</div>

Your model now has a bunch of unit roots that give rise the warning about collinearity. If the unit roots are desired, your model is fine now.

---

<div class="post-metadata">

**Author:** ![mhkarami](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/278dde/32.png) [@mhkarami](https://forum.dynare.org/u/mhkarami)\
**Post date:** [28 July 2015 07:25 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/11 "2015-07-28T07:25:06Z")

</div>

Dear Johannes  
Thank you so much  
Best regards

---

<div class="post-metadata">

**Author:** ![rdoctors](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/34f0e0/32.png) [@rdoctors](https://forum.dynare.org/u/rdoctors)\
**Post date:** [28 July 2015 20:53 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/12 "2015-07-28T20:53:32Z")

</div>

Hello, I’m new to dynare and I’m having troubles with my model. I’m trying to replicate the SAMBA (2011 version), which is the Brazilian central Bank model. My dynare version is 4.4.3.  
It is giving these errors : Blanchard Kahn conditions are not satisfied: indeterminacy

and : There are 22 eigenvalue(s) larger than 1 in modulus  
for 28 forward-looking variable(s)

I’ve used the model\_diagnostics(M\_,options\_,oo\_) command but now it is not working. Does someone now why it isn’t working? (it just doesn’t do it).

Does anyone now how I could solve this problem???

Thank you!!

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [29 July 2015 05:18 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/13 "2015-07-29T05:18:42Z")

</div>

Given the difference in roots, there seems to be a fundamental timing problem. Check your predetermined states whether you assigned the correct timing. See the manual for details.

---

<div class="post-metadata">

**Author:** ![rdoctors](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/34f0e0/32.png) [@rdoctors](https://forum.dynare.org/u/rdoctors)\
**Post date:** [29 July 2015 12:29 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/14 "2015-07-29T12:29:48Z")

</div>

> [@jpfeifer](#):
>
> Given the difference in roots, there seems to be a fundamental timing problem. Check your predetermined states whether you assigned the correct timing. See the manual for details.

thank you for your reply! But do you have any guesses of why the model\_diagnostics(M\_,options\_,oo\_) command is not working?

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [29 July 2015 13:04 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/15 "2015-07-29T13:04:53Z")

</div>

What is the error message?

---

<div class="post-metadata">

**Author:** ![rdoctors](https://forum.dynare.org/letter_avatar_proxy/v4/letter/r/34f0e0/32.png) [@rdoctors](https://forum.dynare.org/u/rdoctors)\
**Post date:** [30 July 2015 21:09 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/16 "2015-07-30T21:09:05Z")

</div>

There isn’t an error message…it just doesn’t do anything which I find wierd, since last time I used it, it worked! However, I managed to run my script! I had to change a few equations (monetary policy rule and reduce the government debt coefficient).

I do have another question. Do you know how I can see all endogenous, exogenous and parameters that were created in “my” model? (without looking to the script).

Thank you once again!

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [31 July 2015 11:09 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/17 "2015-07-31T11:09:45Z")

</div>

If model\_diagnostics is silent, no obvious error has been found.

Regarding your new question: their names are stored in  
M\_.endo\_names  
M\_.exo\_names  
M\_.param\_names

---

<div class="post-metadata">

**Author:** ![angeloeco](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/7993a0/32.png) [@angeloeco](https://forum.dynare.org/u/angeloeco)\
**Post date:** [9 January 2018 13:00 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/18 "2018-01-09T13:00:37Z")

</div>

Hi, did you get to run the code?

---

<div class="post-metadata">

**Author:** ![dhlzl](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/ce73a5/32.png) [@dhlzl](https://forum.dynare.org/u/dhlzl)\
**Post date:** [11 January 2018 03:25 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/19 "2018-01-11T03:25:27Z")

</div>

Dear professor jpfeifer:  
there is a same trouble to me. So how can i run model\_diagnostics?  
please guide me  
best wishes!

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [11 January 2018 09:45 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions/4814/20 "2018-01-11T09:45:25Z")

</div>

Add `model_diagnostics;` to your mod-file before the statement where the crash happens. Alternatively, after the crash, run

```auto
model_diagnostics(M_,options_,oo_)

```

in Matlab’s command window.
