by macroresearch123 » Mon Jul 20, 2015 6:29 pm
Hmm, but if Dynare computes the decision rules, then other shocks can be plugged in since the policy function has already been solved?
And indeed I took after your suggestion in that paper where I filtered the results, but maybe I didn't do it 100% right. Here's what I wrote below -- there are 12 parameters I'm estimating and two shock processes.
[oo_.dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_); %run model solution in Dynare
if info %solution was not successful
fval=10e6+sum([xopt(1),xopt(2),xopt(3),xopt(4), xopt(5), xopt(6), xopt(7), ...
xopt(8), xopt(9), xopt(10), xopt(11), xopt(12)].^2); %return with penalty
else
shocks=[oo_.exo_simul(:,1)+P.ga oo_.exo_simul(:,2)+P.ge];