Add Job Search V lecture on risk-sensitive preferences - #760
Conversation
This commit adds a new lecture on risk-sensitive preferences in the job search context, positioned after the fitted VFI lecture. The lecture introduces entropic risk-adjusted expectations and applies them to the McCall search model. Changes: - Add mccall_risk.md: New lecture on risk-sensitive preferences - Update _toc.yml: Insert mccall_risk after mccall_fitted_vfi - Renumber subsequent lectures (V→VI, VI→VII, VII→VIII, VIII→IX, IX→X) - mccall_persist_trans: V → VI - career: VI → VII - jv: VII → VIII - odu: VIII → IX - mccall_q: IX → X Key features of the new lecture: - Introduction to risk-sensitive preferences via entropic risk measure - Examples with Gaussian and Beta distributions - Mean-preserving spread analysis - Application to McCall job search model with risk aversion - Analysis of reservation wages and unemployment rates vs risk aversion - All code verified to run successfully with JAX 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
@mmcky Would you mind to get this building? Then perhaps we can ask someone to review before it's merged. |
|
Will do @jstac
|
- Convert first exercise from backtick to MyST curly brace syntax - Add labels to both exercises (mcr_ex0, mcr_ex1) - Add exercise references to solution-start directives - Add dropdown class to solutions for consistency - Ensure all exercise/solution pairs are properly matched
|
@jstac do you use |
|
Please remove all @mmcky , I never edit in ipynb if I can avoid it! |
|
📖 Netlify Preview Ready! Preview URL: https://pr-760--sunny-cactus-210e3e.netlify.app (dd4ac64) 📚 Changed Lecture Pages: career, jv, mccall_persist_trans, mccall_q, mccall_risk, odu |
I will add this to https://github.com/QuantEcon/action-style-guide |
Thanks @mmcky ! Please add hide output to the pip install. Please also cut as well as |
- Add :tags: [hide-output] to pip install cell - Remove print statements from Beta distribution example - Remove print loops for reservation wage values - Remove print loops for unemployment rate values
|
📖 Netlify Preview Ready! Preview URL: https://pr-760--sunny-cactus-210e3e.netlify.app (3e3f4f7) 📚 Changed Lecture Pages: career, jv, mccall_persist_trans, mccall_q, mccall_risk, odu |
- Add parentheses around MGF abbreviation for clarity - Fix subject-verb agreement: change 'decrease' to 'decreases'
|
@jstac just some minor changes. One question, do you indent $$
e_\theta = \mu + \frac{\theta\sigma^2}{2}
$$I think $$
e_\theta = \mu + \frac{\theta\sigma^2}{2}
$$is tidier (but maybe you prefer indended). Just keen to set a style guide preference. |
|
Thanks @mmcky . I prefer the former, it's how I indent in my research papers, but I'm happy for you to decide. No strong preference |
|
📖 Netlify Preview Ready! Preview URL: https://pr-760--sunny-cactus-210e3e.netlify.app (8fdaf98) 📚 Changed Lecture Pages: career, jv, mccall_persist_trans, mccall_q, mccall_risk, odu |
|
🤖 Status note for a future session — from a maintainer investigation on 2026-07-08 into why open-PR previews 404. Context only, not instructions. Netlify preview: https://pr-760--sunny-cactus-210e3e.netlify.app/ currently returns 404. Why previews are down (repo-wide findings)1. This branch is stale — 95 commits behind 2. The arviz failure was a red herring — do NOT pin arviz or rewrite plotting. A 2026-07-07 rebuild also failed in Recommended first step for this PRUpdate this branch to This PR touches: |
- drop `jax` from the pip install cell; the style guide rules this out
because it can install jax[cpu] rather than the GPU build that comes
from Docker and Actions, and this lecture includes the GPU admonition
- `{code-cell} python` -> `ipython3` on all 13 cells; `python` appears
nowhere else in the repo
- jax.random.PRNGKey -> jax.random.key in four places
- use Unicode Greek for code identifiers (θ, σ, μ) so the illustrative
sections match the Model NamedTuple, which already used them; LaTeX in
plot labels is left as \theta, \sigma, \mu
- add mystnb captions and names to the three figures outside solution
blocks, and drop the now-duplicative ax.set_title on those two.
The two figures inside solution blocks stay uncaptioned, since a
caption there wraps the image in a LaTeX float and breaks the PDF
build
- remove a duplicate jax/jnp/plt import in the Beta example
- "## Back to Job Search" -> sentence case
Output is unchanged: the reservation wage is 1.0720 before and after.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
These were left over from developing the lecture as a standalone notebook. The figures style guide asks that we not set figure size or style without a reason, so the figures now use the site defaults and stay consistent with the rest of the series. Removed 5 figsize arguments and 18 fontsize arguments, and normalised the four data series to lw=2 as the guide asks (reference lines stay thin at linewidth=1). Rendered all five figures at the default size to check: labels, legends, contour labels and the colorbar are all readable, nothing crowded or clipped. Output is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
📖 Netlify Preview Ready!Preview URL: https://pr-760--sunny-cactus-210e3e.netlify.app Commit: 📚 Changed LecturesBuild Info
|
✅ Translation sync completed (zh-cn)Target repo: QuantEcon/lecture-python.zh-cn
|
Summary
This PR adds a new lecture on risk-sensitive preferences in the job search context, positioned as Job Search V (after the fitted VFI lecture).
Changes
New Content
Updated Files
Test Plan
Key Results
The lecture demonstrates that more risk-averse agents (more negative θ):
🤖 Generated with Claude Code