Skip to content

Conversation

@jstac
Copy link
Contributor

@jstac jstac commented Nov 14, 2025

Summary

Updated notation in Job Search lectures I-V to use uppercase letters for random variables and lowercase for realizations, improving mathematical consistency and clarity.

Changes by lecture:

  • Job Search I (mccall_model.md): w_tW_t for wage offer sequences
  • Job Search II (mccall_model_with_separation.md): w_tW_t for wage offers
  • Job Search III (mccall_model_with_sep_markov.md): (s_t, w_t)(S_t, W_t) for state variables
  • Job Search IV (mccall_fitted_vfi.md): Already using correct notation (no changes needed)
  • Job Search V (mccall_persist_trans.md): w_tW_t, z_tZ_t, y_tY_t for wage components

Notation convention:

  • Uppercase for random variables (e.g., W_t, Z_t, S_t)
  • Lowercase for:
    • Realizations in sums (e.g., sum_w v(w) q(w))
    • Standard normal shocks (e.g., zeta_t, epsilon_t)

This standardization makes it clearer when we're referring to random variables versus their realizations or specific values.

🤖 Generated with Claude Code

jstac and others added 2 commits November 14, 2025 15:09
… I-V

Updated notation in Job Search lectures I-V to use uppercase letters for
random variables and lowercase for realizations:

- Job Search I (mccall_model.md): w_t → W_t in wage offer sequences
- Job Search II (mccall_model_with_separation.md): w_t → W_t for wage offers
- Job Search III (mccall_model_with_sep_markov.md): (s_t, w_t) → (S_t, W_t)
  for state variables
- Job Search IV (mccall_fitted_vfi.md): Already using correct notation
- Job Search V (mccall_persist_trans.md): w_t → W_t, z_t → Z_t, y_t → Y_t
  for wage components

Lowercase notation remains for realizations in sums (e.g., sum_w v(w) q(w))
and for standard normal shocks (zeta_t, epsilon_t).

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

Co-Authored-By: Claude <noreply@anthropic.com>
…t compensation

Changed utility function parameter from 'c' to 'x' to distinguish between:
- The consumption argument of the utility function u(x)
- The unemployment compensation parameter c

This prevents confusion when we write expressions like u(c), where c is
the specific value of unemployment compensation being passed to the
utility function.

Updated in:
- Job Search II: def u(c, γ) → def u(x, γ)
- Job Search III: def u(c, γ) → def u(x, γ)
- Job Search IV: def u(c, γ) → def u(x, γ)
- Job Search V: u(c) = ln(c) → u(x) = ln(x)

🤖 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-704--sunny-cactus-210e3e.netlify.app (bfbda4e)

📚 Changed Lecture Pages: mccall_model, mccall_model_with_sep_markov, mccall_model_with_separation, mccall_persist_trans

@github-actions
Copy link

…nal analysis

Major improvements to Job Search IV (Fitted Value Function Iteration):

1. Notation and clarity:
   - Changed utility function from u(c, γ) to u(x, γ) to avoid confusion with
     unemployment compensation parameter c
   - Fixed random variable notation: w → W_t in model description
   - Changed z_i → Z_i in Monte Carlo formula
   - Updated Model constructor from named to positional arguments
   - Renamed variables in T and get_greedy: accept → v_e, reject → continuation_values
   - Standardized naming: h_star → h, w_star → w_bar

2. Added explanations:
   - Explained the explicit form of (Pv_u)(w) with derivation
   - Changed "From the equation above" to "Recall that we have"
   - Added explanation before Bellman operator about Monte Carlo integration

3. Updated plot styling:
   - Simplified plot to match Job Search III style
   - Show only continuation value h and employment value v_e
   - Updated labels and explanation text

4. Added Simulation section:
   - Implemented update_agent function with job separation logic
   - Added simulate_employment_path function
   - Created three-panel plot showing employment status, wage path, and
     cumulative unemployment rate
   - Properly handles Markov wage dynamics with separation

5. Added Cross-Sectional Analysis subsection:
   - Vectorized update function for parallel agent simulation
   - JIT-compiled simulation using lax.fori_loop
   - Cross-sectional unemployment histogram
   - Comparison of time-average vs cross-sectional unemployment rates

6. Added missing import: from functools import partial

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

Co-Authored-By: Claude <noreply@anthropic.com>
@jstac
Copy link
Contributor Author

jstac commented Nov 14, 2025

Summary of Changes

This PR improves notation consistency and adds substantial enhancements to the Job Search lecture series (I-V).

1. Standardized Random Variable Notation (All Lectures)

Changed random variables to uppercase, realizations to lowercase:

  • Job Search I: w_tW_t for wage offer sequences
  • Job Search II: w_tW_t for wage offers
  • Job Search III: (s_t, w_t)(S_t, W_t) for state variables
  • Job Search IV: wW_t in model description, z_iZ_i in Monte Carlo formula
  • Job Search V: w_tW_t, z_tZ_t, y_tY_t for wage components

Lowercase remains for:

  • Realizations in sums (e.g., sum_w v(w) q(w))
  • Standard normal shocks (e.g., ζ_t, ε_t)

2. Clarified Utility Function Notation (Lectures II-V)

Changed utility function parameter from c to x to distinguish:

  • The consumption argument of utility function u(x)
  • The unemployment compensation parameter c

Updated:

  • Job Search II: def u(c, γ)def u(x, γ)
  • Job Search III: def u(c, γ)def u(x, γ)
  • Job Search IV: def u(c, γ)def u(x, γ)
  • Job Search V: u(c) = ln(c)u(x) = ln(x)

3. Major Enhancements to Job Search IV

Improved clarity and explanations:

  • Added detailed explanation of the Monte Carlo integral formula for (Pv_u)(w)
  • Explained the derivation from W_t = exp(X_t) to w^ρ exp(ν Z_{t+1})
  • Changed "From the equation above" → "Recall that we have"
  • Added description before Bellman operator about using Monte Carlo integration

Code improvements:

  • Renamed variables for clarity: acceptv_e, rejectcontinuation_values
  • Changed Model constructor from named to positional arguments
  • Standardized naming: h_starh, w_starw_bar
  • Added missing import: from functools import partial

Updated visualizations:

  • Simplified main plot to match Job Search III style
  • Show only continuation value h and employment value v_e
  • Added explanation about reservation wage intersection

Added complete Simulation section:

  • Implemented update_agent function with proper job separation logic
  • Added simulate_employment_path for single agent simulation
  • Created three-panel plot showing:
    • Employment status over time
    • Wage path with reservation wage
    • Cumulative unemployment rate
  • Properly handles Markov wage dynamics with separation rate α

Added Cross-Sectional Analysis subsection:

  • Vectorized update_agent using jax.vmap for parallel simulation
  • JIT-compiled _simulate_cross_section_compiled using lax.fori_loop
  • simulate_cross_section function for many-agent simulation
  • plot_cross_sectional_unemployment for histogram visualization
  • Comparison of time-average vs cross-sectional unemployment rates

Verification:

  • Converted to Python and ran successfully
  • Unemployment rates now realistic (~23-29%) showing proper cycling between employment and unemployment

All changes maintain consistency with the lecture series style and improve mathematical clarity throughout.

@github-actions
Copy link

@jstac
Copy link
Contributor Author

jstac commented Nov 14, 2025

Touching many lectures and looks good so i'll merge.

@jstac jstac merged commit ece13f0 into main Nov 14, 2025
1 check passed
@jstac jstac deleted the fix-job-search-notation branch November 14, 2025 07:08
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