Skip to content
All library documents

Deriving the CAPM from Sharpe Ratio Maximization

Article Quant Q&A · Author: user44083

Summary

The document presents a derivation of the CAPM by treating the market portfolio as a portfolio on the capital allocation line that maximizes the Sharpe ratio. Under the assumption that investors choose mean–variance efficient portfolios, individual holdings can be represented as combinations of a tangent portfolio and a risk-free asset. Aggregating those holdings motivates the claim that the market portfolio lies on the same line.

The derivation differentiates the market’s expected return and volatility with respect to an asset’s weight, then sets the derivative of the Sharpe ratio to zero. Rearranging yields the familiar relation between an asset’s excess expected return and its covariance with the market, expressed through beta. The appendix sketches the volatility derivative using portfolio variance. The argument depends on strong equilibrium and mean–variance assumptions, and the aggregation and notation contain potential inconsistencies; it is best read as an outline rather than a fully rigorous proof.

Key ideas

  • The derivation assumes investors choose portfolios using mean and variance and share a common tangent portfolio.
  • It argues that aggregating investor holdings places the market portfolio on the capital allocation line.
  • Differentiating the Sharpe ratio with respect to an asset weight gives a condition involving expected return and market covariance.
  • The resulting beta is the asset’s covariance with the market divided by market variance.
  • The conclusion relies on equilibrium assumptions and the derivation’s aggregation steps warrant careful scrutiny.

Tags

Full text
# How to derive the CAPM from maximizing the Sharpe ratio?


# How to derive the CAPM from maximizing the Sharpe ratio?












I know how to derive at the CAPM from a microeconomic foundation. In a recent University course I stumbled over a slide that derived the CAPM solely from the Sharpe ratio:

I cant come up with that steps by myself and it seems I am missing something down the line.

Do you guys here either have a source / video / etc. that derives the CAPM similarly in a step by step fashion? Or is someone here who could break the involved derivation steps into parts?

## Answer by chris (score 1)

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

I imagine that after 3 years you don't need to maximize the shape ratio anymore, but I actually stumbled across the same question when studying for the exam and thus ended up at your post here, so here's my approach to deriving the CAPM equation. Maybe it'll help some other of Professor Lawrence's students in the future! https://imgur.com/oVsQPME

## Answer by Herbert (score 1)

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

### Definitions

- $\mu_t$: Expected return of tangent portfolio $\omega_i$ be the weight of asset $i$ in the tangent portfolio $\mu_i$: Expected return of asset i

- $\mu_m$: Expected return of market

- $r_f$: Risk free rate (assumed to be constant)

- $\sigma_{i,j}$: Covariance between asset i and j

- $\sigma_{i,M}$: Covariance between asset i and the market

### Why is the Market Portfolio along the Capital Allocation Line?

The CAPM model assumes all market participants only care about mean and variance and that they completely rational, aka they follow markovitz portfolio theory. So participant $n$'s portfolio can be decomposed into the risk free rate and and the tangent portfolio as so: $\alpha_n \mu_t + \beta_n \mu_f$. Note these are dollar amounts with no restrictions, they can be positive or negative and dont have to equal 1.

The return of the market is defined as the pnl devided by the total dollar amount $$\mu_m = \frac{\sum_n \alpha_n \mu_t + \beta_n \mu_f}{\sum_n \alpha_n + \beta_n}$$ let $\alpha'_n = \frac{\alpha_n}{\sum_n \alpha_n + \beta_n}$ and $\beta'_n = \frac{\beta_n}{\sum_n \alpha_n + \beta_n}$, so $\sum_n \alpha'_n + \beta'_n = 1$.

$$\mu_m = \sum_n \alpha'_n \mu_t + \beta'_n \mu_f$$

Then $1-\sum_n\alpha'_n = \sum_n\beta'_n$ $$\mu_m = \sum_n \alpha'_n \mu_t + (1-\sum_n\alpha'_n) \mu_f$$

Let $A = \sum_n \alpha'_n$ be the total weight in the tangent portfolio across the entire market. $$\mu_m = A r_t + (1 - A)r_f$$

Let $\omega_i$ be weight in asset i, so $A = \sum_i \omega_i$ $$\mu_m = \sum_i \omega_i \mu_i + \left(1 - \sum_i \omega_i\right)r_f$$

## Derivation of CAPM

Derivatives to be used later

- $\mu'_m = \frac{\partial \mu_m}{\partial \omega_i}$ $\mu'_m = \mu_i - r_f$

- $\sigma'_m = \frac{\partial \sigma_m}{\partial \omega_i}$ $\sigma'_m = \frac{\sigma_{i,M}}{\sigma_m}$ See appendix.

The market portfolio is along the capital allocation line, so it has maximum sharpe ratio. Thus the derivative of sharpe w.r.t to all $\omega_i$ is 0.

$$\forall i,\quad \frac{\partial}{\partial \omega_i} \left( \frac{\mu_m - r_f}{\sigma_m} \right) = 0 \rightarrow \frac{\mu'_m\sigma_m-\sigma'_m(\mu_m-r_f)}{\sigma_m^2} = 0 $$

Using our derivatives above gives us: $$\forall i,\quad \frac{(\mu_i-r_f)\sigma_m-\left(\frac{\sigma_{i,M}}{\sigma_m}\right)(\mu_m-r_f)}{\sigma_m^2} = 0 \rightarrow \frac{\mu_i-r_f}{\sigma_m} = \frac{\sigma_{i,M}(\mu_m-r_f)}{\sigma_m^3} \rightarrow \mu_i = \frac{\sigma_{i,M}}{\sigma_m^2} (\mu_m-r_f) $$

We can define $\beta_i = \frac{\sigma_{i,M}}{\sigma_m^2}$, leading us to the final, familiar CAPM equation: $$\forall i,\quad \mu_i - r_f = \beta_i(\mu_m - r_f)$$

#### Appendix for $\sigma'_m = \frac{\partial \sigma_m}{\partial \omega_i}$

Note that $\sigma_m = (\sigma_m^2)^{1/2}$, and $\sigma_m^2 = \sum_{i,j} \omega_i \omega_j \sigma_{ij}$, so

$$\sigma'_m = \frac{1}{2(\sigma_m^2)^{1/2}} \left(2\sum_j \omega_j \sigma_{ij} \right)$$

Using the fact that $\sigma_{i,M} = \text{Cov}[r_i,r_m] = \text{Cov}\left[r_i, \sum_i \omega_i r_i\right] = \sum_j \omega_i \sigma_{ij}$, we get:

$$\sigma'_m = \frac{\sigma_{i,M}}{\sigma_m}$$

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.