Simult_ with order=2 causes a problem

[quote=“jpfeifer”]Dear Leo,
this is a by now well-known property. The simulation you describe causes the system to transition to the stochastic steady state. See [Simult_ and nonzero IRFs in higher-order approximations)[/quote]

Thank you prof. Pfeifer,

Can I make one more following question? I read the thread you mentioned. If I understand correctly, I should use “stochastic steady state” if I’d like to simulate my model or calculate IRFs using simult_.

Following code is how I simulated my model for 25,000 periods using simult_ and order=2 using “stochastic steady state”. Am I doing right?

ex_ = zeros(1000,5); y0=oo_.dr.ys; dr=oo_.dr; iorder=2;
y_=simult_(y0, dr, ex_, iorder);
% This block is used to get stochastic steady state

ee = randn(25000,5); stdev = M_.params(29:33);
ex_ = ee * diag(stdev); dr=oo_.dr; iorder=2; y0 = y_(:,1000);
y_=simult_(y0, dr, ex_, iorder);