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.
If you already solved the steady state in a Matlab-file, you can use it directly. As the user guide says:
[quote]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.[/quote]
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:
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.
p.s: I believe the problem is in the fsolve() function (found in the mod_fiscal_04d_ss_solve.m file)
mod_fiscal_04_ss_solve.m (11.9 KB)
mod_fiscal_04_ss.m (11.1 KB)
mod_fiscal_04d_ajs_tax.mod (28.2 KB)
simula_mod_fiscal_04_bre_02b.m (13.4 KB)
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?