Skip to content

Conversation

@jstac
Copy link
Contributor

@jstac jstac commented Nov 16, 2025

Summary

This PR enhances the fitted value function iteration (VFI) lecture with improved visualizations and a demonstration of ergodic convergence properties.

Key Changes

  1. Reservation Wage Visualization

    • Added vertical black line to the value function plot (line 453-454) to clearly mark the reservation wage w_bar
    • The line appears as a dashed black line with label showing on the legend for easy identification of where employment and continuation value functions intersect
  2. Convergence Demonstration

    • Added new section demonstrating how the difference between time-average and cross-sectional unemployment rates decreases with longer simulations
    • Shows that with T=2,000: difference is 0.0594
    • Shows that with T=10,000: difference reduces to 0.0016 (~97% reduction)
    • This illustrates the ergodic property: long-run behavior of a single agent mirrors aggregate cross-sectional behavior
  3. Code Quality Improvements

    • Fixed markdown formatting issue (removed empty code cell that was causing syntax errors)
    • Improved code organization and flow
    • Enhanced documentation and comments
  4. Testing

    • Verified all code runs successfully using jupytext conversion
    • All plots generate correctly
    • All numerical outputs are consistent

Test Plan

  • Convert markdown to Python using jupytext
  • Run Python script successfully
  • Verify reservation wage visualization appears correctly
  • Verify convergence demonstration shows expected results
  • Confirm no syntax or runtime errors

🤖 Generated with Claude Code

- Add vertical black line to plot showing reservation wage w_bar
- Fix markdown formatting issue with empty code cell
- Add demonstration showing how increasing simulation length (T=10,000) reduces difference between time-average and cross-sectional unemployment rates from 0.0594 to 0.0016
- Reorganize sections for better flow and clarity
- Improve code structure and documentation

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

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link

📖 Netlify Preview Ready!

Preview URL: https://pr-711--sunny-cactus-210e3e.netlify.app (3b07b61)

📚 Changed Lecture Pages: mccall_fitted_vfi, mccall_model

@jstac jstac merged commit 977a93e into main Nov 16, 2025
1 check passed
@jstac jstac deleted the mmcfit branch November 16, 2025 21:50
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