Seed mccall_risk — gap-fill to 145/145 (closes #258) - #264
Merged
Conversation
Delivers lectures/mccall_risk.md, lost to the rebase force-push auto-close of #242 on 2026-08-07 (mechanism: QuantEcon/action-translation#280), bringing coverage to 145/145 against lecture-python.myst. Generated with translate init -f at the current engine main (e6e9176, claude-sonnet-5, glossary zh-cn 357 terms) rather than recreated from #242's stale branch. Hand steps after init: _toc.yml entry added in the source's position (after mccall_fitted_vfi) without taking init's ToC copy; FONTPATH corrected from _fonts/ to fonts/; the 99 clobbered non-md files restored. Verified: 22/22 directives, 13/13 code cells, 31/31 headings against source; all 13 cells parse; all captions and axis labels localised (the four identical strings are pure maths); no usetex; i18n font block present. See #258 and QuantEcon/project-translation#41.
✅ Deploy Preview for astonishing-narwhal-a8fc64 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Adds the missing “工作搜寻 V:风险敏感型偏好” lecture to restore parity with the upstream lecture set (closing the final content gap) and wires it into the book build/translation tracking.
Changes:
- Adds new lecture
lectures/mccall_risk.md(translated MyST/Jupytext notebook) including figures, exercises, and JAX/QuantEcon code cells. - Registers the lecture in
lectures/_toc.ymlso it appears in the McCall/job-search sequence. - Adds translation state metadata
.translate/state/mccall_risk.md.ymlfor sync provenance.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| lectures/mccall_risk.md | New translated lecture content, including code cells and exercises. |
| lectures/_toc.yml | Adds the new lecture to the table of contents ordering. |
| .translate/state/mccall_risk.md.yml | Records translation sync metadata for the new lecture. |
Suppressed comments (3)
lectures/mccall_risk.md:451
- 该最大化问题的两项仍写成了
$u(w)$ /$u(c)$ ,但代码实现采用线性流量收益(直接使用 w_grid 与 c)。建议把这两行改成与实现一致的形式,或补充效用函数定义并在代码中使用。
\frac{1}{1-\beta(1-\alpha)} \cdot (u(w) + \alpha\beta(P_\theta v_u)(w)),
u(c) + \beta(P_\theta v_u)(w)
lectures/mccall_risk.md:457
- 最优接受规则这里仍引用了
$u(c)$ ,但实现里比较的是accept >= reject,其中reject = c + β(P_θ v)(w)。建议同步更新文字表述以匹配实现,避免与前面的公式/代码不一致。
然后计算最优策略:若 $v_e(w) ≥ u(c) + β(P_\theta v_u)(w)$,则接受该工资。
lectures/mccall_risk.md:703
- 这里的“稳态满足”第二条使用了
$(1 - F(w^*))$ 的形式,但本讲的工资报价是马尔可夫过程(依赖当前工资状态),因此该表达式不再是一般成立的到达率/找到工作速率。建议将该条改为更一般的描述,避免给出可能不正确的解析形式。
稳态满足:
- 就业工人以速率 α 失去工作
- 失业工人以速率 (1 - F(w*)) 找到可以接受的工作
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+439
to
+442
| $$ | ||
| v_e(w) = | ||
| \frac{1}{1-\beta(1-\alpha)} \cdot (u(w) + \alpha\beta(P_\theta v_u)(w)) | ||
| $$ |
Comment on lines
+602
to
+604
| # 使用 vmap 对 θ_grid 进行向量化 | ||
| compute_res_wages_vec = jax.vmap(compute_res_wage_for_theta) | ||
| reservation_wages = compute_res_wages_vec(θ_grid) |
Comment on lines
+737
to
+739
| # 使用 vmap 对 θ_grid 进行向量化 | ||
| compute_u_rates_vec = jax.vmap(compute_u_rate_for_theta) | ||
| unemployment_rates = compute_u_rates_vec(θ_grid) |
This was referenced Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gap-fills
lectures/mccall_risk.md(工作搜寻 V:风险敏感型偏好), the last missing lecture against lecture-python.myst — coverage goes to 145/145. It was delivered by #242 and lost when the rebase automation's force-push auto-closed that PR on 2026-08-07 (mechanism filed as QuantEcon/action-translation#280); see #258 for how it went unnoticed.How it was produced.
translate init -f mccall_risk.mdat the engine's currentmain(e6e9176, claude-sonnet-5, 357-term zh-cn glossary) — a fresh translation rather than a recreate from #242's branch, which is 37+ behind and would re-deliver a stale snapshot of five other lectures. Passed the structural-parity guard on the first attempt.Hand steps after init, per the seed procedure: the
_toc.ymlentry added by hand in the source's position (aftermccall_fitted_vfi), never taking init's ToC copy (it reverts the localised part captions — QuantEcon/action-translation#254);FONTPATHcorrected from the engine's hard-coded_fonts/to this edition'sfonts/(the gotcha that failed the strict cache build onlearning_approximation); the 99 clobbered non-md files restored.Verified against source: 22/22 directives, 13/13 code cells, 31/31 headings, 24/24 display-math blocks; every code cell parses; all three figure captions and every axis label, title and legend entry are localised (the only byte-identical strings are pure maths such as
$\theta$); nousetex; i18n font block present; the one{doc}link resolves; no citations.Note for the reviewer: the preview tolerates
CellExecutionErroras a warning, so a green preview is not execution verification — the cache build after merge is the real gate. Part of QuantEcon/project-translation#41.