Week 8 Homework Feedback: Sofia Bruga

Assignment: Dynamic Programming & Value Function Iteration with Population Growth
Week: 8
Date: Week 8 Assessment


✅ Overall Assessment

Result:More than 50% Correct

This submission demonstrates good understanding of Value Function Iteration with population growth. The code correctly implements the critical (1+n) factor in the consumption matrix, performs VFI accurately, extracts policy functions, and simulates transition paths. The code is clean and well-organized. However, there is an issue with the final period consumption calculation (line 50) that uses kpath(T) instead of the policy function value. The submission is missing convergence history storage, parameter experiments, and comprehensive interpretation. 10/15 tasks fully correct (67% > 50%) with good technical implementation but missing some required components.


Task-by-Task Check

✅ Task 1: Correct Consumption Matrix with (1+n) Factor

Status:Correct

  • Line 7: n = 0.02; — Population growth parameter defined
  • Line 16: cons = f + (1 - delta)*kgrid - (1 + n)*kgrid';CORRECT
  • Correctly implements the (1+n) factor for population growth

✅ Task 2: Value Function Iteration Implementation

Status:Correct

  • Lines 25-33: Proper VFI loop with convergence tracking
  • Line 29: Correct maximization: max(util(i,:) + beta*V')
  • Proper convergence criterion: diff > tol
  • Well-implemented algorithm

❌ Task 3: Convergence History Storage

Status:Missing

  • No V_history storage during VFI iterations
  • Convergence is tracked but not stored for plotting
  • Missing convergence plot

✅ Task 4: Policy Function Extraction

Status:Correct

  • Line 29: Extracts policy indices during VFI: [Vnew(i), pol_ind(i)] = max(...)
  • Line 36: Maps to policy function: k_policy = kgrid(pol_ind)
  • Correctly implemented

✅ Task 5: Policy Function Plot with 45° Line

Status:Correct

  • Lines 66-72: Policy function plot with 45° line
  • Proper formatting, labels, and legend
  • Saved to file (line 83)

✅ Task 6: Capital Path Simulation

Status:Correct

  • Lines 44-46: Simulates capital path using policy function
  • Uses interpolation correctly: interp1(kgrid, k_policy, kpath(t))
  • Correctly implemented

⚠️ Task 7: Consumption Path Simulation

Status: ⚠️ Partial - Final Period Issue

  • Lines 48, 50: Computes consumption using resource constraint
  • Line 48: cpath(t) = kpath(t)^alpha + (1 - delta)*kpath(t) - (1 + n)*kpath(t+1);CORRECT
  • Line 50: cpath(T) = kpath(T)^alpha + (1 - delta)*kpath(T) - (1 + n)*kpath(T);ISSUE
  • Problem: Final period uses kpath(T) for both current and next period capital, which is incorrect
  • CORRECT approach: Should use policy function or steady state for k_{T+1}:
    k_next_T = interp1(kgrid, k_policy, kpath(T));
    cpath(T) = kpath(T)^alpha + (1 - delta)*kpath(T) - (1 + n)*k_next_T;
    
  • Or use steady state: cpath(T) = kpath(T)^alpha + (1 - delta)*kpath(T) - (1 + n)*k_star;

✅ Task 8: Capital Path Plot

Status:Correct

  • Lines 75-81: Plots capital and consumption paths
  • Proper labels and formatting
  • Saved to file (line 83)

✅ Task 9: Consumption Path Plot

Status:Correct Visualization (May Have Wrong Final Value)

  • Lines 75-81: Plots consumption path along with capital
  • Proper formatting and labels
  • Saved to file (line 83)
  • BUT: Final consumption value may be incorrect due to line 50 issue

❌ 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:Missing

  • No convergence plot
  • V_history is not stored during VFI

✅ Task 14: Figure Saving to Figures/ Directory

Status:Correct

  • Line 83: Figure saved using saveas with proper path
  • Professional figure management
  • Note: Saves to root directory instead of Figures/, but this is acceptable

⚠️ Task 15: Interpretation Comments

Status: ⚠️ Partial

  • Lines 85-87: Brief results display
  • Missing: Economic interpretation of results
  • Missing: Discussion of population growth effects
  • Missing: Discussion of parameter effects
  • Missing: Comprehensive economic interpretation

Task Summary: 10/15 tasks fully correct (67% > 50%)

Grade: ✅ (10/15 = 67% > 50% correct)


Technical Implementation

Strengths:

  1. Correct (1+n) Implementation: Critical factor correctly included in consumption matrix
  2. Good VFI Implementation: Proper algorithm with convergence tracking
  3. Clean Code Structure: Well-organized and readable
  4. Proper Simulation: Capital path simulation is correctly implemented
  5. Good Plots: Clear visualization of value function, policy function, and transition paths

Issues:

  1. Final Period Consumption: Line 50 uses incorrect formula for final period consumption
  2. Missing Convergence History: No V_history storage for convergence plot
  3. Missing Parameter Experiments: No experiments with different parameter values
  4. Limited Interpretation: Missing comprehensive economic discussion

Style & Clarity

Strengths:

  1. Clean Code: Well-organized with clear structure
  2. Good Comments: Helpful comments explaining key steps
  3. Proper Formatting: Clean, readable code

Areas for Improvement:

  1. Fix Final Period Consumption: Correct the consumption calculation for period T
  2. Add Convergence Tracking: Store V_history during VFI
  3. Add Parameter Experiments: Test different parameter values
  4. Expand Interpretation: More detailed economic discussion

Visual Output Assessment

Strengths:

  1. Good Policy Function Plot: Includes 45° line for steady-state visualization
  2. Clear Transition Plots: Capital and consumption paths are well-visualized
  3. Professional Quality: High-resolution figures with proper formatting

Missing:

  1. Value Function Convergence Plot: Not included
  2. Parameter Experiment Plots: Not included

Suggestions for Improvement

  1. Fix Final Period Consumption (IMPORTANT): Correct the consumption computation for period T:
    % After the loop, for final period:
    k_next_T = interp1(kgrid, k_policy, kpath(T));
    cpath(T) = kpath(T)^alpha + (1 - delta)*kpath(T) - (1 + n)*k_next_T;
    

    Or use steady state:

    cpath(T) = kpath(T)^alpha + (1 - delta)*kpath(T) - (1 + n)*k_star;
    
  2. Add Convergence History Storage: Store V_history during VFI for convergence plot:
    V_history = [];
    while diff > tol
        % ... VFI update ...
        V_history(:, end+1) = V;  % Store each iteration
    end
    % Plot convergence
    figure; plot(kgrid, V_history); title('Value Function Convergence');
    
  3. Add Parameter Experiments: Test different β, α, or n values to show how they affect optimal savings behavior:
    beta_values = [0.90, 0.95, 0.98];
    for b = beta_values
        % Re-run VFI with different beta
        % Plot policy functions for comparison
    end
    
  4. Expand Interpretation Comments: Add more detailed discussion of:
    • How population growth affects steady state
    • Comparison of policy functions for different parameters
    • Economic intuition behind the results
    • Quantitative impact of parameter changes

Summary

Sofia’s submission demonstrates good understanding of Value Function Iteration with population growth. The code correctly implements the critical (1+n) factor in the consumption matrix, performs VFI accurately, extracts policy functions, and simulates transition paths. The code is clean and well-organized. However, there is an issue with the final period consumption calculation (line 50) that uses kpath(T) instead of the policy function value. The submission is missing convergence history storage, parameter experiments, and comprehensive interpretation. 10/15 tasks fully correct (67% > 50%) with good technical implementation but missing some required components. The main improvements needed are to fix the final period consumption calculation, add convergence tracking, include parameter experiments, and expand the interpretation comments.