Hi everybody,

I am wondering if I can set a path for a shock in Kalman filter. Specifically, I am trying to estimate a DSGE model with 10 observables and 10 shocks. But one of my observables has missing values over some period. This is not a problem since Kalman filter takes care of that. But I also want the shock that is associated with this observable to be equal to zero over this period. Any ideas?

# Setting a path for a shock in Kalman filter

That is tough. A shock in the Kalman filter is per definition exogenous. What you could try is adding an observation equation where you say that

`observed_shock=epsilon`

and then in your data-file, you observe that shock only for the 10 periods while it is missing for the rest.

1 Like

Thanks Johannes. After surfing on the Dynare forum (which is quite resourceful), i have got the same idea that you suggested. And it worked, the results were reasonable too. I also had to introduce a measurement shock to make sure we have sufficient amount of shocks but i set the variance of this shock so small that i do not virtually observe it on the historical decompositions. I guess this is okay. Thanks again!