# Simult_ with order=2 causes a problem

Dear all,

I’d like to ask how to use simult_ command.

The following code is how I usually conduct a simulation using simult_ command (with order=2)

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

My question is, even though I let all the innovations be zero (as you can see from the code), the simulated values are not constant at their steady state level. They were when the order =1, but not when order =2.

It seems to me that “oo_.dr.ghs2” term deviates an endogenous variable from its steady state level (without any shock) and begins some dynamics.

Do I understand correctly? Even if it is right, It just seems weird to me that variables move away from their steady state even when there are no shocks.

Best,
Leo

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=“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);

Best,
Leo

No, all I am saying is in the simulation you performed, you will see a transition to the stochastic steady state. The question now is what you want to achieve. There are two types of IRFs you can use: Generalized IRFs or the ones at the stochastic steady state.