Using simult_ with third order approximation

Hi, I want to be able to do simulations using third order decision-rules for any specified path of exogenous shocks. I tried using the simult_.m function for the example model (example2.mod in the examples folder under dynare) solved up to a third order. But I obtain an output y_ which is zero everywhere apart from the first column which has the initial values of variables.

This is how I call the simult_ function after running example2.mod for order=3:

I first draw shocks:

E_e=randn(2,2100)’*0.009;

and input this into simult_ alongside the initial values of the variables (steady-state) stored in oo_.dr.ys, and the third-order decision rules stored in oo_.dr :

y_=simult_(oo_.dr.ys, oo_.dr, E_e, 3);

The resulting y_ is a matrix full of zeros. But when I do the same for order 1 or 2, simult_ works perfectly fine. I would appreciate if you could tell me what i’m doing wrong or post an example use of simult_ function with a third-order solution. Many thanks!

I have exactly the same problem of yours. Could somebody give any help?
Thank you

This is a bug in Dynare that will be fixed in the next release.

In the meantime, you can edit the file “matlab/simult_.m” and add the following lines after “global M_ options_”:

if options_.order == 3
    options_.k_order_solver = 1;
end

Thanks for your feedback.

Many thanks for your help. It works now :slight_smile:

Hi everyone

This is exactly the thread that I need. Because my objective is to feed in this vector of shocks that has over 100 elements into my model and simulate the IRFs.

What was the version of Dynare when this topic was being discussed? Because all that I see in the examples now that are relevant to this thread are fs2000.mod and fsdat_simul.m. But if I were to use the method as suggested in the mod file, I would have to use the estimation command but it only works for endogeneous variables.

How can I simulate the model for a series of exogenous shocks?

Thanks!

Please take a look at [Choosing initial values for simult_)