Dear Community,

Thanks for your answers to my previous posts! I was wondering if there is an earlier, Matlab only implementation of k_order_perturbation, esp. for 1st order approximations. The reason is that I am developing some materials for my students, and I’d like them to be able to trace through Matlab code which runs through the solution strategy, and they don’t know how to read C++ code or use the MEX functionality (nor am I very familiar with it, in all honesty).

Best,

Zhao

Unfortunately, this is not the case. You should use Dynare not Dynare++ for this. There, everything is in Matlab (but still not really intuitive).

It’s OK that it’s not intuitive, I will simplify the code before exposing the students to it. Could you point me to the Dynare files which can solve through the first order model? In tracing though the resol.m file, I seem to be finding only the function calls to Dynare++, though the following stack sequence:

stoch_simul.m > resol.m > stochastic_solvers > k_order_pert > k_order_perturbation(MEX)

Best,

Zhao

Nevermind; I believe I’ve found the command I was looking for; the call to dyn_first_order_solver. Thanks for your help.

Yes, that is the file. The explanation what happens there is in Sébastien Villemot (2011), “Solving rational expectations models at first order: what Dynare does” dynare.org/wp-repo/dynarewp002.pdf