Linking Dynare to Matlab code

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];

Rational expectations means that the assumed shock distribution is the correct one. If you feed in shocks yourself, you must make sure this distribution is consistent with the assumptions (0 mean, variance sigma^2). Having a trend may not be consistent with RE as agents expect shocks to be mean 0.

Got it, thanks for pushing on it – completely agreed now just not sure the alternative – am looking into using just one growth rate so that I can detrend the technology component easily. Any idea what might have been going wrong with the SMM – that is, why it would stop even after putting in that resol command?

Edit: I think the best resolution is to just make sure that a steady state computed from another solver is passed through to Dynare each time iterates a new set of parameters. I’ll keep working on it!