SMM estimation - finite sample moments

Hey,

I’m trying to use the SMM to estimate my model. In particular, I want to use dynare to obtain the empirical moments in a finite sample of 50 periods. I want these moments to be the average of 50 different simulation series.

To my knowledge, dynare computes the empirical moments only for 1 simulation in case periods>0, even if simul_replic>1.
Therefore, to perform my analysis I would have to get the empirical moments myself using the 50 simulated series from dynare.
The relevant part of my code is

set_dynare_seed(1); options_.simul_replic= 50; stoch_simul(order = 2, pruning, IRF = 0, AR = 20, periods = 145, drop = 100, noprint) y c i k;
I have also tried putting ‘simul_replic= 50’ inside the stoch_simul function and the result is identical.

The issue is that I’m not sure how to load the 50 simulated series. ‘load FILENAME_simul’ from matlab is not working. Am I doing something wrong or is this a bug?

The second question is whether there is a better way to perform this SMM as oppose to loading results from ‘FILENAME_simul’ in every iteration of the search algorithm.

Thanks in advance!!

Answering your second question first:
For an example of SMM estimation, please see the replication files of Born/Pfeifer (2014): “Risk Matters: A comment” at aeaweb.org/articles.php?doi=10.1257/aer.104.12.4231. The files show how to generate simulations using the simult_-function. That is the most efficient way.
Regarding your second question: see github.com/JohannesPfeifer/DSGE_mod/tree/master/Hansen_1985 on how to load the replications.