Skip to content

Commit

Permalink
Merge pull request TikhonJelvis#169 from TikhonJelvis/binary-tree-fixes
Browse files Browse the repository at this point in the history
Binary tree fixes
  • Loading branch information
coverdrive authored Oct 9, 2021
2 parents 3d45b4e + 34885a6 commit 78e152c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 17 deletions.
15 changes: 12 additions & 3 deletions appendix3/appendix3.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,12 @@ $$y_t = \log(x_t)$$

Applying Ito's Lemma on $y_t$ with respect to $x_t$, we get:

$$dy_t = \frac {dx_t} {x_t} - \frac {\sigma^2(t)} 2 \cdot dt = (\mu(t) - \frac {\sigma^2(t)} 2) \cdot dt + \sigma(t) \cdot dz_t$$
\begin{align*}
dy_t & = (\mu(t) \cdot x_t \cdot \frac 1 {x_t} - \frac {\sigma^2(t) \cdot x_t^2} 2 \cdot \frac 1 {x_t^2}) \cdot dt + \sigma(t) \cdot x_t \cdot \frac 1 {x_t} \cdot dz_t \\
& = (\mu(t) - \frac {\sigma^2(t)} 2) \cdot dt + \sigma(t) \cdot dz_t
\end{align*}

So,
$$y_T = y_S + \int_S^T (\mu(t) - \frac {\sigma^2(t)} 2) \cdot dt + \int_S^T \sigma(t) \cdot dz_t$$
$$x_T = x_S \cdot e^{\int_S^T (\mu(t) - \frac {\sigma^2(t)} 2) \cdot dt + \int_S^T \sigma(t) \cdot dz_t}$$

Expand Down Expand Up @@ -203,8 +208,12 @@ As in the process of the previous section, $z$ is standard (one-dimensional) Bro
$$y_t = x_t \cdot e^{-\int_0^t \mu(u) \cdot du}$$
Applying Ito's Lemma on $y_t$ with respect to $x_t$, we get:

$$dy_t = e^{-\int_0^t \mu(u) \cdot du} \cdot dx_t - x_t \cdot e^{-\int_0^t \mu(u) \cdot du} \cdot \mu(t) \cdot dt = \sigma(t) \cdot e^{-\int_0^t \mu(u) \cdot du} \cdot dz_t$$
$y_t$ is a martingale. Using Ito Isometry, we get:
\begin{align*}
dy_t & = (- x_t \cdot \mu(t) \cdot e^{-\int_0^t \mu(u) \cdot du} + \mu(t) \cdot x_t \cdot e^{-\int_0^t \mu(u) \cdot du}) \cdot dt + \sigma(t) \cdot e^{-\int_0^t \mu(u) \cdot du} \cdot dz_t \\
& = \sigma(t) \cdot e^{-\int_0^t \mu(u) \cdot du} \cdot dz_t
\end{align*}

So the process $y$ is a martingale. Using Ito Isometry, we get:

$$y_T \sim \mathcal{N}(y_S, \int_S^T \sigma^2(t) \cdot e^{-\int_0^t 2 \mu(u) \cdot du} \cdot dt)$$

Expand Down
9 changes: 6 additions & 3 deletions chapter6/chapter6.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,12 @@ U(W_1) =
$$

Applying Ito's Lemma (see Appendix [-@sec:stochasticcalculus-appendix]) on $\log W_t$ gives us:
$$d(\log W_t) = \frac 1 W_t \cdot dW_t - \frac 1 {2 W_t^2} \cdot (dW_t)^2$$
$$\Rightarrow d(\log W_t) = (r + \pi (\mu - r)) \cdot dt + \pi \cdot \sigma \cdot dz_t - \frac {\pi^2 \sigma^2} 2 \cdot dt$$
$$\Rightarrow \log W_t = \int_0^t (r + \pi (\mu - r) - \frac {\pi^2 \sigma^2} 2) \cdot du + \int_0^t \pi \cdot \sigma \cdot dz_u$$
\begin{align*}
d(\log W_t) & = ((r + \pi (\mu - r)) \cdot W_t \cdot \frac 1 {W_t} - \frac {\pi^2 \cdot \sigma^2 \cdot W_t^2} {2} \cdot \frac 1 {W_t^2}) \cdot dt + \pi \cdot \sigma \cdot W_t \cdot \frac 1 {W_t} \cdot dz_t \\
& = (r + \pi (\mu - r) - \frac {\pi^2 \sigma^2} 2) \cdot dt + \pi \cdot \sigma \cdot dz_t
\end{align*}
Therefore,
$$\log W_t = \int_0^t (r + \pi (\mu - r) - \frac {\pi^2 \sigma^2} 2) \cdot du + \int_0^t \pi \cdot \sigma \cdot dz_u$$
Using the martingale property and Ito Isometry for the Ito integral $\int_0^t \pi \cdot \sigma \cdot dz_u$ (see Appendix [-@sec:stochasticcalculus-appendix]), we get:

$$\log W_1 \sim \mathcal{N}(r+\pi(\mu -r) - \frac {\pi^2 \sigma^2} 2, \pi^2 \sigma^2)$$
Expand Down
Loading

0 comments on commit 78e152c

Please sign in to comment.