Skip to content

Enhance McCall separation model: Add full solution before simplification - #697

Merged
jstac merged 1 commit into
mainfrom
mm_sep_ext
Nov 13, 2025
Merged

jstac merged 1 commit into
mainfrom
mm_sep_ext

Conversation

@jstac

@jstac jstac commented Nov 13, 2025

Copy link
Copy Markdown
Contributor

Summary

This PR enhances the pedagogical structure of the McCall job search model with separation lecture by introducing a complete solution using both Bellman equations before presenting the computational simplification.

Changes

New Content

  • Full model solution section (lines 233-388): Implements direct iteration on both value functions v_u and v_e

    • Added T_u and T_e operators implementing the Bellman updates
    • Added solve_full_model() function for simultaneous iteration
    • Computed reservation wage from full model: w_bar_full = 11.8644
  • Method verification (lines 578-587): Demonstrates equivalence of both approaches

    • Compares reservation wages from full vs. simplified methods
    • Shows difference is effectively zero (< 1e-6)

Improved Structure

  • Reorganized "Solving the Model" section with clearer flow
  • Renamed "The Reservation Wage: First Pass" → "Computing the Reservation Wage"
  • Reframed "A Simplifying Transformation" to emphasize computational efficiency
  • Enhanced transitions between sections for better narrative flow

Bug Fixes

  • Fixed typo: "these obtaining" → "obtaining" (line 137)
  • Corrected variable unpacking in visualization code
  • Fixed LaTeX-to-Python code in T_e operator
  • Corrected model parameter unpacking throughout

Testing

✅ All code runs without errors (verified via jupytext conversion and execution)
✅ Both solution methods produce identical reservation wages
✅ All plots render correctly

Pedagogical Impact

Students now:

  1. Learn the model fundamentals through direct solution
  2. See the computational cost of the full approach
  3. Understand the simplifying transformation as an optimization
  4. Verify both methods are mathematically equivalent

🤖 Generated with Claude Code

…re simplification

This commit improves the pedagogical flow of the job search lecture by:

- Introducing a direct solution using both Bellman equations (v_u and v_e)
- Computing the reservation wage from the full model solution
- Presenting the simplifying transformation as a more efficient approach
- Verifying both methods produce identical results (difference < 1e-6)
- Fixing several bugs in the new code sections

The enhanced structure helps students understand the model fundamentals
before learning the computational optimization.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@jstac

jstac commented Nov 13, 2025

Copy link
Copy Markdown
Contributor Author

@mmcky Could you look at this please?

@github-actions

Copy link
Copy Markdown

@jstac

jstac commented Nov 13, 2025

Copy link
Copy Markdown
Contributor Author

Hmmm, seems it's all good now. Did you tweak something @mmcky ?

Merging.

@jstac
jstac merged commit 78561ef into main Nov 13, 2025
@jstac
jstac deleted the mm_sep_ext branch November 13, 2025 07:28
@mmcky

mmcky commented Nov 13, 2025

Copy link
Copy Markdown
Contributor

I only re-ran the workflow. Looks like pip rejected the http request.

@jstac

jstac commented Nov 13, 2025

Copy link
Copy Markdown
Contributor Author

Roger that. Thanks @mmcky

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