Blanchard & Kahn conditions are not satisfied: indeterminacy

dear professor:
I’m new in dynare and recently I want to build a model.But when I run the model, it can’t work. The message is " Blanchard & Kahn conditions are not satisfied: indeterminacy." I have tried my best for months to slove the problem, but the result is always the same error. Because of this I am so sad everyday. Any help would be greatly appreciated!

Thank you very much.
dawn

kdx.mod (1.6 KB)

Is your first equation

rhohat(+1)=(1/(1+r))*chat*phat/(chat(+1)*phat(+1));

the stochastic discount factor? If yes, it has the wrong timing. Everything needs to be shifted back one period.

Thanks so much for your reply!!My mod is ready to run!may I ask another question? I recently study a paper;In my understanding, the model of thispaper does not impose an impact, but only sets a higher initial value than the steady state value.The purpose is to study the path to steady state. I do n’t know how to write this typle of model program, or am I misunderstanding.At last ,I must express my gratitude again.
The picture is the part of the paper I intercepted

An example in a perfect foresight context is https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Solow_model/Solow_SS_transition.mod

really appreciate you! following your example, I know how to write the code. I still have a little question:how to let the program run At a particular point in time. For example, the perfect foresight program in this picture is to run from the initial value to the steady state in the 20th period

Without knowing the details of the paper, it is impossible to tell. The picture looks as if they simply plot the steady state for the first 20 periods and then a surprise shock happens. In that case, the actual simulation would start with period 20.

thank you very much! I understand.

Good afternoon, Prof. Pfeifer! I am sorry for bothering you over this issue, but I am having trouble replicating the graphics from this article:
Central Bank Digital Currency and Transmission of Monetary Policy 1.pdf (1.8 MB)
I am trying to replicate Figure 1 and Figure 2 using the respective equations from (35) to (48). Here is the code:
no_CBDC.mod (1.2 KB)
I am getting the error “Blanchard & Kahn conditions are not satisfied: indeterminacy”. Would you please, look at my code and tell me if there is an error in the equations?
Thank you.

It looks like you are missing

predetermined_variables k;

no_CBDC.mod (1.2 KB)

1 Like

Thank you very much, prof.Pfeifer!

Prof. Pfeifer, I have another follow-up question. I found on this forum that instead of log-linearizing by hand, in Dynare .mod file a person can simply enter the complicated FOC formulas as they are with only condition that you need to transform level variables X into exp(X) where necessary and it won’t make any difference from entering the already log-linearized formulas.

To test this hypothesis, I replaced the log-linearized equations by hand from my no_CBDC.mod file with original non-linear equations with all level variables X replaced with exp(X) and interest rates left untouched. And as expected, the Dynare throws an error “error: Impossible to find the steady state”.

I want to know why my approach is wrong.

Here is my modified code:
no_CBDC_level.mod (1.3 KB)

The original FOC’s are described on page 34 of the pdf file.

Thank you.

In the nonlinear model you need to provide at least starting values for the steady state of the variables in question. In most cases, they cannot be 0. For example, the level of consumption cannot be 0. Also note that full exp() substitution is usually not recommended. See Question about understanding irfs in dynare - #4 by jpfeifer

I tried to plug-in steady state values into initval block, but it cannot solve the steady state model, despite me calculating the values by hand in excel:
parameter calculation.xlsx (307.5 KB)
I essentially calculated every variable’s steady state, and Dynare still seems to not understand what I want him to do.
no_CBDC_level.mod (1.4 KB)
I even contacted the authors and they said that they will not share their dynare code because their paper is not yet published, but hinted that what I did in excel may be wrong since these steady state values require numeric solver for complicated formulas.
Prof. Pfeifer, how can I resolve this issue? In the end, I just want Dynare to be able to solve all my models.

Check your computations and equations. For example,

M=eps_r;
eps_r=eps_r(-1)*pers+error_r;

means that M=0 in steady state.

Good afternoon, prof.Pfeifer. After your reply I tried to entirely rewrite my model, and this time it suddenly worked out but i don’t understand why. I ran model diagnostics but in both instances it did not detect any anomalies. I could have simply moved on but I really need to understand the core of the issue in order to confidently build my own stochastic model next time:
no_CBDC.mod (1.3 KB)
no_CBDC_level.mod (1.4 KB)

  1. In the level model, the exogenous variables are \frac{M^S}{P} and i^M, where \frac{M}{P}= \frac{M^S}{P} is given, \frac{M^S}{P} is exogenous and i^M is governed by Taylor rule. Also, the authors provide the persistence parameter to be 0.75. Given these information, am I correct to feed the following two equations into the model block of Dynare?
    (\frac{M}{P})_t=(\frac{M}{P})_{steady state}+u^m_t
    i^M_t=i^M_{steadystate}+\phi\pi+u^i_t
#m_s=1569.479224;
m=m_s+u_m;
u_m=u_m(-1)*pers+error_m;
#r_m=0.0025;
i_m=r_m+phi_m*log(pi)+u_i;
u_i=u_i(-1)*pers+error_i;
  1. In the log-linearized model, authors provide these two equations and say that the persistence is 0.75:
    m_t=u_t^m
    i^M_t=r^M+\phi\pi+u^i_t
    In such situation, is it correct to add the following four equations inside the model block?
m=u_m;
u_m=u_m(-1)*pers+error_m;
#r_m=0.0025;
i_m=r_m+phi_m*pi+u_i;
u_i=u_i(-1)*pers+error_i;

where error_i and error_m are exogenous variables, phi_m and i_ss (stable rate) are parameters and pi, u_m, u_i and m are all endogenous variables…

  1. When comparing IFR graphics, reserve shocks produce identical shapes but interest rate shocks produce upside down images. is it because of my model specification error?


    upon close inspection I determined that this discrepancy arises because:
  • In the original level version, the market clearing condition is given by Y_t=C_t+I_t+\frac{\kappa}{2}(\frac{P_t}{P_{t-1}}-1)^2;
  • In the log-linearized by hand version, the equation is given by \hat{y_t}=\hat{c_t}\frac{C}{Y}+(1-\frac{C}{Y})\hat{i_t}.

, and due to this \frac{\kappa}{2}(\frac{P_t}{P_{t-1}}-1)^2 term the shapes are getting flipped. My question is, why when constructing IFRs, Dynare does not ignore \frac{\kappa}{2}(\frac{P_t}{P_{t-1}}-1)^2 term since it is a second-order approximation? Is it because

stoch_simul;

automatically considers second- and higher order approximations by default?

Thank you.

  1. The two setups you describe do not really differ with respect to being in levels or linearized. The only difference in what you have there is whether some constant terms are kept in the linearized equations.
  2. Yes, at the default second order, the price adjustment costs will generally matter. You should use order=1.
1 Like