Hi, I must add the investment shock in my model. I have put this in the net investment equation that is
(In=I*ei-(delta*ksi*K(-1));),
where ei is the shock. So, the optimal investment decision became
Q=1+ei*((eta_i/2)*(((In+I_ss)/(In(-1)+I_ss)-1)^2)+eta_i*((In+I_ss)/(In(-1)+I_ss)-1)*((In+I_ss)/(In(-1)+I_ss)))-betta*Lambda(+1)*ei(+1)*(eta_i*((In(+1)+I_ss)/(In+I_ss)-1)*(((In(+1)+I_ss)/(In+I_ss))^2));
and the shock process is the basic AR(1). My aggregate resource constraint is
Y=C+I+G+(eta_i/2)*(((In+I_ss)/(In(-1)+I_ss)-1)^2)*(In+I_ss)+tau*psi*Q*K;
so I also put here the investment shock like
Y=C+I+(ei*(eta_i/2)*(((In+I_ss)/(In(-1)+I_ss)-1)^2)*(In+I_ss))+G+tau*psi*Q*K;
but I have some doubts, is it right??
the entire code is that
shocks.mod (6.9 KB)