BK conditions are not satisfied: indeterminacy

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 (1.2 KB)

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

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 (1.2 KB)

  1. It’s almost always the timing. For example, it should be
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.

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

basic_bank.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.

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

@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

@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.

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

CIA_bank_2.mod (1.2 KB)

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

Here are some matlab codes that create the IRFs. Run them after you run my Dynare code:
irfplotsior.m (1.3 KB) irfplotx.m (1.2 KB)

@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.