Week 10 Homework Feedback: Felice Urciuoli
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
- Parameter & Grid Setup: ✅ Correct.
- Solution Method: ✅ EGM implemented correctly (using
fzero). - 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 correctly.
- Simulation Comparison: ✅ Calculated.
- 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
fzeroto findk_endo(line 153 insolve_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
- Efficiency: While
fzeroworks well, you can speed up the EGM step by computing the total resources vector for the whole grid at once and usinginterp1to map total assets back to capital, avoiding the loop and root-finding.
Summary
11/11 tasks correct. Correct work.