Are Dynare's stochastic shocks truely random?

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.

Are Dynare's stochastic shocks truely random?

Postby johannes.fritz » Tue Jun 21, 2011 7:39 pm

Dear forum,

my simulation results make me wonder if Dynare repeats the exact same sequence of shocks in its stochastic specification.

My general task was to generate multiple simulated time series in order to extract a distribution of correlations generated by my model. However, I was surprised to receive the exact same time series in every simulaion despite using the stochastic Dynare specification.

Checking my suspicion, I also ran simulations of the Dynare example based on Jesus Fernandez-Villaverde (Basic RBC Model with Monopolistic Competion, stochastic version). The result is the same.

Is it possible that Dynare only gives one sequence of shocks i.e. shocks are not truely random but only have the property of a zero mean & given variance? Or do I have a knot in my thinking somewhere?

To see what I mean, please find the mod file to the RBC example attached. My adaptations only serve to extract the shock sequence:
- I added another endogenous variable ("shock_history", line 2),
- and introduced a further equation into the model ("shock_history=e", where e is the stochastic shock, line 24).
- I also decreased the number of simulated periods to 300, supressed IRFs as well as all other output.
I have not looped the simulation yet. I ran it twice "by hand" and cleared MATLAB as well as the mod's directory between the simulations.

Thank you,
Johannes
Attachments
RBC_Monop_JFV.mod
A slight adaptation of the example RBC model.
(916 Bytes) Downloaded 178 times
johannes.fritz
 
Posts: 4
Joined: Tue Jun 21, 2011 7:14 pm

Re: Are Dynare's stochastic shocks truely random?

Postby jpfeifer » Tue Jun 21, 2011 8:03 pm

In recent versions of Dynare, the random number generator seed has been fixed by default to generate results that are replicable across different runs on different computers at different times. Hence, if you want to generate several different simulation samples, you should use the set_dynare_seed-command (page 59 of the manual).
------------
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: Are Dynare's stochastic shocks truely random?

Postby johannes.fritz » Wed Jun 22, 2011 6:16 am

That's it. Thanks so much.
johannes.fritz
 
Posts: 4
Joined: Tue Jun 21, 2011 7:14 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 6 guests