Page 1 of 1

News shock in Deterministic Simulation

PostPosted: Wed Mar 23, 2011 6:52 am
by bigbigben
If I specify the technology shock as a_t = rho_a*a_t(-1)+ea and simulate the responses a news in a_t using simul rather than stoch_simul, is the following the right way to do it?

shocks;
var ea;
periods 1:2 ;
values 0.0 ;
var ea;
periods 3:3;
values .01 ;
var ea;
periods 4:1000;
values 0.00;
end;

//check;

It is suppose a news with regard to the technology after two periods.

However, Dynare gives an error message:

ERROR: JR_aer_unitroot.mod:112.0-114.18: shocks: variable ea declared twice

??? Error using ==> dynare at 96
DYNARE: preprocessing failed
simul(periods=10000);

Re: News shock in Deterministic Simulation

PostPosted: Wed Mar 23, 2011 8:21 am
by jpfeifer
Judging from the manual, it should be:

Code: Select all
shocks;
var ea;
periods 1:2 3 4:1000;
values 0.0 .01 0.0;


I also guess that you do not need the specify the periods where the shock is 0 as this should be the case by default. Hence

Code: Select all
shocks;
var ea;
periods3;
values .01;


might be sufficient

Re: News shock in Deterministic Simulation

PostPosted: Thu Mar 24, 2011 1:29 am
by bigbigben
Hi, jpfeifer:

Thank you for the help. The code works now. Something interesting is that I cannot replicate the result in Jaimovich and Rebelo (2009 AER) with simul, but stoch_stimul result basically can generate co-movement between macro variables. if I use simul, there is dip of consumption when the shock is realized, and furthermore, the responses before period 3 are just zeros. I guess Dynare does not recognize the shock as a "news".

Re: News shock in Deterministic Simulation

PostPosted: Wed Mar 28, 2012 4:27 pm
by rteconomics
Hi! Would u be kindly willing to share your code? I'm working on a similar model and would be a great help.
THANKS!
R.