Week 8 Homework Feedback: Ignazio Nunzi
Week 8 Homework Feedback: Ignazio Nunzi
Assignment: Dynamic Programming & Value Function Iteration with Population Growth
Week: 8
Date: Week 8 Assessment
⚠️ Overall Assessment
Result: ⚠️ Partial <50% Correct
This submission demonstrates good understanding of Value Function Iteration methodology with proper VFI implementation, convergence tracking, policy function extraction, and simulation. The code structure is clean and well-organized. However, there is a critical error: the consumption matrix is missing the (1+n) factor required for population growth. Line 12 computes cons = f + (1-delta)*kgrid - kgrid', which is the formula for the model without population growth (n=0). Additionally, no population growth parameter (n) is defined anywhere in the code. As a result, the entire VFI computation, policy functions, and simulations are for the wrong model (n=0 instead of n>0). Despite this critical error, the submission shows solid technical competence in VFI implementation and proper visualization. 6/15 tasks correct for the right model (40% < 50% but > 0%).
Task-by-Task Check
❌ Task 1: Correct Consumption Matrix with (1+n) Factor
Status: ❌ CRITICAL ERROR
- Line 12:
cons = f + (1-delta)*kgrid - kgrid'; - WRONG: This is the formula for n=0 (no population growth)
- CORRECT: Should be
cons = f + (1-delta)*kgrid - (1+n)*kgrid'; - Missing: No population growth parameter
nis defined in the code - This error affects all subsequent computations
✅ Task 2: Value Function Iteration Implementation
Status: ✅ Correct Algorithm (Wrong Model)
- Lines 19-37: Proper VFI loop with convergence tracking
- Correct maximization:
max(util(i,:) + beta * V') - Proper convergence criterion:
diff > 1e-6 - BUT: Solving the wrong model (n=0 instead of n>0)
✅ Task 3: Convergence History Storage
Status: ✅ Correct
- Line 22: Initializes
Vstore = [] - Line 36: Stores V each iteration:
Vstore(:, iter) = V - Well-implemented convergence tracking
✅ Task 4: Policy Function Extraction
Status: ✅ Correct (Wrong Model)
- Line 30: Extracts policy indices during VFI:
[Vnew(i), pol_ind(i)] = max(...) - Line 42: Maps to policy function:
k_policy = kgrid(pol_ind) - BUT: Policy function is for n=0 model, not n>0
✅ Task 5: Policy Function Plot with 45° Line
Status: ✅ Correct Visualization (Wrong Model)
- Lines 50-54: Policy function plot with 45° line
- Proper formatting, labels, and legend
- Saved to Figures/ directory
- BUT: Shows policy for n=0 model, not n>0
✅ Task 6: Capital Path Simulation
Status: ✅ Correct Algorithm (Wrong Model)
- Lines 66-72: Simulates capital path using policy function
- Uses interpolation correctly:
interp1(kgrid, k_policy, kpath(t)) - BUT: Uses policy function from n=0 model
❌ Task 7: Consumption Path Simulation
Status: ❌ Missing
- No consumption path is computed or plotted
- Only capital path is simulated
✅ Task 8: Capital Path Plot
Status: ✅ Correct (Wrong Model)
- Lines 74-78: Plots capital path
- Proper labels and formatting
- Saved to Figures/ directory
- BUT: Path is for n=0 model
❌ Task 9: Consumption Path Plot
Status: ❌ Missing
- No consumption path plot
❌ Task 10: Parameter Experiments
Status: ❌ Missing
- No parameter experiments
- Uses fixed parameters throughout
❌ Task 11: Policy Functions for Different Calibrations
Status: ❌ Missing
- Only one policy function plotted
- No parameter experiments
❌ Task 12: Capital Paths for Different Calibrations
Status: ❌ Missing
- Only one capital path plotted
- No parameter experiments
✅ Task 13: Value Function Convergence Plot
Status: ✅ Correct
- Lines 58-63: Convergence plot showing V_history
- Proper formatting and saved to Figures/ directory
- Well-implemented visualization
✅ Task 14: Figure Saving to Figures/ Directory
Status: ✅ Correct
- Lines 56, 63: All figures saved using
exportgraphicswith proper paths - High-resolution output (300 DPI)
- Professional figure management
⚠️ Task 15: Interpretation Comments
Status: ⚠️ Partial
- Lines 80-87: Brief interpretation of beta effects
- Good economic intuition about patience and savings
- Missing: Discussion of population growth effects (because n is not implemented)
- Missing: Discussion of other parameter effects
Task Summary: 6/15 tasks fully correct for the right model (40% < 50% but > 0%)
Grade: ⚠️ (6/15 = 40% < 50% correct for the right model, but > 0%)
Technical Implementation
Critical Error:
-
Missing (1+n) Factor: The consumption matrix does not include the (1+n) factor required for population growth. This is the most critical requirement of the homework. The entire submission solves the n=0 model instead of the n>0 model.
-
Missing Population Growth Parameter: No variable
nis defined anywhere in the code. The homework requires n>0 (typically n=0.01 or n=0.02).
Strengths:
- Good VFI Implementation: Proper algorithm with convergence tracking
- Clean Code Structure: Well-organized and readable
- Proper Visualization: Good convergence plot and policy function plot
- Correct Simulation: Capital path simulation is properly implemented
Issues:
- Wrong Economic Model: Entire submission is for n=0 model, not n>0 as required
- Missing Consumption Path: No consumption simulation or plot
- Missing Parameter Experiments: No experiments with different parameters
- Limited Interpretation: Only brief comments on beta effects
Style & Clarity
Strengths:
- Clean Code: Well-organized with clear sections
- Good Comments: Helpful comments explaining key steps
- Proper Formatting: Clean, readable code
Areas for Improvement:
- Missing Population Growth: Need to define n and include (1+n) factor
- Add Consumption Path: Should simulate and plot consumption
- Add Parameter Experiments: Should test different parameter values
- Expand Interpretation: More detailed economic discussion
Visual Output Assessment
Strengths:
- Good Convergence Plot: Clear visualization of VFI convergence
- Proper Policy Function Plot: Includes 45° line for steady-state visualization
- Professional Quality: High-resolution figures with proper formatting
Missing:
- Consumption Path Plot: Not included
- Parameter Experiment Plots: Not included
- Value Function Plot: Not included (only convergence plot)
Suggestions for Improvement
- Fix Consumption Matrix (CRITICAL): Add population growth parameter and correct the consumption matrix:
n = 0.01; % Population growth rate % Line 12 should be: cons = f + (1-delta)*kgrid - (1+n)*kgrid'; % CORRECT formula - Add Consumption Path: Simulate and plot consumption:
cpath = zeros(T,1); for t = 1:T-1 cpath(t) = kpath(t)^alpha + (1-delta)*kpath(t) - (1+n)*kpath(t+1); end % Plot consumption path -
Add Parameter Experiments: Test different β, α, or n values to show how they affect optimal savings behavior
-
Add Value Function Plot: Include a plot of the final value function V(k)
- Expand Interpretation: Add more detailed discussion of:
- How population growth affects steady state
- Comparison of policy functions for different parameters
- Economic intuition behind the results
Summary
Ignazio’s submission demonstrates good technical competence in VFI implementation. The code structure is clean, the VFI algorithm is correct, convergence tracking is well-implemented, and visualization is professional. However, there is a critical error: the consumption matrix is missing the (1+n) factor required for population growth, and no population growth parameter (n) is defined. As a result, the entire submission solves the n=0 model instead of the n>0 model as required. Additionally, the submission is missing consumption path simulation, parameter experiments, and comprehensive interpretation. 6/15 tasks fully correct for the right model (40% < 50% but > 0%). The submission shows solid understanding of VFI methodology and would be significantly improved once the (1+n) factor is added and the missing components are included.