Skip to content

Commit 32462a3

Browse files
committed
move code-block above numref
1 parent 5e44020 commit 32462a3

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

lectures/cass_koopmans_1.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,8 @@ def K_tilde(C, pp):
950950
A steady state $\left(K_s, C_s\right)$ is a pair $(K,C)$ that satisfies both equations {eq}`eq:tildeC` and {eq}`eq:tildeK`.
951951
952952
953-
It is thus the intersection of the two curves $\tilde{C}$ and $\tilde{K}$ that we'll eventually plot in Figure {numref}`stable_manifold` below.
953+
It is thus the intersection of the two curves $\tilde{C}$ and $\tilde{K}$ that we'll eventually plot in Figure
954+
{numref}`stable_manifold` below.
954955
955956
We can compute $K_s$ by solving the equation $K_s = \tilde{K}\left(\tilde{C}\left(K_s\right)\right)$
956957
@@ -987,29 +988,14 @@ c_vec2, k_vec2 = bisection(pp, 1e-3, 1e-3, T=200, k_ter=Ks)
987988
988989
The following code generates Figure {numref}`stable_manifold`, which is patterned on a graph that appears on page 411 of {cite}`intriligator2002mathematical`.
989990
990-
Figure {numref}`stable_manifold` is a classic "phase plane" with "state" variable $K$ on the ordinate axis and "co-state" variable $C$ on the coordinate axis.
991-
992-
Figure {numref}`stable_manifold` plots three curves:
993-
994-
* the blue line graphs $C = \tilde C (K)$ of fixed points described by equation {eq}`eq:tildeC`.
995-
* the red line graphs $K = \tilde K(C)$ of fixed points described by equation {eq}`eq:tildeK`
996-
* the green line graphs the stable traced out by paths that converge to the steady state starting from an arbitrary $K_0$ at time $0$.
997-
* for a given $K_0$, the shooting algorithm sets $C_0$ to the coordinate on the green line in order to initiate a path that converges to the optimal steady state
998-
* the arrows on the green line show the direction in which dynamics {eq}`eq:systemdynamics` push successive $(K_{t+1}, C_t)$ pairs.
999-
1000-
In addition to the three curves, Figure {numref}`stable_manifold` plots arrows that point where the dynamics {eq}`eq:systemdynamics` drive the system when, for a given $K_0$, $C_0$ is not on the stable manifold depicted in the green line.
1001-
1002-
* If $C_0$ is set below the green line for a given $K_0$, too much capital is accumulated
1003-
1004-
* If $C_0$ is set above the green line for a given $K_0$, too little capital is accumulated
1005-
1006991
```{code-cell} ipython3
1007992
---
1008993
mystnb:
1009994
figure:
1010995
caption: Stable Manifold and Phase Plane
1011996
name: stable_manifold
1012997
---
998+
1013999
fig, ax = plt.subplots(figsize=(7, 5))
10141000
10151001
K_range = np.arange(1e-1, 15, 0.1)
@@ -1058,8 +1044,21 @@ ax.set_ylabel('$C$')
10581044
plt.show()
10591045
```
10601046
1061-
1047+
Figure {numref}`stable_manifold` is a classic "phase plane" with "state" variable $K$ on the ordinate axis and "co-state" variable $C$ on the coordinate axis.
1048+
1049+
Figure {numref}`stable_manifold` plots three curves:
1050+
1051+
* the blue line graphs $C = \tilde C (K)$ of fixed points described by equation {eq}`eq:tildeC`.
1052+
* the red line graphs $K = \tilde K(C)$ of fixed points described by equation {eq}`eq:tildeK`
1053+
* the green line graphs the stable traced out by paths that converge to the steady state starting from an arbitrary $K_0$ at time $0$.
1054+
* for a given $K_0$, the shooting algorithm sets $C_0$ to the coordinate on the green line in order to initiate a path that converges to the optimal steady state
1055+
* the arrows on the green line show the direction in which dynamics {eq}`eq:systemdynamics` push successive $(K_{t+1}, C_t)$ pairs.
1056+
1057+
In addition to the three curves, Figure {numref}`stable_manifold` plots arrows that point where the dynamics {eq}`eq:systemdynamics` drive the system when, for a given $K_0$, $C_0$ is not on the stable manifold depicted in the green line.
10621058
1059+
* If $C_0$ is set below the green line for a given $K_0$, too much capital is accumulated
1060+
1061+
* If $C_0$ is set above the green line for a given $K_0$, too little capital is accumulated
10631062
10641063
## Concluding Remarks
10651064

0 commit comments

Comments
 (0)