# BK conditions are not satisfied: indeterminacy

**URL:** <https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218>\
**Category:** Stochastic simulations\
**Created:** [8 July 2020 06:26 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218 "2020-07-08T06:26:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/35a633/32.png) [@dsang](https://forum.dynare.org/u/dsang)\
**Post date:** [8 July 2020 06:26 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/1 "2020-07-08T06:26:00Z")

</div>

Dear all,  
I know that maybe it is a very simple question but after looking at some related posts here,I still can not solve the error.So I write here to ask for some help.Recently I try to write a dynare profile based on CIA model.When I run the mod profile,dynare answers  
"  
error in print\_info (line 45)  
the Blanchard Kahn conditions are not satisfied: indeterminacy.

error stoch\_simul (line 100)  
print\_info(info, options\_.noprint, options\_);

error PHQ (line 228)  
info = stoch\_simul(var\_list\_);

error dynare (line 235)  
evalin(‘base’,fname) ;"

I’ve attached the code as a plain text file.And thanks for any help for my question !Thank you!

Best,  
Sandy  
[新建文本文档.txt](https://forum.dynare.org/uploads/short-url/n8pAFVM08YIQ4f5iX95aQlSObWJ.txt) (1.2 KB)

---

<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:** [8 July 2020 11:05 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/2 "2020-07-08T11:05:17Z")

</div>

Your timing for the two exogenous process is strange. Also, I guess that `khat` is predetermined.

---

<div class="post-metadata">

**Author:** ![dsang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/35a633/32.png) [@dsang](https://forum.dynare.org/u/dsang)\
**Post date:** [9 July 2020 07:45 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/3 "2020-07-09T07:45:11Z")

</div>

Dear Professor Feifer,

Thank you for your reply!I have changed my exogenous processes and predetermined the khat,but the error still exit.I can not have the output of my mod.Alarms about eigenvalue and BK condtion still arise. When I run, I got  
"EIGENVALUES:  
Modulus Real Imaginary

```
        0.56 0.56 0
      0.9459 0.9459 0
       1.158 1.158 0
        3.14 3.14 0
         Inf Inf 0
         Inf -Inf 0
         Inf -Inf 0

```

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

The rank condition ISN’T verified!

STEADY-STATE RESULTS:

what 2.16412  
rhat -6.22787e-05  
phat -2.16412  
jhat 0  
hhat 2.16412  
ghat 0  
khat 1.96064  
lhat 0.72696  
error in print\_info (line 45)  
Blanchard Kahn conditions are not satisfied: indeterminacy

error stoch\_simul (line 100)  
print\_info(info, options\_.noprint, options\_);

error PHQ (line 241)  
info = stoch\_simul(var\_list\_);

error dynare (line 235)  
evalin(‘base’,fname) ;"

I find that many people have met the same questions,like “eigenvalues lager than 1” or “not satisfied BK condition”.So I want to ask the professor that to avoid these errors,when we wirte a model,where should we pay more attention to.And what we do will result in these errors.

Hope you can reply me. By the way,my new revised mod profile is below.Could you please see it when it is convenient for you.Thank you so much!

Best regards,  
Sandy  
[PHQ.txt](https://forum.dynare.org/uploads/short-url/algnqhSHA7GbSu2TG3eaBrer8u2.txt) (1.2 KB)

---

<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:** [9 July 2020 14:09 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/4 "2020-07-09T14:09:45Z")

</div>

1. It’s almost always the timing. For example, it should be

```auto
ghat=rho_g*ghat(-1)+eps_g;
jhat=rho_j*jhat(-1)+eps_j;

```

1. There is still a problem with your equations. The steady states should be 0, but they are not, because you are including some constants.

---

<div class="post-metadata">

**Author:** ![dsang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/35a633/32.png) [@dsang](https://forum.dynare.org/u/dsang)\
**Post date:** [11 July 2020 10:56 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/5 "2020-07-11T10:56:23Z")

</div>

Dear Professor,

Thank you for your reply!  
The running resuIts have been improved with the backward timing. It is so magic! I have never thought that the time factor was so much impotant in the model!  
And as for “the steady states shoule be 0”,

1. I want to ask that why the steady states need to be 0. Because when we expand the nonlinear functions at the steady state points by using the log-linearization method, if the they are equal to 0, the expanded functions maybe equal to 0 or insoluble.
2. Is there a relationship between the initval value and the steady state value?  
When using dynare to solve DSGE model, we need to input the initial values of each variable. However, according to dynare’s user guide, if you input the “steady” command in the next step, dynare will start from the calculated steady state value. So what is the meaning of these initial values?How to get these initval values?

Best,  
Sandy

---

<div class="post-metadata">

**Author:** ![shengan28](https://forum.dynare.org/user_avatar/forum.dynare.org/shengan28/32/7453_2.png) [@shengan28](https://forum.dynare.org/u/shengan28)\
**Post date:** [12 July 2020 17:57 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/6 "2020-07-12T17:57:58Z")

</div>

[basic\_bank.mod](https://forum.dynare.org/uploads/short-url/gm8foNQcj35W1TRwvRJIFBlBIVV.mod) (648 Bytes)

Hi, I am getting the same error message. I know that this is usually a result of timing, but my similar models work with this code. Please advise.

---

<div class="post-metadata">

**Author:** ![dsang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/35a633/32.png) [@dsang](https://forum.dynare.org/u/dsang)\
**Post date:** [15 July 2020 13:19 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/7 "2020-07-15T13:19:38Z")

</div>

Dear An,

```
Thank you for your sharing!I am so sorry to your reply too late. Your code has better output than me! But I still meet the same error alarms below:

```

Residuals of the static equations:

Equation number 1 : 0  
Equation number 2 : 0  
Equation number 3 : 0  
Equation number 4 : 0  
Equation number 5 : 0  
Equation number 6 : 0

STEADY-STATE RESULTS:

c 0.686164  
k 0.331218  
r 0.691891  
l 0.229167  
b 0.158558  
ior 0  
error in print\_info (line 48)  
Blanchard Kahn conditions are not satisfied: indeterminacy due to rank failure

error stoch\_simul (line 100)  
print\_info(info, options\_.noprint, options\_);

error basic\_bank (line 148)  
info = stoch\_simul(var\_list\_);

error dynare (line 235)  
evalin(‘base’,fname) ;

Have you met the same running? If you have met,do you solve it ? Hope we will have more communication.Again ,thank you very much!

Best,  
Sandy

---

<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:** [15 July 2020 18:28 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/8 "2020-07-15T18:28:50Z")

</div>

@dsang The timing in  
`b(+1)=r*l+ior;`  
is incorrect:

> model\_diagnostics(M\_,options\_,oo\_);  
> MODEL\_DIAGNOSTICS: The following endogenous variables aren’t present at the current period in \>the model:  
> b

---

<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:** [15 July 2020 18:31 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/9 "2020-07-15T18:31:39Z")

</div>

@dsang

1. When linearizing, you need to be consistent. Either you keep all constants or you leave all of them out. You have a mixture that creates problems, because some equations obviously expect mean 0 variables, while others have those variables not being 0.
2. The initial values are used for numerical steady state finding, which involves solving a system of equations. If the starting values are poor or infeasible, this will not work.

---

<div class="post-metadata">

**Author:** ![dsang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/35a633/32.png) [@dsang](https://forum.dynare.org/u/dsang)\
**Post date:** [21 July 2020 09:45 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/10 "2020-07-21T09:45:45Z")

</div>

Dear Professor Feifer,

Thank you for your reply. These days your guidance has inspired me a lot. Although I haven’t completely solved my problem, I believe it will be solved one day. Thank you for your kindness help! Hope we will have more communication!

Best,  
Sandy

---

<div class="post-metadata">

**Author:** ![shengan28](https://forum.dynare.org/user_avatar/forum.dynare.org/shengan28/32/7453_2.png) [@shengan28](https://forum.dynare.org/u/shengan28)\
**Post date:** [28 July 2020 20:30 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/11 "2020-07-28T20:30:39Z")

</div>

[CIA\_bank\_2.mod](https://forum.dynare.org/uploads/short-url/zSI2Z16S8gfO8iCFRj7GoHFmQVq.mod) (1.2 KB)

@dsang  
Here is my current code, which works. Please use it as a template for your own model.

---

<div class="post-metadata">

**Author:** ![shengan28](https://forum.dynare.org/user_avatar/forum.dynare.org/shengan28/32/7453_2.png) [@shengan28](https://forum.dynare.org/u/shengan28)\
**Post date:** [28 July 2020 20:32 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/12 "2020-07-28T20:32:07Z")

</div>

Here are some matlab codes that create the IRFs. Run them after you run my Dynare code:  
[irfplotsior.m](https://forum.dynare.org/uploads/short-url/gzy6i0y1VNwmjChp46EoMhl8jKM.m) (1.3 KB) [irfplotx.m](https://forum.dynare.org/uploads/short-url/tapwk6csfG0jQO19VOnd4uHLJOV.m) (1.2 KB)

---

<div class="post-metadata">

**Author:** ![dsang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/35a633/32.png) [@dsang](https://forum.dynare.org/u/dsang)\
**Post date:** [29 July 2020 04:41 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/13 "2020-07-29T04:41:21Z")

</div>

@shengan28  
Dear Professor Osell,

Thank you for your sharing! This is a very good model for me to learn from. Thank you very much!

Best,  
Sandy.

---

<div class="post-metadata">

**Author:** ![dsang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/35a633/32.png) [@dsang](https://forum.dynare.org/u/dsang)\
**Post date:** [23 February 2021 12:56 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/14 "2021-02-23T12:56:50Z")

</div>

@jpfeifer Dear Professor Pfeiter,  
I have met the same problem again.This time I have adjusted the timing and the parameters.But these two ways do not seem to work.The code I have attached below.Could you please tell me any other direction I need to try? Thank you very much ![PHQN1.mod|attachment](https://forum.dynare.org/uploads/default/original/2X/e/e8381ae3c93cac4a0ea6f25cc131b72b8516271b.mod) (1.8 KB)

---

<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:** [25 February 2021 19:55 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/15 "2021-02-25T19:55:35Z")

</div>

The attachment is broken

---

<div class="post-metadata">

**Author:** ![dsang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/35a633/32.png) [@dsang](https://forum.dynare.org/u/dsang)\
**Post date:** [26 February 2021 15:24 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/17 "2021-02-26T15:24:51Z")

</div>

Here is the latest code.  
[PHQN1.mod](https://forum.dynare.org/uploads/short-url/8HAeBi8mo3JaY4fPjeWu2e1ZTIM.mod) (2.3 KB)

---

<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:** [26 February 2021 15:29 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/18 "2021-02-26T15:29:06Z")

</div>

I can only give you the generic advice. Check your timing. For example

```auto
-beta*(R-pie(+1)-c1(+1))-c1(+1)=0;

```

looks strange

---

<div class="post-metadata">

**Author:** ![dsang](https://forum.dynare.org/letter_avatar_proxy/v4/letter/d/35a633/32.png) [@dsang](https://forum.dynare.org/u/dsang)\
**Post date:** [26 February 2021 15:47 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/19 "2021-02-26T15:47:37Z")

</div>

Professor Pfeiter,

1.I know it looks strange. But I got it through the first order condition of debt. The debt is not a predetermined variable .Is it reasonable to change its timing?(I am not sure if I can change it. )  
2.And would you please tell me what will cause the error “rank faliure”?

Thank you very much!  
Best wishes,  
Di Sang

---

<div class="post-metadata">

**Author:** ![saidul](https://forum.dynare.org/letter_avatar_proxy/v4/letter/s/65b543/32.png) [@saidul](https://forum.dynare.org/u/saidul)\
**Post date:** [26 December 2024 11:09 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/20 "2024-12-26T11:09:17Z")

</div>

[model.mod](https://forum.dynare.org/uploads/short-url/x0PJDQVARuPne680Uy6dG5qJQ8C.mod) (4.9 KB)  
HI Prof. Pfeifer,

Running the attached mod file yields a similar error: BK conditions are not satisfied: indeterminacy.

FYI, model\_diagnostics did not reveal any issues with this file. Could you help me figure out the source of error?

Thanks  
Saidul

---

<div class="post-metadata">

**Author:** ![Jingjing](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/a88e57/32.png) [@Jingjing](https://forum.dynare.org/u/Jingjing)\
**Post date:** [26 December 2024 11:52 UTC](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218/21 "2024-12-26T11:52:41Z")

</div>

Hi saidul:  
It’s almost always the timing. For example, it should be

```auto
zm = RHOzm *zm(-1) + eps_zm;
...

```

then the mod file could run.

[Next page](https://forum.dynare.org/t/bk-conditions-are-not-satisfied-indeterminacy/16218.md?page=2)
