Skip to content

Releases: QuantEcon/lecture-python.myst

publish-2025nov17b

17 Nov 10:14
c6cc43c

Choose a tag to compare

What's Changed

  • Improve key handling and fix parameter consistency in McCall lectures by @jstac in #715

Full Changelog: publish-2025nov17...publish-2025nov17b

publish 2025 nov 17

16 Nov 21:56
977a93e

Choose a tag to compare

publish-2025nov17

Add visualization and convergence demonstration to fitted VFI lecture…

publish 2025 nov 16

16 Nov 12:08
b37d0ca

Choose a tag to compare

Extension to basic McCall model -- response to volatility (#707) (#709)

* Add continuous distribution and volatility analysis to McCall model (#707)

This commit addresses issue #707 by extending the basic McCall model:

- Add "Continuous Offer Distribution" section
  - Move continuous wage distribution from exercises to main content
  - Implement lognormal wage distribution with Monte Carlo integration
  - Show how reservation wage varies with c and β using contour plots

- Add "Volatility" section
  - Demonstrate that reservation wage increases with volatility
  - Use mean-preserving spread with lognormal distribution
  - Illustrate how workers prefer more volatile distributions

- Update exercise mm_ex1 solution
  - Change from discrete to continuous distribution
  - Use JAX implementation with continuous wage draws

- Remove exercise mm_ex2 (now covered in main text)

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

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

* misc

* misc

* Add lifetime value analysis for volatility in McCall model

- Add new section showing expected lifetime value increases with volatility
- Implement parallel JAX code for simulating job search with optimal policy
- Use jax.vmap to vectorize 10,000 simulation replications
- Compute reservation wage and lifetime value across volatility levels
- Plot demonstrates option value of search under uncertainty
- Fix LaTeX escape sequence warnings in xlabel (use raw strings)

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

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

* Simplify lifetime value simulation to fixed 100 periods

- Replace while_loop with fixed-period simulation (100 periods)
- Draw all wage offers upfront using vectorized operations
- Use cumsum to track employment status from first acceptance
- Simpler logic that's easier to parallelize (same path length)
- Cleaner code without nested loop functions
- Update description to reflect simplified approach

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

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

* misc

* misc

---------

Co-authored-by: Claude <noreply@anthropic.com>

publish-2025nov14b

14 Nov 06:04
f572fcf

Choose a tag to compare

What's Changed

  • Small updates to mccall_model_with_sep_markov by @jstac in #703
  • Upgrade sphinx-tojupyter to 0.4.0 by @mmcky in #702

Full Changelog: publish-2025nov14...publish-2025nov14b

publish 2025 nov 14

13 Nov 23:14
83b7d39

Choose a tag to compare

publish-2025nov14

misc (#699)

publish-2025nov13b

13 Nov 09:33
78561ef

Choose a tag to compare

What's Changed

  • Enhance McCall separation model: Add full solution before simplification by @jstac in #697

Full Changelog: publish-2025nov13...publish-2025nov13b

publish 2025 nov 13

12 Nov 23:11
516568e

Choose a tag to compare

Remove searchsorted from mccall with sep (#696)

* misc

* misc

publish-2025nov12

12 Nov 11:38
374bf14

Choose a tag to compare

What's Changed

  • Update runs-on.yml with new AMI for CUDA 13.0 support by @mmcky in #693
  • Remove PyTorch and Pyro-PPL from workflows by @mmcky in #689
  • Update Job Search III: Add utility function to mathematical formulation by @jstac in #690
  • Refactor McCall lecture: Emphasize persistent and transitory wage shocks by @jstac in #691

Full Changelog: publish-2025nov11...publish-2025nov12

publish 2025 nov 11

11 Nov 08:09
0d564d4

Choose a tag to compare

Fix JAX compatibility issues in Job Search III lecture (#687)

* Fix JAX compatibility issues in Job Search III lecture

Updated mccall_model_with_sep_markov.md to fix several JAX-related issues:

- Refactored vfi() to return only v_final instead of tuple, making it more consistent with VFI pattern
- Removed separate successive_approx() function and integrated iteration logic directly into vfi()
- Fixed JAX decorators: changed @jit to @jax.jit and @partial(jit, ...) to @partial(jax.jit, ...)
- Rewrote get_reservation_wage() to use jnp.argmax() instead of jnp.where() to avoid JAX concretization errors in JIT compilation
- Updated all vfi() call sites to explicitly compute policy with get_greedy(v_star, model)
- Removed @jit decorators from T() and get_greedy() functions (not needed)

Also improved wording in mccall_model_with_separation.md for clarity.

Tested: Converted to Python and ran successfully without errors.

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

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

* Standardize continuation value notation in Job Search II lecture

Updated the McCall model with separation to use h = u(c) + β * sum_w v_u(w) q(w)
as the continuation value, matching the notation from the basic McCall model lecture.

This makes the progression between lectures more intuitive for readers:
- Basic model: h = c + β * sum_w v*(w) q(w)
- Separation model: h = u(c) + β * sum_w v_u(w) q(w)

Key changes:
- Replaced scalar d with h throughout mathematical derivations
- Updated closed-form expression for v_e(w) to use h
- Modified iteration algorithm to solve for h instead of d
- Simplified Bellman equations using h notation
- Updated all code functions (compute_v_e, update_h, solve_model)
- Changed plots and comments to reference h

This improves consistency across the job search lecture series and makes
the mathematical structure clearer by explicitly showing the continuation
value includes both current utility and discounted future value.

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

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

* Remove JAX from pip install in Job Search II lecture

The JAX library is already included in the base environment and doesn't need
to be explicitly installed, which was causing build failures.

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

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

* Remove JAX from pip install in Job Search III lecture

The JAX library is already included in the base environment and doesn't need
to be explicitly installed, which was causing build failures.

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

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

* Update PyTorch installation to use cu121

* Update CI workflow to install only PyTorch packages

Removed 'torchaudio' from the installation command for PyTorch.

* fix: JAX version pinning

* install new CUDANN binaries

* remove pytorch

* misc

* Update mccall_model_with_separation: Change utility parameter from sigma to gamma and use glue for figures

Updated the McCall model with separation lecture with the following changes:

Key changes:
- Changed utility function parameter from σ (sigma) to γ (gamma)
- Moved γ default value from utility function to Model class (γ: float = 2.0)
- Updated all functions (compute_v_e, update_h, solve_model) to pass γ parameter
- Simplified model unpacking to use tuple unpacking directly (e.g., α, β, γ, c, w, q = model)
- Replaced static PNG figures with myst-nb glue functionality
- Added glue import and glue() calls in exercise solutions
- Converted {figure} directives to {glue:figure} directives for dynamic figure generation

Benefits:
- More consistent parameter naming (gamma is standard for CRRA utility)
- Better code organization with parameter defaults in Model class
- Cleaner unpacking syntax
- Dynamic figure generation eliminates need for static PNG files
- Figures automatically stay in sync with code

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

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

* Remove redundant PNG files for mccall_model_with_separation

Removed static PNG files that are now dynamically generated using myst-nb glue:
- mccall_resw_alpha.png
- mccall_resw_beta.png
- mccall_resw_c.png

These figures are now generated from the exercise solution code and displayed via glue:figure directives, eliminating the need for static files and ensuring figures always match the code.

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

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

* misc

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: mmcky <mamckay@gmail.com>

Publish 2025 Nov 9

08 Nov 21:11
22983b3

Choose a tag to compare

[mcall_correlated] Convert to JAX and content checks (#616)

* convert to JAX and make title style sheet compliant

* minor variable name update

* minor updates

* minor update

* update jax install

* Remove @jax.jit from Q operator for better performance

Removed @jax.jit decorator from the Q operator function since it's called
within the already-jitted compute_fixed_point function. JAX documentation
recommends avoiding nested jit decorators as they create compilation
boundaries that prevent XLA from optimizing the full computation graph.

Performance testing showed ~10% improvement by letting the outer jit
compile the entire computation including Q.

Also cleaned up formatting:
- Renamed 'state' to 'loop_state' for clarity in while_loop functions
- Improved function signature formatting
- Standardized code style

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

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

---------

Co-authored-by: John Stachurski <john.stachurski@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>