Commit 75157a1
Add transient income innovation to IFP model and wealth inequality analysis
This commit modifies the income fluctuation problem (IFP) model to include
a transient IID income shock, following the specification in ifp_advanced.
Changes to ifp_egm.md:
1. Income process modification:
- Changed from Y_t = exp(Z_t) to Y_t = exp(a_y * η_t + Z_t * b_y)
- Added IID shock η_t ~ N(0,1) to create transient income fluctuations
- Updated Euler equation to integrate over η shocks using Monte Carlo
- Kept interest rate R constant throughout (as specified)
2. Implementation updates:
- Added parameters a_y=0.2, b_y=0.5, shock_draw_size=100
- Updated NumPy implementation with numba.jit optimization
- Updated JAX implementation with separate utility functions
- Modified simulation code to draw η shocks during dynamics
- Updated all code cells to unpack new IFP parameters
3. New wealth inequality analysis section:
- Added Gini coefficient computation
- Added top 1% wealth share computation
- Analyzed how inequality varies with interest rate r
- Tested 12 interest rate values from 0 to 0.015
- Generated plots showing Gini and top 1% vs interest rate
4. Performance optimization:
- Added @numba.jit decorators to u_prime, u_prime_inv, Y, and K_numpy
- Created separate JAX versions to avoid numba/JAX conflicts
Changes to ifp_advanced.md:
- Updated shock_draw_size from 50 to 100 in both Numba and JAX implementations
The modifications maintain consistency with ifp_advanced while keeping R
constant in ifp_egm. The transient income shock creates more realistic
wealth inequality through increased precautionary savings.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent a0b5dfc commit 75157a1
2 files changed
+276
-75
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
| 379 | + | |
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| |||
665 | 665 | | |
666 | 666 | | |
667 | 667 | | |
668 | | - | |
| 668 | + | |
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
| |||
0 commit comments