Blanchard Kahn Condition in altered version of SW07



I’m still fairly new to Matlab and Dynare and having troubles resolving an error with the model I’m trying to build/modify.
My goal is to build a DSGE Model with capital and incorporate a myopic parameter in the style of Gabaix (2017), into the household side.
My starting point for a DSGE model with capital was Smets, Wouters (2007) and I got the latest Dynare Codes modified by J. Pfeifer from GitHub:

when running my modified model code, I will get the following error message:

Error using print_info (line 42)
Blanchard Kahn conditions are not satisfied: no stable equilibrium

Error in stoch_simul (line 100)
print_info(info, options_.noprint, options_);

Error in BrNK_SW07 (line 399)
info = stoch_simul(var_list_);

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

My code differs from the original in the following ways:

  • Got rid of the labobs variables since I’m not interested in estimating the model
  • For the start, I also set habit formation and capital accumulation cost to 0 (or almost zero).
  • Wages set to be flexible
  • The whole “flexible economy” is excluded from the model part for reasons of simplicity
  • Without the flexible economy, I had to modify the Taylor rule slightly; from output gap to steady state output
  • only monetary policy shock is active

Everything else is kept like in the original code. The code so far is working and produces satisfying impulse responses. But I have not yet incorporated the myopic parameter I want to implement. If I do implement Myopia (M) into the Consumption Euler Equation and set it to < 0.95 the error message mentioned above will appear. This strikes me since I’m only changing a fixed Parameter. There has to be something wrong with the timing in guess but so far I’ve tried to write some equations backward in time and had no progress so far.

Would be very much appreciated if someone can point out some problems of the code or the general setup.

Here is the full model-code I’m currently using:


Do I understand you correctly that all your modifications work until you move to a behavioral model?


Greetings jpfeifer, thanks for your reply.

Yes, only when implementing M < 0.95 into the desired part in the Euler Equation the Model will stop working and produce the Blanchard-Kahn-Condition-Error. Before that, the simplified model works.

Thats the original Consumption-Euler:

c = (chabb/cgamma)/(1+chabb/cgamma)c(-1) + (1/(1+chabb/cgamma))c(+1) + ((csigma-1)cwhlc/(csigma(1+chabb/cgamma)))(lab-lab(+1)) - (1-chabb/cgamma)/(csigma(1+chabb/cgamma))(r-pinf(+1) + 0b) +b ;

And the modified one I want to implement which produces the error when the M is set to below 0.95. Unfortunately, I want to experiment with lower M’s in the realm of 0.5.

c = (chabb/cgamma)/(1+chabb/cgamma)c(-1) + M * (1/(1+chabb/cgamma))c(+1) + ((csigma-1)cwhlc/(csigma(1+chabb/cgamma)))(lab-lab(+1)) - (1-chabb/cgamma)/(csigma(1+chabb/cgamma))(r-pinf(+1) + 0b) +b

Some parts of both versions of the equation also drop out since chabb is set to 0.


It is hard to tell what is going on. Here, you do not have a stable equilibrium. Gabaix’s original model did not feature capital. Thus, it is hard to tell what a behavioral discounting will do to stability.


That’s exactly what I want to do. I want to introduce capital into a DSGE model with myopia and I was advised, that it will probably be easier, to build myopia into an existing model with capital than trying to build capital, into Gabaix model.

Thanks for your time jpfeifer.