From 4f7c1c179ea02e7f88ea0e3b149b092dc908e2c6 Mon Sep 17 00:00:00 2001 From: thomassargent30 Date: Mon, 12 Feb 2024 09:52:27 +0800 Subject: [PATCH] Tom's Feb 12 edits of consumption smoothing lecture --- lectures/cons_smooth.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lectures/cons_smooth.md b/lectures/cons_smooth.md index 29d6e2a7..4dc61d43 100644 --- a/lectures/cons_smooth.md +++ b/lectures/cons_smooth.md @@ -385,16 +385,14 @@ We'll make $W_0$ big - positive to indicate a one-time windfall, and negative to ```{code-cell} ipython3 # Windfall W_0 = 2.5 -y_seq_pos = np.concatenate( - [np.ones(21), np.array([2.5]), np.ones(44)]) +y_seq_pos = np.concatenate([np.ones(21), np.array([2.5]), np.ones(24), np.zeros(20)]) plot_cs(cs_model, a0, y_seq_pos) ``` ```{code-cell} ipython3 # Disaster W_0 = -2.5 -y_seq_neg = np.concatenate( - [np.ones(21), np.array([-2.5]), np.ones(44)]) +y_seq_neg = np.concatenate([np.ones(21), np.array([-2.5]), np.ones(24), np.zeros(20)]) plot_cs(cs_model, a0, y_seq_neg) ``` @@ -408,7 +406,7 @@ Again we can study positive and negative cases ```{code-cell} ipython3 # Positive permanent income change W = 0.5 when t >= 21 y_seq_pos = np.concatenate( - [np.ones(21), np.repeat(1.5, 45)]) + [np.ones(21), 1.5*np.ones(25), np.zeros(20)]) plot_cs(cs_model, a0, y_seq_pos) ``` @@ -416,7 +414,7 @@ plot_cs(cs_model, a0, y_seq_pos) ```{code-cell} ipython3 # Negative permanent income change W = -0.5 when t >= 21 y_seq_neg = np.concatenate( - [np.ones(21), np.repeat(0.5, 45)]) + [np.ones(21), .5*np.ones(25), np.zeros(20)]) plot_cs(cs_model, a0, y_seq_neg) ```