Skip to content

Commit

Permalink
Tom's Feb 12 edits of consumption smoothing lecture
Browse files Browse the repository at this point in the history
  • Loading branch information
thomassargent30 committed Feb 12, 2024
1 parent ee9cce3 commit 4f7c1c1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lectures/cons_smooth.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```
Expand All @@ -408,15 +406,15 @@ 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)
```
```{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)
```
Expand Down

0 comments on commit 4f7c1c1

Please sign in to comment.