Skip to content
All library documents

Choosing a Two-Asset Maximum-Sharpe Portfolio Without Short Selling

Article Quant Q&A · Author: Cyrix

Summary

The document discusses how to choose weights for two risky assets to maximize the portfolio Sharpe ratio when short selling is prohibited. One answer expresses the unconstrained optimum using each asset’s Sharpe ratio, volatility, and the correlation between returns. It then describes checking whether that portfolio meets the nonnegative-weight constraint; if it does not, compare the feasible boundary portfolios, which hold a single asset or nothing. Another answer gives a simpler case-based procedure based on the signs of the unconstrained weights.

The examples establish that the unconstrained solution can recommend a negative allocation, making it infeasible under the stated constraint. The discussion assumes two assets and a specified risk-free rate and return covariance structure. Its formulas and case rules address this small setting; they do not directly provide a method for many assets or additional constraints such as leverage limits, minimum holdings, or transaction costs.

Key ideas

  • An unconstrained maximum-Sharpe portfolio may assign a negative weight even when only long positions are allowed.
  • For two assets, the unconstrained optimum depends on asset Sharpe ratios, volatilities, and return correlation.
  • If the unconstrained allocation is infeasible, evaluate the feasible boundary allocations in which one asset is excluded.
  • The described case-based solution is limited to two assets and the assumptions behind the Sharpe-ratio calculation.

Tags

Full text
# Formula for Optimal Portfolio of 2 Assets when No Shorting Allowed?


# Formula for Optimal Portfolio of 2 Assets when No Shorting Allowed?












I am looking for a formula to calculate the weights of two risky assets that produce the optimal portfolio (i.e highest Sharpe ratio).

So far I have found the following formula from a website of University of Missouri

However, this formula often produces negative weights. For example, it returns a weight of -24% for Asset A when Risk Free Rate=3%, Ra=5%, STDEVa=15%, Rb=10%, STDEVb=20%, CORRab=50%. It is probably because it allows short selling, making it not applicable in my situation. I need to find non-negative weights.

Does anyone know a formula for non-negative weights for a two-asset optimal portfolio that does not allow short selling?

Thanks.

## Answer by shabbychef (score 1)

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

First you should convince yourself that for the general case (2 or more assets), and without the no-shorting constraint, that the gradient of Sharpe with respect to portfolio weights has only two optima: a global minimum and a global maximum. Now consider the two asset case: you can express portfolio weights in polar coordinates, in which case the no-shorting constraint becomes the constraint $0 \le \theta \le \pi/2$. By simple calculus you only have to compute the global maximum; if it does not satisfy the no-shorting constraint, you need only check the two endpoints.

Now the global optimum occurs at $$ \vec{w} \propto \begin{bmatrix} \frac{1}{\sigma_1} \left(\zeta_1 - \rho \zeta_2\right)\\ \frac{1}{\sigma_2} \left(\zeta_2 - \rho \zeta_1\right)\\ \end{bmatrix}, $$ where $\zeta_i$ is the Sharpe of the $\mathrm{i}^{th}$ asset, and $\sigma_i$ is the volatility, and $\rho$ is the correlation of returns.

Then:

- If $\zeta_1, \zeta_2 \le 0$, hold nothing!

- If $\zeta_2 \le \rho \zeta_1$, then hold asset 1, and enjoy Sharpe of $\zeta_1$.

- If $\zeta_1 \le \rho \zeta_2$, then hold asset 2, and enjoy Sharpe of $\zeta_2$.

- Otherwise hold the global optimum, which has a Sharpe of $$\frac{\zeta_1^2 - 2 \rho \zeta_1 \zeta_2 + \zeta_2^2}{1 - \rho^2}.$$

Note that the 'ideal' case is that the $\zeta_i$ are both positive and $\rho \to -1$.

## Answer by Alex C (score 0)

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

For two risky assets the "no shorting allowed" problem is trivial. Compute the unconstrained solution using the formula you give and examine the result. There are 3 cases:

(1) If both weights are positive, you are lucky and you have found the solution to the no short sales allowed problem. Stop here.

(2) If one weight is negative (and the other is positive) then you cannot invest in one of the assets, so the solution is to invest 100% in the other asset (the one with the positive weight in the unconstrained solution)

(3) If both weights are negative, then the solution is to invest nothing. (If you are required to invest then just choose which of the two assets you hate the least).

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.