Solving for Steady State with an external matlab file


I can find the solution to the steady state of my model using two matlab files. Since my steady state equations are nonlinear, I’m using fsolve. fertility1_steadystate.m and steady_state.m codes work fine for finding the steady state solutions, however I couldn’t find a way to make the .mod file get the results. I think Dynare has a problem on calling a function that depends on another function. What would you suggest me to do?

Thank you for your concern.
steady_state.m (834 Bytes)
fertility1_steadystate.m (267 Bytes)
fertility1.mod (1.1 KB)

Write and use a correct steady state file, see [Steady state file)


Thank you for your prompt reply. I studied over the steadystate files in the link. I realized that in the steady state equations, each variable is defined in terms of the variables defined before. Therefore the equations are simple enough. In my model, at least three variables are defined with equations that are highly nonlinear, so it is not possible for me to write an equation for each variable one at a time. This is why I solved for the steady state using an external matlab code. Does Dynare offer any solutions for complex steady states?

Thanks a lot.

The SS-file passes the parameters from Dynare to your code and then back to Dynare. Within the block given by the SS-file you can execute any code in whatever order you like as long as at the end of your computation all SS-values have have been set. You can easily call other functions like the one you wrote or numerical optimizers within your steady state file.