Commit 374bf14
Refactor McCall lecture: Emphasize persistent and transitory wage shocks (#691)
* Complete Job Search IV lecture: Add utility function and fitted VFI implementation
Updated mccall_fitted_vfi.md to implement the continuous wage offer model with CRRA utility.
Key changes:
- Added CRRA utility function u(c, γ) = (c^(1-γ) - 1)/(1-γ) to mathematical formulation
- Updated Model class to include ρ, ν, and γ parameters
- Implemented Monte Carlo integration for computing conditional expectations (Pv_u)(w)
- Updated Bellman operator T() to use u(w, γ) and u(c, γ)
- Added get_greedy() function for computing optimal policy
- Fixed all model unpacking throughout code
- Implemented compute_expectation() using w' = w^ρ * exp(ν * z) with standard normal draws
- Added Exercise 3: Exploring reservation wage as function of risk aversion γ
- Reformatted text: each sentence on separate line for better version control
Mathematical consistency:
- Code now matches theory where wages and unemployment compensation enter through utility function
- Monte Carlo approximation: (Pv_u)(w) ≈ (1/N) Σ v_u(w^ρ exp(ν z_i))
- Proper JAX implementation with interpolation for fitted value function iteration
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Rename and refactor McCall lecture to emphasize persistent and transitory wage shocks
Renamed mccall_correlated.md to mccall_persist_trans.md to better reflect the lecture's focus on the decomposition of wages into persistent and transitory components, distinguishing it from the earlier mccall_model_with_sep_markov.md lecture.
Key changes:
- Updated title to "Job Search V: Persistent and Transitory Wage Shocks"
- Rewrote Overview section to:
- Emphasize the persistent-transitory decomposition as the key innovation
- Add references to baseline model (mccall_model) and Job Search III (mccall_model_with_sep_markov)
- Explain why we return to permanent jobs (to isolate wage dynamics effects)
- Note use of fitted value function iteration from Job Search IV
- Replaced 'jr' abbreviation with explicit 'jax.random' throughout for clarity
- Refactored draw_τ function:
- Renamed to draw_duration for clarity
- Extracted as standalone JIT-compiled function with explicit parameters
- Prevents unnecessary recompilation when model parameters change
- compute_unemployment_duration now serves as a clean wrapper
- Simplified JobSearchModel class to Model
- Changed Model instantiation to use positional arguments instead of keyword arguments
- Fixed grammatical errors throughout the text (added missing commas, articles, etc.)
- Updated _toc.yml to reflect filename change
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: syntax for code-cell error
* Convert mccall_persist_trans.md to MyST format
Used jupytext to convert the file from markdown to MyST format:
- Changed format_name from "markdown" to "myst" in YAML frontmatter
- Converted all ```python code blocks to ```{code-cell} ipython directives
- Removed extra "jupyter:" wrapper level in frontmatter
- Updated format_version to match other lecture files (0.13)
This ensures the file is properly processed as a MyST markdown file
consistent with all other lectures in the repository.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Convert mccall_model_with_sep_markov.md to MyST format
Used jupytext to convert Job Search III lecture from markdown to MyST format:
- Changed format_name from "markdown" to "myst" in YAML frontmatter
- Converted all ```python code blocks to ```{code-cell} ipython3 directives
- Removed extra "jupyter:" wrapper level in frontmatter
- Updated format_version to match other lecture files (0.13)
This was the only remaining lecture file in the repository using plain
markdown format instead of MyST. All lectures are now consistent.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add missing bibliography entries for MaCurdy1982 and Meghir2004
Added two bibliography entries referenced in mccall_persist_trans.md:
- MaCurdy (1982): "The use of time series processes to model the error
structure of earnings in a longitudinal data analysis"
- Meghir & Pistaferri (2004): "Income variance dynamics and heterogeneity"
These are classic references on wage dynamics in labor economics, used to
support the persistent-transitory decomposition approach in Job Search V.
This fixes the build warnings:
WARNING: could not find bibtex key "MaCurdy1982"
WARNING: could not find bibtex key "Meghir2004"
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Remove duplicate section in mccall_fitted_vfi.md
Removed a duplicated section that repeated the Bellman operator explanation
and P operator definitions. The section starting with "In the discrete case,
we ended up iterating on the Bellman operator" was appearing twice (lines
97-135 and 140-177), along with a duplicate "### Fitting" header.
Removed the duplicate at lines 140-177, keeping only the first occurrence.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Replace \RR with \mathbb{R} in mccall_fitted_vfi.md
Changed the LaTeX command for the real numbers from \RR to the standard
\mathbb{R} notation for consistency with mathematical typesetting
conventions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Remove incomplete exercise about mean-preserving spread
Deleted the second exercise (mfv_ex2) which asked about mean-preserving
spread and had an incomplete solution placeholder. The exercise was about
exploring how reservation wage varies with volatility while holding mean
constant.
Renumbered the third exercise (mfv_ex3 about risk aversion) to become
the new second exercise (mfv_ex2).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: mmcky <mamckay@gmail.com>1 parent e2c1183 commit 374bf14
File tree
5 files changed
+137
-125
lines changed- lectures
- _static
5 files changed
+137
-125
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2711 | 2711 | | |
2712 | 2712 | | |
2713 | 2713 | | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
| 2725 | + | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | 476 | | |
504 | 477 | | |
505 | 478 | | |
| |||
508 | 481 | | |
509 | 482 | | |
510 | 483 | | |
511 | | - | |
| 484 | + | |
512 | 485 | | |
513 | 486 | | |
514 | 487 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
| |||
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
25 | | - | |
| 23 | + | |
26 | 24 | | |
27 | 25 | | |
28 | 26 | | |
| |||
104 | 102 | | |
105 | 103 | | |
106 | 104 | | |
| 105 | + | |
107 | 106 | | |
108 | 107 | | |
109 | 108 | | |
| |||
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| |||
334 | 335 | | |
335 | 336 | | |
336 | 337 | | |
| 338 | + | |
337 | 339 | | |
338 | 340 | | |
339 | 341 | | |
| |||
492 | 494 | | |
493 | 495 | | |
494 | 496 | | |
495 | | - | |
| 497 | + | |
496 | 498 | | |
497 | 499 | | |
498 | 500 | | |
| |||
545 | 547 | | |
546 | 548 | | |
547 | 549 | | |
| 550 | + | |
548 | 551 | | |
549 | 552 | | |
550 | 553 | | |
| |||
0 commit comments