Page 1 of 1

Adding a negative shock

PostPosted: Fri Apr 12, 2013 10:02 pm
by asmae
Hello,

I need to add a 1 period negative shock (of 5%) to the AR(1) process in my open economy model . i used for that the commands:
shocks;
var ksi;
periods 1;
values -0.05;
end;
simul(periods=1000);

but i can't obtain my IRFs.

to make a comparison, i used the commad stoch_simul with stderr 1. in such case i can run my programm and obtain my IRFs, but how can i add a negative shock? (stderr can never be negative!).

Please can you help?

:|

Re: Adding a negative shock

PostPosted: Sat Apr 13, 2013 4:33 pm
by jpfeifer
For stoch_simul, change the
Code: Select all
theta = rho*theta(-1)+ksi;

to
Code: Select all
theta = rho*theta(-1)-ksi;


For simul, I would need the mod-file.

Re: Adding a negative shock

PostPosted: Sat Apr 13, 2013 9:18 pm
by asmae
Hello,

Thanks for your reply, i appreciate it.

Please find attached my mod file for simul.

Thank you. :P

Re: Adding a negative shock

PostPosted: Sun Apr 14, 2013 6:03 am
by jpfeifer
How about following Matlab's and Dynare's precedence rules and setting the brackets correctly in e.g.
Code: Select all
yss = (a*(alpha*beta/1-beta*(1-delta))^alpha)^1/(1-alpha);

in order to not obtain complex steady state values. Apart from that the code runs correctly.

Re: Adding a negative shock

PostPosted: Sun Apr 14, 2013 9:30 am
by asmae
Hello,

Thank you for your help.

:P