Steady state error in simulation with dynare

I have developed a two-sector DSGE model, similar to Iacoviello & Neri (2010). When I try to get the impulse responses, it appears this message:

Error using print_info (line 83)
Impossible to find the steady state. Either the model doesn’t have a steady state, there are an infinity of steady
states, or the guess values are too far from the solution

Error in steady (line 104)
print_info(info,options_.noprint, options_);

Error in new_code (line 277)

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

I tried to begin with a simpler model with one sector but still, the code is not running. I tried also to find the steady-state analytically in order to change the initial values, but I failed to do so, since it is a model with 22 equations and 22 unknowns. Any further suggestions?

New_code.mod (4.8 KB)

I would write either the non-linear model (my favourite option) or the linearized model. You are doing a mixed of the two approaches. For instance, labor demands are linearized, euler equation is not. So it is not clear to me whether your variables are expressed in log deviations from the steady state, in levels, or in logs. Hence, Dynare has trouble in computing the ss. Instead, if you linearized the model and every variable is in deviations from the ss, then the ss should be a vector of 0.

Additional to valerio8’s command, when you decide on applying the pure non-linear form. You should then use the resid; command so you can see what equations still have residuals that are significantly different from zero, in your current case many. With this tool you should pin down what equations are problematic.

Thank you both for your answers!
Following your suggestions, I managed to log-linearize the model and upload all the equations on dynare in a log-linear form. Now, dynare gives me the steady-state values but another problem appears: “Blanchard Kahn conditions are not satisfied: indeterminacy”. Another problem is that some of the theoretically non-negative variables, take negative values in SS.

Is there any suggestion on how I can overcome those problems?
Log-linearized.mod (5.2 KB)

Dear Ourleo,
what puzzles me is that the steady state is not a vector of 0, even if all variables are log-linearized around the steady state. If all variables are in log-deviations from the steady state, in Dynare the ss should be a vector of 0.

Do you know what may be the cause of that problem, or what I can possible do to solve it?

Dear ourleo,
keep in mind this: suppose you take a log linearization of the model with pencil and paper. So for each variable X you are defining variable x as follows:
x=log(X/Xss). When you move to Dynare, if you give to Dynare the log-linearized model, each variable x will have a ss of 0: the ss of a variable in deviation from the ss is 0 by definition. If this is not the case, there is something wrong in your log-linearization.

I would do the following.

Use the command steady_state_model instead of initval.

Set the ss of all log-linearized variables to 0

Dynare will tell you the equations where a ss of 0s is not correct. This means that those equations are not linearized correctly. For instance, I see that you write the linearized PC as follows:


which means that x is not defined in log deviations from the ss. I think it should be:



Dear valerio 88,

you are entirely right!

I followed your suggestion and I found that there was a problem in the linearized version of the Phillips Curve. When I fix it, the ss is a vector of 0. Thank you very much.

However, there is still a problem since the Blanchard & Kahn conditions are not satisfied. I have tried to check the timing of my variables and seems alright. What may cause this problem?

Log-linearized.mod (5.2 KB)

I finally managed to get the impulse responses!

For the record, the first problem was that the PC was incorrectly log-linearized as valerio88 has stated above. By fixing the PC, the steady-state values for my linearized variables became a vector of zeros (as supposed to be).

The second problem was that some signs were incorrect in the housing equations. When I changed those, I finally managed to get the impulse responses.

dear ourleo
i have written a code for Iacoviello (2005). this code may help yoIac.mod (3.1 KB) t