Updated Shocks and Kalman Filter


I’ve been trying to recover the updated shocks after using the smoother in the estimation. What I do is to use the Updated Variables for the exogenous processes, which are AR(1), to calculate the corresponding shock value in each period. Then I used this in the function simul_t, to recover the values for the different variables of the model and compare them to the updated variables reported by Dynare, and they don’t match. Also, it seems like the results depend on the variables that one set as observable, getting the best results in the cases where the only endogenous state variable was observable. After all that I’ve tried, even including only one observable and one shock (to rule out identification issues), I’ve come to the hyptohesis that the problem must be the first value used in the Kalman Filter. So this question has two parts: one, is why might this be happening? and two, if the problem is in fact the initial value, how does the kalman filter decide that initial value and how can I imposse that value accurately to solve it?


The Kalman filter implementation in Dynare assumes that the starting value is the steady state.

Then I don´t understand how to compute the historical shock decomposition for the filtered values, including the initial values. Could you please expand on your answer?

How exactly do you extract the E_t(\varepsilon_t)=E_t(x_t-\rho x_{t-1})? You would need E_t(x_{t-1}), which is not routinely saved.