steady state, fsolve and Dynare.
Posted:
Thu Apr 08, 2010 5:52 pm
by moh
Dear all,
Currently I'm trying to solve my dsge model. To do so, I used fsolve and I found the exact values of the steady state. My question is: what should I do so that Dynare takes into account these values as the exact steady state values but not as the initial values?
Thank you for your help.
Best regards
mohamed
Re: steady state, fsolve and Dynare.
Posted:
Fri Apr 09, 2010 5:24 pm
by jpfeifer
Dear Mohamed,
If you already solved the steady state in a Matlab-file, you can use it directly. As the user guide says:
The alternative is to write a Matlab program to find your model's steady
state. Doing so has the clear advantages of being able to incorporate your
Matlab program directly into your .mod file so that running loops with differ-
ent parameter values, for instance, becomes seamless. NOTE! When doing so,
your matlab (.m) file should have the same name as your .mod file , followed
by _steadystate. For instance, if your .mod file is called example.mod, your
Matlab file should be called example_steadystate.m and should be saved in
the same directory as your .mod file. Dynare will automatically check the di-
rectory where you've saved your .mod file to see if such a Matlab file exists. If
so, it will use that file to find steady state values regardless of whether you've
provided initial values in your .mod file.
For an example how to do it and for a program to add the required code to import and export both the parameters and the steady state values to Dynare, see the post:
http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=1834&p=5055&hilit=steadystate.m#p5055Best,
Johannes
Re: steady state, fsolve and Dynare.
Posted:
Thu Sep 03, 2015 8:23 pm
by rdoctors
Hello, I'm working with a fiscal model in both matlab and octave (octave 3.8.1 and dynare version 4.4.3). My routine is to run a simulation file, where I set the value of parameters and compute the steady state (calling mod_fiscal_04_ss_solve), prior to runing the .mod file. The idea is to variate the nr_i parameter (it can be 0.2, 0.4, 0.6) which stands for the proportion of non-ricardian agents (who work) in the economy. When I run this simulation file on matlab, it works perfectly. However, when running in octave, it doesn't "work" for nr_i = 0.2 and nr_i = 0.6 . I've checked the steady state values and they are equal for 0.4 but different for 0.2. Does anyone know why this is happening? The files (.m and .mod) are attached.
Thank you!!!!
p.s: I believe the problem is in the fsolve() function (found in the mod_fiscal_04d_ss_solve.m file)
Re: steady state, fsolve and Dynare.
Posted:
Sat Sep 05, 2015 4:31 pm
by jpfeifer
You need to do some thorough debugging. For nr_i=0.2, the mod_fiscal_04_ss_solve.m already returns different steady state values. Could it be that your steady state is not unique and Matlab and Octave converge to different steady states?