Given a portfolio of $n$ assets, mean returns vector $\mu$, covariance matrix $K$, one can calculate the portfolio weights $w^*$ that maximise the portfolio Sharpe ratio, by solving:

$$w^*=\text{argmax} \left[\frac {w^T \mu} {\sqrt {w^T K w}} \right]$$

Computing $w^*$ requires building the $K$ matrix and solving a system of quadratic equations, so it becomes computationally expensive when $n$ grows large.

However, if for some reason, we know that the asset returns are uncorrelated, the problem simplifies as: $$ K=\begin{bmatrix} \sigma_1^2 & .. & 0 \\ .. & .. & .. \\ 0 & .. & \sigma_n^2 \\ \end{bmatrix} $$

In this case, I suspect we don't need to bother with the quadratic equations, there should be straightforward formula to compute $w^*$ by just plugging in the individual $\mu_i$ and $\sigma_i$ of each asset:

$$w_i^* = f(\mu_1,\sigma_1,\dots,\mu_n,\sigma_n)$$

I am unable to derive the formula analytically. HELP!

  • 1
    $\begingroup$ The maximum Sharpe portfolio, also called the tangency portfolio in a Markowitz framework, has an analytical expression for the optimal weights $w^*$ under no short-selling constraints. See the answers to this post. Maybe that'll help you answer your question? $\endgroup$
    – Pleb
    May 12 at 18:46
  • $\begingroup$ In addition what Pleb said, the denominator becomes $\sqrt{(w_{1}^2 \sigma_{1}^2 + \ldots + w_{n}^2 \sigma^2_{n})}$ But I'm not sure if that helps with the maximization. $\endgroup$
    – mark leeds
    May 13 at 3:29

Formally (and I mean it -- see below), the optimal weights are $w=K^{-1}\mu$. The portfolio pnl then has the mean $Q=\sum_iw_i\mu_i$ and the variance $V=\sum_{ij}w_iw_jK_{ij}$. The Sharpe is $S=Q/\sqrt{V}$. In the uncorrelated case the answer is given by the Pythagorean formula $$ S=\sqrt{\sum_i\frac{\mu_i^2}{\sigma_i^2}}. $$

This answer can be very wrong in any practical context, however. This and related questions are covered in my recent book. A few highlights:

  1. Two uncorrelated assets with Sharpe ratios $S_1$ and $S_2$. The optimally weighted two-asset book has the Sharpe $\sqrt{S_1^2+S_2^2}$.
  2. If the asserts are correlated, there is geometric formula involving the circumcircle of a triangle built on the two Sharpes. If the correlation between the two assets is sufficiently positive, the optimal weight of the weaker asset can be negative.
  3. The case of multiple (say, fewer than 10000) correlated assets is not actually computationally expensive. A LAPACK matrix inversion in C or numpy would probably take under a few seconds or less.
  4. A more serious issue is the curse of dimensionality (aka as bad sampling of covariance, overfitting, etc) making the optimal combining of multiple assets (or strategies, for that matter) tricky and requiring some regularization. This part is hard to formalize and requires a degree of a prior inductive bias and experience.
  • $\begingroup$ @@Michael-Isichenko thanks and congrats for the book! I agree, the curse of dimensionality makes most of this sophistication useless (noise fitting). Do you think that forcing the assumption that assets are uncorrelated helps reduce noise fitting when optimising the portfolio? It's the same idea of forcing linear regression, instead of including quadratic terms... $\endgroup$
    – elemolotiv
    Sep 13 at 9:59
  • 1
    $\begingroup$ @elemolotiv: I think matrix inversion is not something you would call a sophistication. Handling noise and correlations is, and it is somewhat unavoidable in practice. Correlation of assets is always important: there are effectively fewer of them than we think. The more common way of handling correlations (and noise at the same time) is imposing a factor-model structure on the N x N covariance which is represented as a diagonal plus low rank (K << N). Check MSCI Barra for factor models. A byproduct of this "shrinkage" is O(NK^2) matrix inversion complexity vs original O(N^3). $\endgroup$ Sep 13 at 10:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.