Skip to content

Seed mccall_risk — gap-fill to 145/145 (closes #258) - #264

Merged
mmcky merged 1 commit into
mainfrom
seed/mccall_risk
Aug 21, 2026
Merged

Seed mccall_risk — gap-fill to 145/145 (closes #258)#264
mmcky merged 1 commit into
mainfrom
seed/mccall_risk

Conversation

@mmcky

@mmcky mmcky commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

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.md at the engine's current main (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.yml entry added by hand in the source's position (after mccall_fitted_vfi), never taking init's ToC copy (it reverts the localised part captions — QuantEcon/action-translation#254); FONTPATH corrected from the engine's hard-coded _fonts/ to this edition's fonts/ (the gotcha that failed the strict cache build on learning_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$); no usetex; i18n font block present; the one {doc} link resolves; no citations.

Note for the reviewer: the preview tolerates CellExecutionError as 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.

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.
Copilot AI lite review requested due to automatic review settings August 20, 2026 23:11
@netlify

netlify Bot commented Aug 20, 2026

Copy link
Copy Markdown

Deploy Preview for astonishing-narwhal-a8fc64 ready!

Name Link
🔨 Latest commit 2bd2244
🔍 Latest deploy log https://app.netlify.com/projects/astonishing-narwhal-a8fc64/deploys/6a8789853bdd4500082e97fe
😎 Deploy Preview https://deploy-preview-264--astonishing-narwhal-a8fc64.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml so it appears in the McCall/job-search sequence.
  • Adds translation state metadata .translate/state/mccall_risk.md.yml for 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 thread lectures/mccall_risk.md
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 thread lectures/mccall_risk.md
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 thread lectures/mccall_risk.md
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)
@github-actions

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants