🌍 Week 5 Homework — Feedback

Student: Jiaxin Li
Assignment: Solving Nonlinear Equations in Economics


✅ Overall Assessment

Result: ⚠️ Partial <50% Correct

Submission does not implement the required exercises correctly. Exercise 1 implements a different IS-LM model (different functional forms from the required assignment). Exercise 2 implements the labor supply problem but does not loop over sigma values as required - only solves for fixed sigma=2. Exercise 3 is completely missing - there is no comparison of bisection vs damped Newton convergence speed. Additionally, the code does not run due to the hyphen in the filename (week5-solution.m - you noted this issue), and when run with corrected filename, the results “look very wrong”.


🔍 Task-by-Task Check

Task Description Status Notes
1.1 Parameter setup for IS-LM Uses DIFFERENT parameters and model formulation (not the required model)
1.2 IS-LM system definition Wrong model: Uses different IS-LM formulation than required
1.3 Solve from two initial guesses ⚠️ Uses bisection and Newton but for wrong model, doesn’t use fsolve with two guesses
1.4 Plot IS and LM curves ⚠️ Plots bisection/Newton convergence paths, not IS-LM curves
1.5 Verify positive interest rate No explicit verification, and wrong model
2.1 Parameter setup for labor supply All parameters correctly defined
2.2 Define Z(h) function Correct formulation
2.3 Loop over sigma values Critical Error: Does NOT loop over sigma ∈ {1,2,3,4,5} - only fixes sigma=2
2.4 Solve using Bisection method Bisection correctly implemented with proper endpoint updates
2.5 Plot h*(sigma) and interpret Plots h* vs tau (tax rate) instead of h* vs sigma (risk aversion)
3.1 Implement Bisection method Exercise 3 is completely missing
3.2 Implement Damped Newton method Exercise 3 is completely missing
3.3 Test from multiple starting guesses Exercise 3 is completely missing
3.4 Record iterations and residuals Exercise 3 is completely missing
3.5 Compare and discuss convergence Exercise 3 is completely missing

📈 Technical Implementation

  • IS-LM System: ❌ Wrong model - uses different functional forms than required
  • Labor Supply Function: Correct mathematical formulation
  • Bisection Method: ✅ Correctly implemented with proper endpoint updates (fa=fm, fb=fm on line 89)
  • Damped Newton: Correct implementation but used on wrong problem
  • Error Handling: Includes sign change verification
  • Figure Management: ✅ Saves figures to Figures folder
  • Critical Issues: Wrong IS-LM model, doesn’t loop over sigma, missing Exercise 3, code doesn’t run due to filename

💬 Style & Clarity

  • Code Quality: Well-structured code with local functions
  • Variable Naming: Clear names (Yo_bis, H_tau, path_bis)
  • Comments: Good documentation
  • Output: Appropriate use of fprintf to display results
  • Organization: Clear separation with proper headers
  • Advanced: Uses local functions and convergence path tracking

📊 Visual Output Assessment

Figure 1: IS-LM Bisection Path ⚠️

  • Layout: Plot showing bisection convergence path
  • Features: Shows Y values during bisection iterations
  • Issue: Not the required plot - should show IS-LM curves and equilibrium
  • Your comment: Results “look very wrong”

Figure 2: IS-LM Newton Path ⚠️

  • Layout: Plot showing Newton convergence path
  • Features: Shows Y values during Newton iterations
  • Issue: Not the required plot - should show IS-LM curves
  • Your comment: Results “look very wrong”

Figure 3: Labor Supply h*(τ) ❌

  • Layout: Plot showing h* vs tax rate tau
  • Issue: Wrong plot - should plot h* vs sigma (risk aversion), not tau
  • Your comment: Results “look very wrong”

✅ Suggestions for Improvement

  1. Critical: Implement the CORRECT IS-LM model from the assignment (Y = C0 + c(Y-T) + I0 - betai^2 + G)
  2. Critical: Exercise 2 - loop over sigma values {1,2,3,4,5} and plot h*(sigma) vs sigma
  3. Critical: Implement Exercise 3 - compare bisection vs damped Newton convergence speed
  4. Critical: Fix filename - use underscore instead of hyphen (week5_solution.m)
  5. Important: Use fsolve with two initial guesses for Exercise 1 as required

🎯 Summary

Incorrect submission implementing wrong exercises. The student demonstrates programming skills with well-structured code including local functions and path tracking. However, there are critical errors: (1) Exercise 1 implements a different IS-LM model than required, (2) Exercise 2 does not loop over sigma values (only fixes sigma=2) and plots the wrong relationship (h vs tau instead of h vs sigma), (3) Exercise 3 is completely missing, and (4) the code does not run due to hyphen in filename. Additionally, when run with corrected filename, the results “look very wrong” as you noted. The bisection implementation is correct, but it’s solving the wrong problems.

Grade Level: ⚠️ Partial <50% Correct (4/15 tasks fully correct, 2/15 partially correct, 9/15 incorrect)