Me and my coauthor have been puzzled by the different deterministic steady-states that dynare and dynare++ return. We run the same mod file. We give analytical solution as initial value. The resid(1) returns a set of numbers that are of magnitude 1e-15.
a) In dynare we compute the steady state using steady; command
b) in dynare++ we use only --no-irfs option, load model.mat and look variable dyn_steady_states
They are substantially different. If I use model_f.m function generated by dynare++, increase tolerance of fsolve and use fsolve, I get the same result as in dynare.
Playing with --ss-tol option in dynare++ (eg --ss-tol 1e-14) does not help.
Any hint appreciated!
My co-author runs the same code in dynare 4.2.4 and the problem disappears.
Could you post or private message me the mod-files?
Just additional information:
- We get the result we want when we set --ss-tol 10 (or large number). The dynare++ version has nothing to do this.
- The blahblah.jnl tells that
0.04687:S00014:-1.:01888: : Non-linear solver for deterministic steady state
0.04687:M00015:-1.:01888: : Iter lambda residual
0.04687:M00016:-1.:01888: : ---------------------------
0.04687:M00017:-1.:01888: : 0 N/A 0.484482
where as the resid(1) of the standard dynare gives numbers that are in the magnitude of 1e-15.
So the puzzle remains!
We replicated the issue and are looking into it.
We talked to Michel yesterday and followed his advice to check whether dynare++ parser works correctly. It seems that dynare++ has difficulties to parse the following formula in parameter values section of the code:
rhobhatbar = (pH/dp)*(1 - ((1-lambdae)/beta))bstar + (pH/dp)(1 - ((1-lambdab)/beta))*cstar + cstar;
This is parsed correctly:
rhobhatbar = (pH/dp)bstar(beta-1+lambdae)/beta +(pH/dp)*(beta-1+lambdab)*cstar/beta + cstar;
Strange thing was that if we turned this parameter as a variable and moved it to the model code, it was parsed correctly!
I hope dynare++ parser can be corrected.