Page 1 of 1

dynare++ ja dynare give different deterministic steady-state

PostPosted: Tue May 21, 2013 1:53 pm
by ripatti
Dear Musketeers,

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!

Cheers,

Antti

Re: dynare++ ja dynare give different deterministic steady-s

PostPosted: Tue May 21, 2013 1:58 pm
by ripatti
My co-author runs the same code in dynare 4.2.4 and the problem disappears.

Re: dynare++ ja dynare give different deterministic steady-s

PostPosted: Tue May 21, 2013 2:06 pm
by jpfeifer
Could you post or private message me the mod-files?

Re: dynare++ ja dynare give different deterministic steady-s

PostPosted: Wed May 22, 2013 2:37 pm
by ripatti
Just additional information:
1) We get the result we want when we set --ss-tol 10 (or large number). The dynare++ version has nothing to do this.
2) 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!

Antti

Re: dynare++ ja dynare give different deterministic steady-s

PostPosted: Wed May 22, 2013 6:00 pm
by jpfeifer
We replicated the issue and are looking into it.

Re: dynare++ ja dynare give different deterministic steady-s

PostPosted: Thu May 23, 2013 6:46 am
by ripatti
Thanks a lot!

Re: dynare++ ja dynare give different deterministic steady-s

PostPosted: Fri May 24, 2013 6:40 am
by ripatti
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;

Re: dynare++ ja dynare give different deterministic steady-s

PostPosted: Fri May 24, 2013 10:20 am
by ripatti
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.

Antti