phillips_drifts_volatilities: `kalman_forward` pairs each observation with the previous date's volatility
维护者通常 1 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 77/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- numpy, python
- 领域
- data, machine-learning
调研方向
找到 kalman_forward,检查它如何根据波动率路径 h 构造 r;issue 指出了当前的索引方式以及预期的 h[1:] 对齐方式。阅读构造 h 的 sampler 代码和 filter 循环,确认日期 1 到 T 与观测值对齐。每个观测值使用同一日期的波动率,并且有针对性的检查确认使用了最后一行波动率时,即为完成。
由索引模型根据 Issue 内容生成。
描述
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.
The change is to build r from h[1:]:
r = np.einsum('ij,tj,kj->tik', b_inverse, h[1:], b_inverse) # R_1, ..., R_T
The size of the effect on the posterior has not been measured: the figures and tables would need re-running with the change.
Found by Copilot's review of QuantEcon/lectures#36, which copies this lecture at 4d82fff: https://github.com/QuantEcon/lectures/pull/36#discussion_r4464453856
- 主要语言
- TeX
- 星标
- 129
- 派生
- 59
- 平均合并
- 2 天 10 小时
- 30 天内合并 PR
- 11
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
QuantEcon/lecture-python.myst 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
QuantEcon/lecture-python.myst#1115 · 1 条评论 ·
维护者通常 1 天内回复
-
automated issue linkchecker report
难度 2/5 1-3 小时 新手友好度 66/100
QuantEcon/lecture-python.myst#1098 ·
维护者通常 1 天内回复
-
automated issue linkchecker report
难度 2/5 1-3 小时 新手友好度 67/100
QuantEcon/lecture-python.myst#1094 ·
维护者通常 1 天内回复
-
automated issue linkchecker report
难度 2/5 1-3 小时 新手友好度 62/100
QuantEcon/lecture-python.myst#1062 ·
维护者通常 1 天内回复
-
bug content
难度 2/5 1-3 小时 新手友好度 78/100
QuantEcon/lecture-python.myst#1021 ·
维护者通常 1 天内回复
查看 QuantEcon/lecture-python.myst 的全部 Issue
相似的 Issue
-
bot-triaged module: correctness (silent) module: data module: error checking triage review
难度 2/5 1-3 小时 新手友好度 71/100
维护者通常 1 天内回复
-
automation missing-model model-sync provider:ofox
难度 2/5 1-3 小时 新手友好度 62/100
anomalyco/models.dev#13271 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
correction metadata
难度 1/5 1 小时以内 新手友好度 63/100
acl-org/acl-anthology#10838 · 1 条评论 ·
维护者通常 1 天内回复
-
area:art help wanted kind:feature platform:macos
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复