You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lectures/cons_smooth.md
+12-24Lines changed: 12 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,7 @@ kernelspec:
11
11
name: python3
12
12
---
13
13
14
-
+++ {"user_expressions": []}
15
-
16
-
## Some dynamic models with matrices
14
+
# Some dynamic models with matrices
17
15
18
16
In this notebook, we'll present some useful models of economic dynamics using only linear algebra -- matrix multiplication and matrix inversion.
19
17
@@ -24,8 +22,6 @@ import numpy as np
24
22
import matplotlib.pyplot as plt
25
23
```
26
24
27
-
+++ {"user_expressions": []}
28
-
29
25
## Consumption smoothing
30
26
31
27
Let
@@ -78,16 +74,16 @@ where $g_1 > 0, g_2 > 0$.
78
74
79
75
We shall see that when $\beta R = 1$ (a condition assumed by Milton Friedman and Robert Hall), this criterion assigns higher welfare to **smoother** consumption paths.
80
76
81
-
+++ {"user_expressions": []}
82
77
83
-
## Difference equations with linear algebra ##
78
+
79
+
## Difference equations with linear algebra
84
80
85
81
As a warmup, we'll describe a useful way of representing and "solving" linear difference equations.
86
82
87
83
To generate some $y$ vectors, we'll just write down a linear difference equation
88
84
with appropriate initial conditions and then use linear algebra to solve it.
89
85
90
-
####First-order difference equation
86
+
### First-order difference equation
91
87
92
88
We'll start with a first-order linear difference equation for $\{y_t\}_{t=0}^T$:
To explore what types of consumption paths are welfare-improving, we shall create an **admissible consumption path variation sequence** $\{v_t\}_{t=0}^T$
284
277
that satisfies
@@ -395,7 +388,6 @@ class Consumption_smoothing:
395
388
return cvar_seq
396
389
```
397
390
398
-
+++ {"user_expressions": []}
399
391
400
392
Below is an example where the consumer inherits $a_0<0$ (which can be interpreted as a student debt).
401
393
@@ -434,7 +426,7 @@ plt.ylabel(r'$c_t,y_t,a_t$')
434
426
plt.show()
435
427
```
436
428
437
-
+++ {"user_expressions": []}
429
+
438
430
439
431
We can visualize how $\xi_1$ and $\phi$ controls **budget-feasible variations**.
0 commit comments