Week 10 Homework Feedback: Alessandra Nishaj

Overall Assessment

Grade: ✅ (Pass)

Correct submission. You implemented the EGM method correctly and provided a very thorough analysis with excellent figures and a detailed economic interpretation.

Task-by-Task Check

Task 1: Quantifying Precautionary Savings

  1. Parameter & Grid Setup: ✅ Correct.
  2. Solution Method: ✅ EGM implemented correctly.
  3. Deterministic Case: ✅ Solved.
  4. Stochastic Case: ✅ Solved.
  5. Simulation: ✅ Simulation logic is correct.
  6. Comparison: ✅ Premium calculated.

Task 2: The Role of Risk Aversion

  1. Sigma Variation: ✅ Implemented.
  2. Solving Sigma Cases: ✅ Solved.
  3. Policy Plot: ✅ Plotted correctly.
  4. Simulation Comparison: ✅ Calculated.
  5. Interpretation: ✅ Very good discussion on the mechanism (marginal utility curvature and Jensen’s inequality).

Technical Implementation

  • EGM Logic: Your solve_egm function correctly implements EGM.
  • Hybrid Approach: You used fzero for the resource constraint inversion (lines 301-302) with a fallback to interpolation (interp1) if it fails or for monotonicity. This is a robust way to handle the step.
  • Code Structure: The code is clean and modular.

Visual Output

  • Figures are comprehensive (both policy functions and simulated paths) and well-labeled.

Suggestions for Improvement

  1. Efficiency: As with other submissions, the loop over Nk with interp1 or fzero to find k_endo can be optimized by vectorizing the operation (computing the resource vector for the whole grid and interpolating once).

Summary

11/11 tasks correct. Correct work.