Week 10 Homework Feedback: Felice Urciuoli

Overall Assessment

Grade: ✅ (Pass)

Correct submission. You implemented the EGM method (using a hybrid approach with fzero for the resource constraint inversion) and successfully solved both tasks.

Task-by-Task Check

Task 1: Quantifying Precautionary Savings

  1. Parameter & Grid Setup: ✅ Correct.
  2. Solution Method: ✅ EGM implemented correctly (using fzero).
  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: ✅ Correct.

Technical Implementation

  • EGM Logic: Your implementation of EGM is correct. You calculate the expected RHS from the Euler equation and then invert it to find consumption and endogenous capital.
  • Hybrid Approach: Using fzero to find k_endo (line 153 in solve_model_egm) is a robust way to invert the resource constraint $k_{endo}^\alpha + (1-\delta)k_{endo} = TotalAssets$, although slightly slower than pure interpolation.
  • Code Structure: The code is well-organized with separate functions.

Visual Output

  • Plots are clear and correctly labeled.

Suggestions for Improvement

  1. Efficiency: While fzero works well, you can speed up the EGM step by computing the total resources vector for the whole grid at once and using interp1 to map total assets back to capital, avoiding the loop and root-finding.

Summary

11/11 tasks correct. Correct work.