Replication with simul_replic

Hey everybody,

I’m modeling a simple NK model and trying to get simulated fake data with various shocks at random.
To do so, I’m using stoch_simul(order=1,irf=0,hp_filter=1600,simul_replic=1,periods=300)
but I cannot understand the result.

I thought that by decreasing the stderr of each shock in a shocks block, the variance of the replicated data (eg. y, i, pi) tends to be smaller.
However, even though I changed the stderr of each shock in linear_nk_mod, the simulated replicated data (fake y1, fake i1, fake pi1 in the code below) did not change at all.

Is my understanding wrong?
Or, how can I get different replicated data with various volatility?

Help me, please.

Thanks in advance

(I have added a path of get_simul_replications in
linear_nk.mod (1.1 KB)
exe_GEN.m (414 Bytes)

You need at least simul_replic=2 for get_simul_replications to work with the current run. My guess is you are always loading an old _simul.mat-file still present on the disk.

1 Like

Thank you for quick reply.
By changing simul_replic from 1 to 2, I managed to get the expected result.
Thank you very much!

By the way, I wonder why simul_replic = 1 cannot work well. In my understanding, simul_replic determines the number of simulation, and I thought even when simul_replic = 1, the simulation can run well (though it generate only one future path.)
What is wrong?

When you set simul_replic=1, the simulation is stored in oo_.endo_simul. Only if there is more than 1 simulation Dynare will save the additional simulation in a binary file on the disk. See the manual.

1 Like

I understood. Thank you!!

Professor, may I ask how to call the data from oo_.endo_simul in the estimation command? Would estimation(datafile=oo_.endo_simul.....) work?

I think you have to do it manually. datafile requires .csv or .mat or some other form as mentioned in manual. Maybe oo_.endo_simul is not in these forms.

It depends on what you are trying to do. But you can create a dseries object to use in estimation. See e.g. tests/dates/fs2000.mod · master · Dynare / dynare · GitLab, which should work with variables in the workspace as well.