Simple model in Dynare++

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Simple model in Dynare++

Postby salga010 » Wed Mar 29, 2017 3:28 pm

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
Code: Select all
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
salga010
 
Posts: 3
Joined: Thu Mar 23, 2017 5:45 pm

Re: Simple model in Dynare++

Postby jpfeifer » Wed Mar 29, 2017 7:43 pm

What exactly do you mean when you say
I get garbage

?
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Simple model in Dynare++

Postby salga010 » Wed Mar 29, 2017 8:04 pm

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
salga010
 
Posts: 3
Joined: Thu Mar 23, 2017 5:45 pm

Re: Simple model in Dynare++

Postby jpfeifer » Thu Mar 30, 2017 7:18 am

The same problem appears in Dynare. The reason seems to be explosiveness of the simulations without pruning. Look at the output at second order
Code: Select all
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
Code: Select all
p

instead of
Code: Select all
exp(p)
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 6 guests