Skip to content
All library documents

Deriving the Two-Asset Tangency Portfolio by Maximizing Sharpe Ratio

Article Quant Q&A · Author: user59439

Summary

The response frames the tangency portfolio as the risky portfolio that maximizes the slope of the capital allocation line, equivalent to maximizing excess expected return per unit of volatility. For two assets, it writes portfolio return as a weight-based average and portfolio variance using each asset’s variance and their covariance. Substituting these into the slope gives an objective expressed in the weight of one asset.

The proposed derivation is to differentiate that objective with respect to the weight and set the result to zero to find the optimum. The answer outlines the optimization rather than carrying out the derivative or presenting the resulting closed-form weight. It therefore gives a useful setup for a two-asset derivation, but does not address constraints such as prohibiting short sales, estimation error in inputs, or the extension to portfolios with more assets. A second reply points to an external step-by-step explanation without adding further detail.

Key ideas

  • The tangency portfolio maximizes the capital allocation line’s slope, or Sharpe ratio.
  • For two assets, expected return depends on weights and variance also depends on covariance.
  • Substitute the return and variance formulas into the Sharpe ratio to form a weight-based objective.
  • Differentiate the objective with respect to the asset weight and set the derivative to zero.
  • The response leaves the derivative and final optimal weight unevaluated.

Tags

Full text
# How to derive the weights of tangency portfolio?


# How to derive the weights of tangency portfolio?












I am well aware of this formula but I could not find how to derive this. Of course, I failed to derive (or prove) it by myself. I will appreciate if you guys provide me a good, detailed derivation.

## Answer by J-F (score 2)

https://quant.stackexchange.com/a/68260

The derivation is simple but quite tedious. The tangency portfolio is found by maximizing the slope of the capital allocation line (CAL). The slope $S_p$ of the CAL is given by:

$\begin{align}S_p=\frac{E[r_p]-r_f }{\sigma_p}\end{align}$

In a 2-asset portfolio, the expected return $E[r_p]$ and variance $\sigma_p^2$ can be written as:

$\begin{align} E[r_p] &= w_A E[r_A]+ (1-w_A)E[r_B] \\ \sigma_p^2 &=w_A^2 \sigma_A^2 +(1-w_A)^2 \sigma_B^2 +2w_A (1-w_A) \sigma_{A,B}\end{align}$

Replacing these expressions in the slope formula, we get:

$\begin{align} S_p =\frac{w_A E[r_A]+ (1-w_A)E[r_B] -r_f}{\sqrt{w_A^2 \sigma_A^2 +(1-w_A)^2 \sigma_B^2 +2w_A (1-w_A) \sigma_{A,B}}}\end{align}$

Since we're looking for the portfolio for which $S_p$ is maximum, we need to solve:

$\begin{align} w_A^*\equiv\arg \max \left\{ \frac{w_A E[r_A]+ (1-w_A)E[r_B] -r_f}{\sqrt{w_A^2 \sigma_A^2 +(1-w_A)^2 \sigma_B^2 +2w_A (1-w_A) \sigma_{A,B}}}\right\} \end{align}$

Taking the derivative with respect to $w_A$ and setting it to zero will give you the solution to the optimal portfolio.

## Answer by T123 (score 0)

https://quant.stackexchange.com/a/77253

Here is a nice step-by-step explanation for your 2-asset case:

https://www.youtube.com/watch?app=desktop&v=IhYhVW6IO7I

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.