I need some help with estimating my model parameters using SMM. My model has a high-dimensional parameter space (around 15-20), and I have an optimization program ready with an interface that looks like this:

As long as I have an mfile that calculates the distance between theoretical moments and empirical moments for each set of parameters, the program can find the global minimum. However, I need to feed in parameters to the mfile each time.

My question is: Is there a way to call Dynare only once and then feed different high-dimensional parameters to calculate the simulated moments?

Currently, I am calling Dynare every time for each parameter, and I wonder if there is anything to improve it. I am attaching the mfile for reference.

I am aware that Dynare 5 has a method_of_moments command, but I’m not sure if it allows for general moments calculation like correlation or regression coefficients. Any advice or suggestions would be greatly appreciated!

Thank you! It seems from the link that the function IRF_matching_objective calculates the distance, and function csminwel does the search in the parameter space.

And in this case, you just call dynare once by doing:

Dynare modfile

Right?

However, given the parameter space of my problem is quite large, I am not sure if I can do this. Also, my search program is kind of a commercial black box from a third party

If possible, I want to be able to separate the mod file from the estimation file, and perhaps stop in the middle to examine the search problem. Is it possible to call dynare once and then simulate the solution for different parameters in a separate mfile?

Thank you for your reply. Based on your suggestion, it seems that I can employ ‘set_param_value’ to run simulations and compute moments for various parameter values, which all rely on the solution of a single dynare mod file run in the beginning.

Although I have tried this approach, I have observed a slight numerical discrepancy in the initial dynare mod file.

In an ideal scenario, the decision rule should be independent of parameter values if we aim to conduct estimation. Nevertheless, I have noticed that there are minor differences in the moments from the simulation when I use different initial parameter values (that is, the mod file which provide the decision rules).

Can you please advise on the potential cause of this issue? Also, would SMM conduct this way based on the initial parameter values of the mod file? Thank you!