sequences of both negative and positive shocks

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.

sequences of both negative and positive shocks

Postby sange » Sat Apr 16, 2016 2:28 pm

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?
sange
 
Posts: 3
Joined: Sat Apr 16, 2016 2:17 pm

Re: sequences of both negative and positive shocks

Postby jd1090 » Sat Apr 16, 2016 2:43 pm

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
Justas Dainauskas
Department of Economics and Related Studies
University of York
Heslington
York
YO10 5DD
United Kingdom
jd1090
 
Posts: 62
Joined: Wed Mar 25, 2015 11:12 am

Re: sequences of both negative and positive shocks

Postby sange » Mon Apr 18, 2016 10:44 am

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.
sange
 
Posts: 3
Joined: Sat Apr 16, 2016 2:17 pm

Re: sequences of both negative and positive shocks

Postby jpfeifer » Mon Apr 18, 2016 12:58 pm

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
------------
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: sequences of both negative and positive shocks

Postby sange » Tue Apr 19, 2016 8:10 pm

Thank you jpfeifer
I will back to you when I will be stuck.
best,
sange
 
Posts: 3
Joined: Sat Apr 16, 2016 2:17 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 9 guests