# MIT shocks in deterministic environment

Hi,

Could you please let me know the best way to simulate a series of MIT shocks, preferably in a deterministic environment?

Also, in a stochastic simulation, how can I give specific values to the shock series? That is, I want my varexo to take specific values in my simulation (for instance, a function similar to set_param_value() to set the exogenous variables).

Thank you,

Soroush

1 Like

For the second question, it seems the function
y_=simult_(y0,dr,ex_,iorder)
can be used to simulate with a different series of exogenous shocks (ex_).

For stochastic simulations, see https://github.com/JohannesPfeifer/DSGE_mod/blob/master/RBC_news_shock_model/RBC_news_shock_model.mod
The deterministic ones are tricky, because there you have perfect foresight. The right way to do this would be to run a sequence of perfect foresight simulations.

1 Like

Thank you very much Johannes. For the MIT shock in the deterministic environment, I wrote the following code that writes a mod file for every period. It seems to work fine. The baseline model is example1.mod. I want to use it in my class, and I uploaded it here in case others were interested. I appreciate it if you could take a look and let me know if you agree with everything, and if there are obvious ways to improve it.
irf_mit.m (1.7 KB)
write_rbc_dtr_MIT_modFile.m (2.5 KB)

Thank you,
Soroush

1 Like

Hi, professor. Does that mean we can not set the path of exogenous variable and call simul() directly? Besides, since people have perfect foresight on the whole path of exogenous variable, why do not they solve the optimal path one time but need to â€śrun a sequence of perfect foresight simulationsâ€ť?

The question above is about a sequence of MIT shocks. MIT shocks are by definition an unforeseen surprise. For that reason, you cannot model a sequence of MIT shocks in one perfect foresight simulation. All shocks in future periods would be known in advance.

Thanks ! Sorry to bother you with this trivial thing, but could you please share some materials about how to simulate MIT shock? I can not find them in Google.

What exactly do you want to do? Simulate one MIT shock t=0? Or a sequence t=0 to t=T?