@@ -324,6 +324,13 @@ The next figure shows a simulation, where
324324* $g_t = \exp(X_t)$, so that $\ln g_t = X_t$ is the growth rate.
325325
326326``` {code-cell} ipython3
327+ ---
328+ mystnb:
329+ figure:
330+ caption: |
331+ State, growth, and dividend simulation
332+ name: fig_markov_sim
333+ ---
327334n = 7
328335mc = qe.tauchen(n, 0.96, 0.25)
329336sim_length = 80
@@ -414,6 +421,13 @@ As before, we'll generate $\{X_t\}$ as a {ref}`discretized AR1 process <fm_ex3>
414421Here's the code, including a test of the spectral radius condition
415422
416423``` {code-cell} ipython3
424+ ---
425+ mystnb:
426+ figure:
427+ caption: |
428+ Price-dividend ratio risk-neutral case
429+ name: fig_pdv_neutral
430+ ---
417431n = 25 # Size of state space
418432β = 0.9
419433mc = qe.tauchen(n, 0.96, 0.02)
@@ -633,6 +647,13 @@ Here's a plot of $v$ as a function of the state for several values of $\gamma$,
633647with a positively correlated Markov process and $g(x) = \exp(x)$
634648
635649```{code-cell} ipython3
650+ ---
651+ mystnb:
652+ figure:
653+ caption: |
654+ Lucas tree prices for varying risk aversion
655+ name: fig_lucas_gamma
656+ ---
636657γs = [1.2, 1.4, 1.6, 1.8, 2.0]
637658ap = create_ap_model()
638659states = ap.mc.state_values
@@ -644,7 +665,6 @@ for γ in γs:
644665 v = tree_price(tem_ap)
645666 ax.plot(states, v, lw=2, alpha=0.6, label=rf"$\gamma = {γ}$")
646667
647- ax.set_title('Price-dividend ratio as a function of the state')
648668ax.set_ylabel("price-dividend ratio")
649669ax.set_xlabel("state")
650670ax.legend(loc='upper right')
@@ -887,6 +907,13 @@ def call_option(ap, ζ, p_s, ϵ=1e-7):
887907Here's a plot of $w$ compared to the consol price when $P_S = 40$
888908
889909```{code-cell} ipython3
910+ ---
911+ mystnb:
912+ figure:
913+ caption: |
914+ Consol price and call option value
915+ name: fig_consol_call
916+ ---
890917ap = create_ap_model(β=0.9)
891918ζ = 1.0
892919strike_price = 40
@@ -1055,6 +1082,13 @@ call_option(apm, ζ, p_s)
10551082Let's show the last two functions as a plot
10561083
10571084```{code-cell} ipython3
1085+ ---
1086+ mystnb:
1087+ figure:
1088+ caption: |
1089+ Consol and call option exercise two comparison
1090+ name: fig_ex2_prices
1091+ ---
10581092fig, ax = plt.subplots()
10591093ax.plot(s, consol_price(apm, ζ), label='consol')
10601094ax.plot(s, call_option(apm, ζ, p_s), label='call option')
@@ -1141,7 +1175,14 @@ def finite_horizon_call_option(ap, ζ, p_s, k):
11411175
11421176Now let's compute the option values at `k=5` and `k=25`
11431177
1144- ```{code-cell} python3
1178+ ```{code-cell} ipython3
1179+ ---
1180+ mystnb:
1181+ figure:
1182+ caption: |
1183+ Finite horizon call option values
1184+ name: fig_ex3_finite
1185+ ---
11451186fig, ax = plt.subplots()
11461187for k in [5, 25]:
11471188 w = finite_horizon_call_option(apm, ζ, p_s, k)
0 commit comments