You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
phillips_drifts_volatilities: kalman_forward pairs each observation with the previous date's volatility #1108
kalman_forward builds r from the whole volatility path h, whose rows are dates 0 to T: run_sampler starts it with T + 1 rows, and draw_volatility_path updates log h_0 to log h_T. The filter's loop then uses r[t] for y[t], the observation at date t + 1, so each observation is filtered with R built from the previous date's volatility: R_1 comes from h_0, and h_T is never used. The rest of the sampler pairs h[t] with date t: draw_volatility_path matches h[t] with the residual at date t, draw_β standardises the residuals by h[1:], and the retained draws keep h[1:]. The model is R_t = B^{-1} H_t B^{-1}′ at the same date, which is also what the line's own comment (# R_1, ..., R_T) says.
This came in with the vectorised filter in #1105. The version before it paired h[t] with y[t - 1] in draw_coefficient_path.
I can independently verify the volatility-date alignment in kalman_forward and add a regression test to ensure each observation uses the volatility from its corresponding date.
Would you be open to me working on this, including validating the proposed change with tests?
Activity
bennibyx commentedon Nov 9, 2026
Hi! I'd like to contribute to this issue.
I can independently verify the volatility-date alignment in
kalman_forwardand add a regression test to ensure each observation uses the volatility from its corresponding date.Would you be open to me working on this, including validating the proposed change with tests?
Thanks!