Skip to content

Commit 00bbe19

Browse files
committed
incorprate comments and merge changes
1 parent 0f90699 commit 00bbe19

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

lectures/cons_smooth.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Let
2929

3030
* $T \geq 2$ be a positive integer that constitutes a time-horizon
3131

32-
* $\vec y = \{y_t\}_{t=0}^T$ be an exogenous sequence of non-negative financial incomes $y_t$
32+
* $y = \{y_t\}_{t=0}^T$ be an exogenous sequence of non-negative financial incomes $y_t$
3333

34-
* $\vec a = \{a_t\}_{t=0}^{T+1}$ be a sequence of financial wealth
34+
* $a = \{a_t\}_{t=0}^{T+1}$ be a sequence of financial wealth
3535

36-
* $\vec c = \{c_t\}_{t=0}^T$ be a sequence of non-negative consumption rates
36+
* $c = \{c_t\}_{t=0}^T$ be a sequence of non-negative consumption rates
3737

3838
* $R \geq 1$ be a fixed gross one period rate of return on financial assets
3939

@@ -43,18 +43,18 @@ Let
4343

4444
* $a_{T+1} \geq 0$ be a terminal condition on final assets
4545

46-
A sequence of budget constraints constrains the triple of sequences $\vec y, \vec c, \vec a$
46+
A sequence of budget constraints constrains the triple of sequences $y, c, a$
4747

4848
$$
4949
a_{t+1} = R (a_t+ y_t - c_t), \quad t =0, 1, \ldots T
5050
$$
5151

5252
Our model has the following logical flow
5353

54-
* start with an exogenous income sequence $\vec y$, an initial financial wealth $a_0$, and
55-
a candidate consumption path $\vec c$.
54+
* start with an exogenous income sequence $y$, an initial financial wealth $a_0$, and
55+
a candidate consumption path $c$.
5656

57-
* use equation (1) to compute a path $\vec a$ of financial wealth
57+
* use equation (1) to compute a path $a$ of financial wealth
5858

5959
* verify that $a_{T+1}$ satisfies the terminal wealth constraint $a_{T+1} \geq 0$.
6060

@@ -65,7 +65,7 @@ Our model has the following logical flow
6565
Below, we'll describe how to execute these steps using linear algebra -- matrix inversion and multiplication.
6666

6767

68-
We shall eventually evaluate alternative budget feasible consumption paths $\vec c$ using the following **welfare criterion**
68+
We shall eventually evaluate alternative budget feasible consumption paths $c$ using the following **welfare criterion**
6969

7070
```{math}
7171
:label: welfare
@@ -82,12 +82,14 @@ Here we use default parameters $R = 1.05$, $g_1 = 1$, $g_2 = 1/2$, and $T = 65$.
8282
We create a namedtuple to store these parameters with default values.
8383

8484
```{code-cell} ipython3
85-
ConsumptionSmoothing = namedtuple("ConsumptionSmoothing", ["R", "g1", "g2", "β_seq", "T"])
85+
ConsumptionSmoothing = namedtuple("ConsumptionSmoothing",
86+
["R", "g1", "g2", "β_seq", "T"])
8687
8788
def creat_cs_model(R=1.05, g1=1, g2=1/2, T=65):
8889
β = 1/R
8990
β_seq = np.array([β**i for i in range(T+1)])
90-
return ConsumptionSmoothing(R=1.05, g1=1, g2=1/2, β_seq=β_seq, T=65)
91+
return ConsumptionSmoothing(R=1.05, g1=1, g2=1/2,
92+
β_seq=β_seq, T=65)
9193
```
9294

9395
## Difference equations with linear algebra
@@ -128,7 +130,7 @@ y_1 \cr y_2 \cr y_3 \cr \vdots \cr y_T
128130
$$
129131

130132

131-
Multiplying both sides by inverse of the matrix on the left provides the solution
133+
Multiplying both sides by inverse of the matrix on the left provides the solution
132134

133135
$$
134136
\begin{bmatrix}
@@ -153,7 +155,7 @@ $$
153155
\begin{bmatrix}
154156
1 & 0 & 0 & \cdots & 0 & 0 & 0 \cr
155157
-\lambda_1 & 1 & 0 & \cdots & 0 & 0 & 0 \cr
156-
-\lambda_2 & -\lambda_2 & 1 & \cdots & 0 & 0 & 0 \cr
158+
-\lambda_2 & -\lambda_1 & 1 & \cdots & 0 & 0 & 0 \cr
157159
\vdots & \vdots & \vdots & \cdots & \vdots & \vdots \cr
158160
0 & 0 & 0 & \cdots & \lambda_2 & -\lambda_1 & 1
159161
\end{bmatrix}
@@ -389,15 +391,12 @@ $$
389391

390392
This is our formula for $\xi_0$.
391393

392-
Evidently, if $\vec c^o$ is a budget-feasible consumption path, then so is $\vec c^o + \vec v$,
393-
where $\vec v$ is a budget-feasible variation.
394+
Evidently, if $c^o$ is a budget-feasible consumption path, then so is $c^o + v$,
395+
where $v$ is a budget-feasible variation.
394396

395-
Given $R$, we thus have a two parameter class of budget feasible variations $\vec v$ that we can use
397+
Given $R$, we thus have a two parameter class of budget feasible variations $v$ that we can use
396398
to compute alternative consumption paths, then evaluate their welfare.
397399

398-
**Note to John:** We can do some fun simple experiments with these variations -- we can use
399-
graphs to show that, when $\beta R = 1$ and starting from the smooth path, all nontrivial budget-feasible variations lower welfare according to the criterion above.
400-
401400
Now let's compute and visualize the variations
402401

403402
```{code-cell} ipython3

0 commit comments

Comments
 (0)