Simple model in Dynare++

Hi all

I am trying to solve a quite simple model using Dynare++. everything seems to run well when I ask Dynare++ to do a first order Taylor expansion. But when I do more than 1, I get garbage. I have tried the same model in standard dynare and everything works well (first and second order). The problem, is that the extension of the model will involve an stochastic steady state, and therefore I need Dynare++.

Here is the code

var p dc s r;
varexo v;

parameters beta phi gamma sbar g;

beta   = 0.9842; 
phi    =  0.9713; 
gamma  =  2.0000; 
sbar   = -3.2210; 
g      = 0.0055;

model;
exp(p)  = beta*exp((1-gamma)*dc(+1) - gamma*(s(+1) - s))*(1 + exp(p(+1))); 
dc      = g + v; 
s       = (1 - phi)*sbar + phi*s(-1) + (1/exp(sbar)*(1 - 2*(s(-1) - sbar))^(1/2) - 1)*v; 
exp(-r) = beta*exp(-gamma*dc(+1) - gamma*(s(+1) - s));
end;

initval;
    p   = 3.8342; 
    dc  = 0.0055; 
    s   = -3.2210; 
    r   = 0.0269;
end;

vcov = 
        0.0043
        ];

order = 2;

To run the code I am doing
!C:\dynare\4.4.3\dynare++\dynare++ --order 2 --per 300 --sim 100 --steps 0 --seed 151 wachterSS.mod

maybe there is an issue with the timing when I translated the code from Dynare to Dynare++?
Many thanks!
S

What exactly do you mean when you say

?

Ohh I am sorry. I mean the following. When I do first order approximation, I get normal looking IRFs.
But when I do second order I get IRFs that are either 0’s, or extremely big numbers that do not make sense.
Thanks

The same problem appears in Dynare. The reason seems to be explosiveness of the simulations without pruning. Look at the output at second order

POLICY AND TRANSITION FUNCTIONS p dc s r Constant 73.106802 0.005500 -3.221000 -5.370957 (correction) 69.274390 0 0 -5.397883 s(-1) 1.131118 0 0.971300 -0.055753 v 28.010865 1.000000 24.053161 -1.380651 s(-1),s(-1) 0.163530 0 0 0 v,v 100.285037 0 0 0 s(-1),v -21.076107 0 -25.053161 1.438051
The uncertainty correction is huge. It may make sense to try to reformulate the model in logs, i.e. model

instead of