Deriving the Tangency Portfolio from the Efficient Frontier
Summary
The document explains how to calculate the portfolio where a capital market line from a risk-free asset touches the efficient frontier. It derives the weights from expected asset returns, the covariance matrix, and a risk-free rate. With unconstrained weights, the tangency portfolio is proportional to the inverse covariance matrix applied to each asset’s expected excess return, then normalized so the weights sum to one.
The derivation assumes a risk-free rate that can be locked in for the investment horizon, with borrowing and lending available at that same rate. It also gives an approach for long-only portfolios: solve a minimum-variance problem at varying target excess returns until the asset weights sum to one, or optimize the Sharpe ratio directly under the constraints. The result depends on the return and covariance estimates and on the risk-free-rate assumption; the document does not provide data or empirical tests. It notes that the risk-free asset’s weight is fixed at zero when constructing the risky-asset efficient frontier.
Key ideas
- The tangency portfolio maximizes the slope of the capital market line from the risk-free rate.
- Its unconstrained weights are obtained by applying the inverse covariance matrix to expected excess returns and normalizing the result.
- The derivation assumes a risk-free rate matched to the investment horizon and equal borrowing and lending rates.
- Long-only constraints require constrained optimization rather than the unconstrained closed-form weights.
Tags
Full text
# Calculation of Market portfolio from efficient frontier
# Calculation of Market portfolio from efficient frontier
I have a specific Portfolio frontier. Can someone provides me with details about how can I calculate the market portfolio from the efficient frontier? I know that I have to draw the tangent line from the risk free asset, but how? is there any specific formula to calculate the risk free asset? Any help will be appreciated.
## Answer by Kermittfrog (score 4, accepted)
https://quant.stackexchange.com/a/60738
As @stans already said in the comments to your question, the existence of the market portfolio hinges on the existence of a risk free rate $r_f$, where risk free, in this context, means that its value can be perfectly contracted for the relevant return horizon, e.g. you will with probability one get that rate for 1 month or 1 year. In theory, we must also be able to lend out and/or borrow at that same risk free rate.
For sake of argument, let us assume that you have queried the LIBOR rates or any other interbank rates panel for the relevant risk free rates.*
What does the tangency condition imply?
Draw a line from the $0,r_f$ point in your diagram such that it is tangent to your efficient frontier. Without knowning the market point ab initio, let us just call that point $M$, and let us denote its expected return and its volatility as $\mu_m$ and $\sigma_M$.
Given this (yet unknown) point, the formula for the capital market line $L$ is:
$$ \mu_L=r_f+\frac{\mu_M-r_f}{\sigma_M}\sigma $$
i.e. if $\sigma = \sigma_M$, the line is at the market point and has an expected return of $\mu_L=\mu_M$. Furthermore, given any investment weight vector $\mathbb{w}$, the assets' expected return vector $\mathbb{\mu}$ and the assets' covariance matrix $\mathbb{\Sigma}$, our portfolio's expected return is:
$$ \mu_p(\mathbb{w})=r_f + \left(\mathbb{\mu}-\mathbb{1}r_f\right)^T\mathbb{w} \qquad $$ NB: With a risk free rate in the mix, we could add it to our portfolio (and in the efficient frontier its weight is simply fixed at zero,though).
... and our portfolio's volatility is: $$ \sigma_p(\mathbb{w})=\left(\mathbb{w}^T\mathbb{\Sigma}\mathbb{w}\right)^{\frac{1}{2}} $$
At the tangency point (market point) the slope of the capital market line $L$ and the slope of the efficient frontier (at portfolio $p$) are equal, i.e.
$$ \left.\frac{\partial \mu_L}{\partial \sigma}\right|_M=\left.\frac{\partial \mu_p}{\partial \sigma_p}\right|_{M} $$ Let's write this out (suppressing the $M$):
$$ \frac{\mu_M-r_f}{\sigma_M}=\frac{\partial \mu_p}{\partial \mathbb{w}}\bigg/\frac{\partial \sigma_p}{\partial \mathbb{w}} \Leftrightarrow \frac{\mu_M-r_f}{\sigma_M}\frac{\partial \sigma_p}{\partial \mathbb{w}}=\frac{\partial \mu_p}{\partial \mathbb{w}} $$
From matrix calculus, we know that $\frac{\partial}{\partial x}a^Tx=a$ and $\frac{\partial}{\partial x}x^TBx=Bx+B^Tx$, and in our case, due to symmetry of $\mathbb{\Sigma}$, $\frac{\partial}{\partial w}w^T\Sigma w =2\Sigma w$. We can thus rearrange the tangency condition and find:
$$ \frac{\mu_M-r_f}{\sigma_M}\frac{1}{\sigma(w)}\mathbb{\Sigma}w=\mathbb{\mu}-\mathbb{1}r_f $$
At $M$, the portfolio volatility and the market volatility coincide, i.e. $\sigma(w)\equiv \sigma_M$. We can hence solve for $w$ as:
$$ w=\frac{\sigma_M^2}{\mu_M-r_f}\mathbb{\Sigma}^{-1}\left(\mathbb{\mu}-\mathbb{1}r_f\right) $$
And as we are looking for a portfolio whose asset weights sum to 100%, we introduce the condition $\mathbb{1}^Tw=1$, yielding finally:
$$ \begin{align} w_M&=\frac{w}{\mathbb{1}^Tw}\\ &=\frac{\mathbb{\Sigma}^{-1}\left(\mathbb{\mu}-\mathbb{1}r_f\right)}{\mathbb{1}^T\mathbb{\Sigma}^{-1}\left(\mathbb{\mu}-\mathbb{1}r_f\right)} \end{align} $$
This is the formula for the market portfolio, derived using the tangency condition. Note that you can also arrive at this result using a Lagrangian ansatz.
HTH?
* NB: In practice, you will also see treasury bill rates as risk free rates as these are the most-risk-free rates available.
Addendum for a problem with positivity constraints
If your problem is bounded by non-negativity constraints, $w_i\geq 0$, one approach could be to formulate a quadratic program with a target return $m^*$:
$$ \min \frac{1}{2} w^T\Sigma w \qquad s.t. \quad w_i \geq 0,\quad w^T(\mu-r_f)=m^* $$
You then vary $m^*$ until $\sum w_i=1$. This results in your tangency portfolio under non-negativity constraints.
Ultimatively, you could use your preferred non-linear optimizer and simply instruct it to maximize the Sharpe ratio s.t. non-negativity and full investment constraints....Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.