Dynare unable to find steady state

Apologies in advance for what may be an elementary question: I am currently working with a a NK life cycle model, and I am unable to find a steady state in Dynare.

Despite using fsolve in MATLAB and setting up initial values from the variables found, Dynare is unable to find a steady state:

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

Any assistance or advice would be much appreciated. I hereby attach the model files and MATLAB steady state fsolve files.
mita_dynamic.pdf (105.5 KB)
mita.mod (10.2 KB)
solve_steady.m (520 Bytes)
myfun.m (4.9 KB)

Hi,

This is not a simple question so you really do not need to apologize. I do not really understand what you are trying to achieve with the two matlab routines, since I have the impression that you try to do exactly the same as the Dynare steady command (solve the system of non linear static equation for the endogenous variables). Dynare optionally proposes to use different non linear solvers to perform this tasks (see the reference manual). You should try to use these alternatives (again with different initial conditions).

Also did you try to obtain a closed form solution for the steady state? Your model does not seem that complex… In the worst case where no closed form solution are available, it is always able to reduce the dimension of the non linear system as described here:

which will help the non linear solver (and also probably help you to find a more sensible initial guess).

Best,
Stéphane.

Hi Stephane,

Thanks for replying. I tried the second approach you suggested: I created a Matlab function to determine the steady state by solving for a vector of zeros for the endogenous variables.

However, the Matlab routine always stops early due to exceeding optimisation limits. Of course, substituting these values that Matlab calculates into the Dynare file (under initval) yields an error. Dynare is still unable to find a steady state.

I think attempting to find a closed form solution is my only option at this stage…

steady_state_output.m (584 Bytes)
steady_state_function.m (5.4 KB)
mita.mod (9.7 KB)

Hi, I am sorry but I do not see the difference between your two set of matlab routines. I was suggesting to partially solve for the steady state analytically and concentrate the static equations, but you are still considering the whole non linear problem. Suppose you have a model with two variables, and that to find the steady state you need to solve the following system of two equation:

\begin{cases} f(x,y) & = 0\\ g(x,y) &= 0 \end{cases}

and suppose that you can show, by manipulating the second equation, that you must have:

y = h(x)

then you can substitute this in the first equation of the system, and you end up with a single non linear equation to be solved:

f(x, h(x)) = 0

which can eventually be solved numerically with fsolve. You will find the solution x^{\ast} and then y^{\ast}=h(x^{\ast}). Doing this you reduce the dimension of the problem to be solved, which generally helps the non linear solver. This was my suggestion.

Best,
Stéphane.

Stephane,

I see! That’s clear now.

Is there any sample code available for a simple growth or RBC model?

Have a look at Dynare’s example3.mod

1 Like