diff --git a/lectures/cons_smooth.md b/lectures/cons_smooth.md index ea52430a..8d10471f 100644 --- a/lectures/cons_smooth.md +++ b/lectures/cons_smooth.md @@ -311,7 +311,7 @@ a0 = -2 # such as "student debt" y_seq = np.concatenate([np.ones(46), np.zeros(20)]) cs_model = creat_cs_model() -c_seq, a_seq = compute_optimal(cs_model, a0, y_seq) +c_seq, a_seq, h0 = compute_optimal(cs_model, a0, y_seq) print('check a_T+1=0:', np.abs(a_seq[-1] - 0) <= 1e-8) @@ -429,7 +429,7 @@ def compute_variation(model, ξ1, ϕ, a0, y_seq, verbose=1): if verbose == 1: print('check feasible:', np.isclose(β_seq @ v_seq, 0)) # since β = 1/R - c_opt, _ = compute_optimal(model, a0, y_seq) + c_opt, _, _ = compute_optimal(model, a0, y_seq) cvar_seq = c_opt + v_seq return cvar_seq