I am trying to simulating my DSGE since I am including an idiosyncratic shock. I have solved it by Dynare and now I am trying to using the policy functions (by Dynare) and randomly generated shocks to simulate the economy (in Matlab). I would be able if I had just one state variable (beyond the shocks), but I have two state variables, so I do not know how to do it. Does anybody have any suggestions?
The “simult_.m” file in the “matlab” subdirectory of Dynare installation does what you want: it is able to apply the approximate policy function given a series of exogenous shock. Look at the header of that function for some hints on its usage.