Week 10 Homework Feedback: Sebastiano Bacchi
Week 10 Homework Feedback: Sebastiano Bacchi
Overall Assessment
Grade: ✅ (Pass)
Correct submission. You implemented the EGM method correctly using a hybrid approach (using fzero) and successfully completed both tasks.
Task-by-Task Check
Task 1: Quantifying Precautionary Savings
- Parameter & Grid Setup: ✅ Correct.
- Solution Method: ✅ EGM implemented correctly.
- Deterministic Case: ✅ Solved.
- Stochastic Case: ✅ Solved.
- Simulation: ✅ Simulation logic is correct.
- Comparison: ✅ Premium calculated.
Task 2: The Role of Risk Aversion
- Sigma Variation: ✅ Implemented.
- Solving Sigma Cases: ✅ Solved.
- Policy Plot: ✅ Plotted.
- Simulation Comparison: ✅ Calculated.
- Interpretation: ✅ Correct.
Technical Implementation
- EGM Logic: Correct. You compute the expected RHS and invert the Euler equation.
- Hybrid Approach: Using
fzeroinside the loop (line 120) to findk_endois valid and robust, though it makes the code slower than pure interpolation. - Simulation: You correctly discard burn-in periods.
Visual Output
- Figures are generated and saved.
Suggestions for Improvement
- Efficiency: The
fzeroloop is the main bottleneck. You could replace it by calculatingTotalAssetsfor the whole grid and then interpolatingResource(k)to map back toK_grid.
Summary
11/11 tasks correct. Correct work.