Page 1 of 1
sequences of both negative and positive shocks
Posted:
Sat Apr 16, 2016 2:28 pm
by sange
Hi everyone,
I would like to simulate my model under both negative and positive shocks. In fact, I would like to draw a sequence of shocks which will be positive and negative and simulate the model using those. How can I do that exercise with Dynare?
Re: sequences of both negative and positive shocks
Posted:
Sat Apr 16, 2016 2:43 pm
by jd1090
I'm not quite sure why you would need a sequence of shocks, but you could try using histval.
To generate positive and negative shocks is simple. Suppose you have a law of motion for tfp:
a=rho*a(-1)+e_a
This will generate a positive shock if you specify the shocks block in the standard way:
var e_a; stderr 0.01
If on the other hand you want to generate a negative shock, just use:
a=rho*a(-1)-e_a
Re: sequences of both negative and positive shocks
Posted:
Mon Apr 18, 2016 10:44 am
by sange
Thank you Jd1090 for your reply,
I would not want to separate the two shocks. Let me be clear: for a law of motion like this a=rho*a(-1)+e_a, I would like the shock e_a to be alternately positive and negative. So in one law of motion, I would like to have impulse responses for a shock that could be alternately negative and positive.......
Thank you for your help in advance.
Re: sequences of both negative and positive shocks
Posted:
Mon Apr 18, 2016 12:58 pm
by jpfeifer
Using the simult_-function of Dynare, you can simulate the model with any given sequence of shocks that you want. An example is at
https://github.com/JohannesPfeifer/DSGE_mod/blob/master/RBC_news_shock_model/RBC_news_shock_model.mod
Re: sequences of both negative and positive shocks
Posted:
Tue Apr 19, 2016 8:10 pm
by sange
Thank you jpfeifer
I will back to you when I will be stuck.
best,