@@ -18,7 +18,7 @@ is used by policy makers and researchers to examine
1818
1919* fiscal policy
2020* monetary policy
21- * long run growth
21+ * long- run growth
2222
2323and many other topics.
2424
@@ -57,7 +57,7 @@ prices, etc.)
5757The OLG model takes up this challenge.
5858
5959We 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.
6161
6262Let's start with some imports.
6363
@@ -70,7 +70,7 @@ import matplotlib.pyplot as plt
7070
7171## Environment
7272
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$.
7474
7575An individual born at time $t$ lives for two periods, $t$ and $t + 1$.
7676
144144
145145- $s_t$ is savings by an individual born at time $t$
146146- $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$
148148
149149Since $u$ is strictly increasing, both of these constraints will hold as equalities at the maximum.
150150
@@ -225,7 +225,7 @@ economy.
225225
226226## Demand for capital
227227
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
229229describing demand for capital given prices.
230230
231231
@@ -246,7 +246,7 @@ The profit maximization problem of the firm is
246246
247247``` {math}
248248: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 \}
250250```
251251
252252The 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
447447If we iterate on this equation, we get a sequence for capital stock.
448448
449449
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
451451
452452$$
453453 k_{t+1} = g(k_t)
@@ -463,12 +463,9 @@ def k_update(k, α, β):
463463``` {code-cell} ipython3
464464α, β = 0.5, 0.9
465465kmin, 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,α,β)
472469
473470fig, ax = plt.subplots(figsize=(6, 6))
474471
@@ -520,7 +517,7 @@ R_star = (α/(1 - α)) * ((1 + β) / β)
520517
521518### Time series
522519
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.
524521
525522Let's plot some time series that visualize this.
526523
@@ -554,6 +551,7 @@ fig, ax = plt.subplots()
554551ax.plot(R_series, label="gross interest rate")
555552ax.plot(range(ts_length), np.full(ts_length, R_star), 'k--', label="$R^*$")
556553ax.set_ylim(0, 4)
554+ ax.set_ylabel("gross interest rate")
557555ax.set_xlabel("$t$")
558556ax.legend()
559557plt.show()
@@ -629,7 +627,6 @@ def savings_crra(w, R, model):
629627```
630628
631629``` {code-cell} ipython3
632- R_vals = np.linspace(0.3, 1)
633630model = create_olg_model()
634631w = 2.0
635632
@@ -685,7 +682,7 @@ In the exercise below, you will be asked to solve these equations numerically.
685682
686683Solve for the dynamics of equilibrium capital stock in the CRRA case numerically using [](law_of_motion_capital_crra).
687684
688- Visualize the dynamics using a 45 degree diagram.
685+ Visualize the dynamics using a 45- degree diagram.
689686
690687```
691688
@@ -735,15 +732,15 @@ def k_update(k, model):
735732 return optimize.newton(lambda k_prime: f(k_prime, k, model), 0.1)
736733```
737734
738- Finally, here is the 45 degree diagram.
735+ Finally, here is the 45- degree diagram.
739736
740737``` {code-cell} ipython3
741738kmin, kmax = 0, 0.5
742- x = 1000
743- k_grid = np.linspace(kmin, kmax, x )
739+ n = 1000
740+ k_grid = np.linspace(kmin, kmax, n )
744741k_grid_next = np.empty_like(k_grid)
745742
746- for i in range(x ):
743+ for i in range(n ):
747744 k_grid_next[i] = k_update(k_grid[i], model)
748745
749746fig, ax = plt.subplots(figsize=(6, 6))
@@ -768,7 +765,7 @@ plt.show()
768765``` {exercise}
769766:label: olg_ex2
770767
771- The 45 degree diagram from the last exercise shows that there is a unique
768+ The 45- degree diagram from the last exercise shows that there is a unique
772769positive steady state.
773770
774771The 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