Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 51 additions & 12 deletions portfolio-theory.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -144,36 +144,49 @@ and a variance

$$ \sigma_\mathrm{min}^2 = \vec{w}_\mathrm{min}^\intercal \, V \, \vec{w}_\mathrm{min} = \left( \frac{\vec{1}^\intercal \, V^{-1}}{a} \right) V \left( \frac{V^{-1} \, \vec{1}}{a} \right) = \frac{\vec{1}^\intercal \, V^{-1} \, \vec{1}}{a^2} = \frac{1}{a} $$

The *tangent portfolio* is
The *tangent portfolio* is the maximum-Sharpe portfolio, and so it depends on the
risk-free rate of return, $r_\mathrm{f}$, as well as on $\vec{\mu}$ and $V$.
It is derived in the section on the [One-fund theorem](#one-fund-theorem) below;
quoting the result here because it is one of the two funds we want:

$$ \vec{w}_\mathrm{tan} = \frac{V^{-1} \, \vec{\mu}}{b} = \frac{V^{-1} \, \vec{\mu}}{\vec{1}^\intercal \, V^{-1} \, \vec{\mu}} $$
$$ \vec{w}_\mathrm{tan}(r_\mathrm{f}) = \frac{V^{-1} \, (\vec{\mu} - r_\mathrm{f} \, \vec{1})}{\vec{1}^\intercal \, V^{-1} \, (\vec{\mu} - r_\mathrm{f} \, \vec{1})} = \frac{V^{-1} \, (\vec{\mu} - r_\mathrm{f} \, \vec{1})}{b - a \, r_\mathrm{f}} $$

It has a return

$$ r_\mathrm{tan} = \vec{w}_\mathrm{tan} \cdot \vec{\mu} = \frac{\vec{\mu}^\intercal \, V^{-1} \, \vec{\mu}}{b} = \frac{c}{b} $$
$$ r_\mathrm{tan} = \vec{w}_\mathrm{tan} \cdot \vec{\mu} = \frac{c - b \, r_\mathrm{f}}{b - a \, r_\mathrm{f}} $$

and a variance

$$ \sigma_\mathrm{tan}^2 = \vec{w}_\mathrm{tan}^\intercal \, V \, \vec{w}_\mathrm{tan} = \left( \frac{\vec{\mu}^\intercal \, V^{-1}}{b} \right) V \left( \frac{V^{-1} \, \vec{\mu}}{b} \right) = \frac{\vec{\mu}^\intercal \, V^{-1} \, \vec{\mu}}{b^2} = \frac{c}{b^2} $$
$$ \sigma_\mathrm{tan}^2 = \vec{w}_\mathrm{tan}^\intercal \, V \, \vec{w}_\mathrm{tan} = \frac{(\vec{\mu} - r_\mathrm{f} \, \vec{1})^\intercal \, V^{-1} \, (\vec{\mu} - r_\mathrm{f} \, \vec{1})}{(b - a \, r_\mathrm{f})^2} = \frac{a \, r_\mathrm{f}^2 - 2 \, b \, r_\mathrm{f} + c}{(b - a \, r_\mathrm{f})^2} $$

The efficient frontier can be written as a linear combination of any two efficient portfolios.
This is discussed in more detail in the section on [Fund theorems](#fund-theorems).
Written as a combination of the minimum variance and the tangent portfolios gives

$$ \vec{w}_{\ast} = \psi \, \vec{w}_\mathrm{min} + (1-\psi) \, \vec{w}_\mathrm{tan} $$

where
where, solving $r_{\ast} = \psi \, r_\mathrm{min} + (1-\psi) \, r_\mathrm{tan}$ for $\psi$
and using $r_\mathrm{tan} - r_\mathrm{min} = d \, / \, [\,a \, (b - a \, r_\mathrm{f})\,]$,

$$ \psi = (c - b \, r_{\ast}) \, a \, / \, d $$
$$ \psi = \frac{a \, \left[ (c - b \, r_{\ast}) + r_\mathrm{f} \, (a \, r_{\ast} - b) \right]}{d}, \qquad 1 - \psi = \frac{(a \, r_{\ast} - b) \, (b - a \, r_\mathrm{f})}{d} $$

Both weights carry $r_\mathrm{f}$, because which frontier portfolio the tangent
portfolio is depends on $r_\mathrm{f}$.

The efficient frontier portfolio can be equivalently written

\begin{align}
\vec{w}_{\ast} &= \psi \, \vec{w}_\mathrm{min} + (1-\psi) \, \vec{w}_\mathrm{tan} \\
&= \left( \frac{c - b \, r_{\ast}}{d} \right) a \, \vec{w}_\mathrm{min} + \left( \frac{a \, r_{\ast} - b}{d} \right) b \, \vec{w}_\mathrm{tan} \\
&= \left( \frac{(c - b \, r_{\ast}) + r_\mathrm{f} \, (a \, r_{\ast} - b)}{d} \right) V^{-1} \, \vec{1} + \left( \frac{a \, r_{\ast} - b}{d} \right) V^{-1} \, (\vec{\mu} - r_\mathrm{f} \, \vec{1}) \\
&= \left( \frac{c - b \, r_{\ast}}{d} \right) V^{-1} \, \vec{1} + \left( \frac{a \, r_{\ast} - b}{d} \right) V^{-1} \, \vec{\mu}
\end{align}

using $a \, \vec{w}_\mathrm{min} = V^{-1} \vec{1}$ and
$(b - a \, r_\mathrm{f}) \, \vec{w}_\mathrm{tan} = V^{-1} (\vec{\mu} - r_\mathrm{f} \vec{1})$
in the second line. The $r_\mathrm{f}$ terms cancel in the third, as they must: the
frontier is a property of $\vec{\mu}$ and $V$ alone. Only the *decomposition* into two
funds depends on $r_\mathrm{f}$.

Along the frontier, the return is

$$ r_{\ast} = \psi \, r_\mathrm{min} + (1-\psi) \, r_\mathrm{tan} $$
Expand All @@ -182,9 +195,34 @@ The variance is

$$ \sigma^2_{\ast} = \frac{a}{d} \, r_{\ast}^{2} - \frac{2 \, b}{d} \, r_{\ast} + \frac{c}{d} $$

TODO: Note calculation order of $\vec{w}_\mathrm{min}(\mu, V)$
and $\vec{w}_\mathrm{tan}(\mu, V, r_\mathrm{f})$, then calculate $r_{\ast}(\sigma_{\ast})$,
scanning from $\sigma_\mathrm{min}$ to $\sigma_\mathrm{max}$.
which has no $r_\mathrm{f}$ in it either, consistent with the frontier being independent
of the risk-free rate.

::: {.callout-warning title="The last line is the one to implement"}
$\psi$ and $\vec{w}_\mathrm{tan}$ both depend on $r_\mathrm{f}$ and only their combination
does not, so the two have to be taken at the same $r_\mathrm{f}$. Mixing a
$\vec{w}_\mathrm{tan}(r_\mathrm{f})$ with coefficients derived at some other rate
$r_\mathrm{f}'$ --- the $\psi = (c - b \, r_{\ast}) \, a \, / \, d$ of the
$r_\mathrm{f}' = 0$ case is the one usually quoted --- returns weights that still sum to
one and still lie on the frontier, and so survive the obvious checks, but they are the
frontier portfolio for the return

$$ r_{\ast} + \left( r_{\ast} - r_\mathrm{min} \right) \frac{r_\mathrm{f} - r_\mathrm{f}'}{r_\mathrm{min} - r_\mathrm{f}} $$

rather than for $r_{\ast}$. The error vanishes at $r_{\ast} = r_\mathrm{min}$, so a spot
check at the minimum-variance point will not see it, and it diverges as
$r_\mathrm{f} \rightarrow r_\mathrm{min}$. Only $\vec{w}_{\ast} \cdot \vec{\mu} = r_{\ast}$
catches it.

The last line above avoids the issue: it contains no $r_\mathrm{f}$, and needs only
$V^{-1} \vec{1}$ and $V^{-1} \vec{\mu}$.
:::

To scan out the frontier: compute $a$, $b$, $c$, $d$ from $\vec{\mu}$ and $V$, then step
$r_{\ast}$ over the range of interest, taking $\vec{w}_{\ast}$ from the last line above
and $\sigma_{\ast}$ from $\sigma^2_{\ast}$. Neither step needs $\vec{w}_\mathrm{min}$ or
$\vec{w}_\mathrm{tan}$, so neither inherits any rounding or clipping applied to those two
for reporting.

![The "Markowitz Bullet", the efficient frontier shown in
@Markowitz_1959_Portfolio_Selection_Efficient_Diversification, p. 152.
Expand Down Expand Up @@ -397,7 +435,8 @@ introducing or varying the risk-free rate of return, which portfolio
along the frontier that is the tangent portfolio will depend on the
risk-free rate of return.

The *tangent portfolio with a risk-free asset* is
The *tangent portfolio with a risk-free asset*, quoted above in the
[two-fund](#two-fund-theorem) discussion, is

$$ \vec{w}_\mathrm{tan} = \frac{V^{-1} \, (\vec{\mu} - r_\mathrm{f} \, \vec{1})}{\vec{1}^\intercal \, V^{-1} \, (\vec{\mu} - r_\mathrm{f} \, \vec{1})} $$

Expand All @@ -407,7 +446,7 @@ $$ r_\mathrm{tan} = \vec{\mu} \cdot \vec{w}_\mathrm{tan} = \frac{c - b \, r_\mat

and a variance

$$ \sigma_\mathrm{tan}^{2} = \frac{\left|\vec{\mu} - r_\mathrm{f} \, \vec{1}\right|^2}{ (\vec{\mu} - r_\mathrm{f} \, \vec{1})^\intercal \, V^{-1} \, (\vec{\mu} - r_\mathrm{f} \, \vec{1})} = \frac{a \, r_\mathrm{f}^2 - 2 \, b \, r_\mathrm{f} + c}{(b - a \, r_\mathrm{f})^2} $$
$$ \sigma_\mathrm{tan}^{2} = \frac{ (\vec{\mu} - r_\mathrm{f} \, \vec{1})^\intercal \, V^{-1} \, (\vec{\mu} - r_\mathrm{f} \, \vec{1}) }{ \left( \vec{1}^\intercal \, V^{-1} \, (\vec{\mu} - r_\mathrm{f} \, \vec{1}) \right)^2 } = \frac{a \, r_\mathrm{f}^2 - 2 \, b \, r_\mathrm{f} + c}{(b - a \, r_\mathrm{f})^2} $$

The tangent portfolio is the portfolio with the maximum
[Sharpe ratio](https://en.wikipedia.org/wiki/Sharpe_ratio), $S_i$.
Expand Down
Loading