by macroresearch123 » Tue Jul 29, 2014 5:47 am
Hi Johannes,
Adding to our last email conversation: One peculiarity that I encountered is that my simulated time series explodes sometimes, and other times it does not -- I am not sure what causes it to happen. (I have pruning on each case.) I implemented what you suggested -- using Dynare's simult_ command -- via code you posted in another thread:
[dr,~,M,~,oo] = resol(0,M_,options_,oo_);
y_ = simult_(oo_.steady_state,dr,oo_.exo_simul,2);
However, to calculate the dynamic Euler residuals, I need to use Gauss Hermite; using the two node example I showed you before, it might take the form of
y_plus = SS + A*(ye2(:, t) - SSe) + B*shocks(:,t);
y_minus = SS + A*(ye2(:, t) - SSe) - B*shocks(:,
With that in mind, two clarifying questions:
1) Why does simult_ produce time series that do not explode, but when I apply the decision rules (see the bottom of this message), it explodes?
2) Is there a way to incorporate simult_ to do Gauss Hermite quadrature? I googled "simult_" and literally only one other dynare thread comes up -- no one seems to use it!
Example of decision rules:
for t = 2:Tsim;
y_2(:,t)=SS+.5*del2+A*(ye2(:,t-1)-SSe)+B*shocks(:,t) ...
+.5*C*kron(ye2(:,t-1)-SSe,ye2(:,t-1)-SSe) ...
+.5*D*kron(shocks(:,t),shocks(:,t))+E*kron(ye2(:,t-1)-SSe,shocks(:,t));
ye2(:,t)=y_2(statevars,t);
end