QuantEcon · GitHub

Commit 57b1b34

jstacclaude

and

authored

Fix stochastic returns simulation and improve wealth inequality analysis (#748)

- Fix simulation code to properly handle stochastic returns R_t = R(Z_t, ζ_t) - Add ζ shock draws in simulate_household function - Correct NamedTuple unpacking throughout simulation code - Increase grid_max to 100 for better coverage of wealth distribution - Calibrate return volatility (a_r=0.16) to match empirical inequality - Increase simulation to 200,000 households for better tail estimates - Replace Lorenz curve with histogram using log y-axis for clearer visualization - Add exercise exploring relationship between return volatility and inequality - Include solution showing nonlinear Gini-volatility relationship - Fix code cell language consistency (ipython3) for Jupyter Book compatibility Results: Gini coefficient of 0.787 (close to empirical ~0.8) 🤖 Generated with Claude Code Co-authored-by: Claude <noreply@anthropic.com>

1 file changed

Lines changed: 288 additions & 479 deletions

Read the original on github.com ↗