@@ -18,7 +18,7 @@ is used by policy makers and researchers to examine
18
18
19
19
* fiscal policy
20
20
* monetary policy
21
- * long run growth
21
+ * long- run growth
22
22
23
23
and many other topics.
24
24
@@ -57,7 +57,7 @@ prices, etc.)
57
57
The OLG model takes up this challenge.
58
58
59
59
We will present a simple version of the OLG model that clarifies the decision
60
- problem of households and studies the implications for long run growth.
60
+ problem of households and studies the implications for long- run growth.
61
61
62
62
Let's start with some imports.
63
63
@@ -70,7 +70,7 @@ import matplotlib.pyplot as plt
70
70
71
71
## Environment
72
72
73
- We assume that time is discrete, so that $t=0, 1, \ldots$,
73
+ We assume that time is discrete, so that $t=0, 1, \ldots$.
74
74
75
75
An individual born at time $t$ lives for two periods, $t$ and $t + 1$.
76
76
144
144
145
145
- $s_t$ is savings by an individual born at time $t$
146
146
- $w_t$ is the wage rate at time $t$
147
- - $R_ {t+1}$ is the interest rate on savings invested at time $t$, paid at time $t+1$
147
+ - $R_ {t+1}$ is the gross interest rate on savings invested at time $t$, paid at time $t+1$
148
148
149
149
Since $u$ is strictly increasing, both of these constraints will hold as equalities at the maximum.
150
150
@@ -225,7 +225,7 @@ economy.
225
225
226
226
## Demand for capital
227
227
228
- First we describe the firm problem and then we write down an equation
228
+ First we describe the firm's problem and then we write down an equation
229
229
describing demand for capital given prices.
230
230
231
231
@@ -246,7 +246,7 @@ The profit maximization problem of the firm is
246
246
247
247
``` {math}
248
248
:label: opt_profit_olg
249
- \max_{k_t, \ell_t} \{ k^{\alpha}_t \ell_t^{1-\alpha} - R_t k_t - \ell_t w_t \}
249
+ \max_{k_t, \ell_t} \{ k^{\alpha}_t \ell_t^{1-\alpha} - R_t k_t -w_t \ell_t \}
250
250
```
251
251
252
252
The first-order conditions are obtained by taking the derivative of the
@@ -447,7 +447,7 @@ In particular, since $w_t = (1-\alpha)k_t^\alpha$, we have
447
447
If we iterate on this equation, we get a sequence for capital stock.
448
448
449
449
450
- Let's plot the 45 degree diagram of these dynamics, which we write as
450
+ Let's plot the 45- degree diagram of these dynamics, which we write as
451
451
452
452
$$
453
453
k_{t+1} = g(k_t)
@@ -463,12 +463,9 @@ def k_update(k, α, β):
463
463
``` {code-cell} ipython3
464
464
α, β = 0.5, 0.9
465
465
kmin, kmax = 0, 0.1
466
- x = 1000
467
- k_grid = np.linspace(kmin, kmax, x)
468
- k_grid_next = np.empty_like(k_grid)
469
-
470
- for i in range(x):
471
- k_grid_next[i] = k_update(k_grid[i], α, β)
466
+ n = 1000
467
+ k_grid = np.linspace(kmin, kmax, n)
468
+ k_grid_next = k_update(k_grid,α,β)
472
469
473
470
fig, ax = plt.subplots(figsize=(6, 6))
474
471
@@ -520,7 +517,7 @@ R_star = (α/(1 - α)) * ((1 + β) / β)
520
517
521
518
### Time series
522
519
523
- The 45 degree diagram above shows that time series of capital with positive initial conditions converge to this steady state.
520
+ The 45- degree diagram above shows that time series of capital with positive initial conditions converge to this steady state.
524
521
525
522
Let's plot some time series that visualize this.
526
523
@@ -554,6 +551,7 @@ fig, ax = plt.subplots()
554
551
ax.plot(R_series, label="gross interest rate")
555
552
ax.plot(range(ts_length), np.full(ts_length, R_star), 'k--', label="$R^*$")
556
553
ax.set_ylim(0, 4)
554
+ ax.set_ylabel("gross interest rate")
557
555
ax.set_xlabel("$t$")
558
556
ax.legend()
559
557
plt.show()
@@ -629,7 +627,6 @@ def savings_crra(w, R, model):
629
627
```
630
628
631
629
``` {code-cell} ipython3
632
- R_vals = np.linspace(0.3, 1)
633
630
model = create_olg_model()
634
631
w = 2.0
635
632
@@ -685,7 +682,7 @@ In the exercise below, you will be asked to solve these equations numerically.
685
682
686
683
Solve for the dynamics of equilibrium capital stock in the CRRA case numerically using [](law_of_motion_capital_crra).
687
684
688
- Visualize the dynamics using a 45 degree diagram.
685
+ Visualize the dynamics using a 45- degree diagram.
689
686
690
687
```
691
688
@@ -735,16 +732,13 @@ def k_update(k, model):
735
732
return optimize.newton(lambda k_prime: f(k_prime, k, model), 0.1)
736
733
```
737
734
738
- Finally, here is the 45 degree diagram.
735
+ Finally, here is the 45- degree diagram.
739
736
740
737
``` {code-cell} ipython3
741
738
kmin, kmax = 0, 0.5
742
- x = 1000
743
- k_grid = np.linspace(kmin, kmax, x)
744
- k_grid_next = np.empty_like(k_grid)
745
-
746
- for i in range(x):
747
- k_grid_next[i] = k_update(k_grid[i], model)
739
+ n = 1000
740
+ k_grid = np.linspace(kmin, kmax, n)
741
+ k_grid_next = k_update(k_grid,α,β)
748
742
749
743
fig, ax = plt.subplots(figsize=(6, 6))
750
744
@@ -768,7 +762,7 @@ plt.show()
768
762
``` {exercise}
769
763
:label: olg_ex2
770
764
771
- The 45 degree diagram from the last exercise shows that there is a unique
765
+ The 45- degree diagram from the last exercise shows that there is a unique
772
766
positive steady state.
773
767
774
768
The positive steady state can be obtained by setting $k_{t+1} = k_t = k^*$ in [](law_of_motion_capital_crra), which yields
0 commit comments