Simulate data using the model

Hello! I suppose it is a basic question but I don’t know how I should proceed. I want to simulate data using my model. For example, I want to conduct 500 stochastic model simulations of 2000 periods and look how the correlations between some model variables change when I change the value of one parameter.
To be more precise, I want to consider about 20 values of one parameter (in the range between 0.01 and 0.9), conduct stochastic simulations and show how correlations and model volatilities change.

How can I do it in Dynare?

Any help or hint would be greatly appreciated!

For simulating and loading the data, see [Reading and Interpreting Binary Output From Simulation)
For looping, see [Loop over parameters)

Thank you very much!

I have one more question - it is not quite clear to me how I should define the stochastic structure of the model when I conduct a simulation for e.g. 1000 periods? I mean how are the sequences of shocks determined, so for how long are the shocks supposed to be hitting the economy?

I call the mod.file from a Matlab-file and I Need to specify the sequence of shocks. So set the size of shocks to their estimated standard deviatons, but I also need to determine how long they last.
I did the following - I simulated the model for 1000 periods where the shocks hit only in the first period, so it obviously does not make much sense…

I’m sorry if it is a too easy question, but I’m very confused about it now…

I don’t get what you are doing. When you specify the periods options, Dynare will simulate series with random shocks drawn from the shock distribution for the specified number of periods. Why do you need to specify shocks yourself?