Skip to content

Commit e2c1183

Browse files
jstacclaudemmcky
authored
Update Job Search III: Add utility function to mathematical formulation (#690)
* Update Job Search III: Add utility function to match mathematical formulation Modified mccall_model_with_sep_markov.md to correctly apply the CRRA utility function u(c, γ) = (c^(1-γ) - 1)/(1-γ) throughout the code implementation. Key changes: - Updated Bellman operator T() to use u(w_vals, γ) and u(c, γ) - Updated get_greedy() policy function to apply utility transformation - Modified plotting code to use utility-transformed values - Added γ parameter unpacking in all relevant functions - Fixed missing comma in create_js_with_sep_model() parameter list The code now correctly matches the mathematical formulation where wages and unemployment compensation enter the value functions through the utility function rather than directly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * 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> * Fix missing equation label 'bell2mcmc' in mccall_fitted_vfi.md Added the label 🏷️ bell2mcmc to the Bellman operator equation and converted it from $$ delimiters to the {math} directive to support cross-references. This fixes the build warning: WARNING: equation not found: bell2mcmc 🤖 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: Matt McKay <mmcky@users.noreply.github.com>
1 parent 065fb58 commit e2c1183

File tree

2 files changed

+363
-215
lines changed

2 files changed

+363
-215
lines changed

0 commit comments

Comments
 (0)