Diagnosing Extreme Mean-Variance Portfolio Weights
Summary
The question describes extreme long and short weights produced when mean returns are scaled by an inverse covariance matrix and then normalized to sum to one. The displayed covariance matrix has positive eigenvalues, so the example is not explained by a negative-definite covariance estimate. A very small, negative normalization denominator makes the resulting weights especially large in magnitude; the example illustrates how unstable this normalization can become.
The answers offer possible explanations, including a risk-free rate above the expected return of the minimum-variance portfolio, which can make a tangency-portfolio construction unsuitable or yield an inefficient solution. Another response makes broad claims about mean-variance methods and asset return distributions, but does not substantiate them in the discussion. The thread does not establish a definitive diagnosis for the supplied data or provide a corrected calculation. Its practical lesson is to inspect the normalization and assumptions behind the chosen portfolio formula, and to treat extreme weights as a prompt to check inputs, constraints, and model applicability.
Key ideas
- A small normalization denominator can turn otherwise moderate preliminary weights into extreme portfolio positions.
- The example reports positive covariance-matrix eigenvalues, so a negative-definite matrix does not explain the issue shown.
- A risk-free rate above the minimum-variance portfolio's expected return is offered as one possible cause of an inefficient tangency solution.
- The discussion does not verify which explanation applies to the supplied dataset.
- Broad claims about the validity of mean-variance methods in the answers are not supported with evidence in the thread.
Tags
Full text
# Mean-variance portfolio returns illogical weights
# Mean-variance portfolio returns illogical weights
I have a dataset with 5 assets.
I apply mean-variance portfolio:
```
In<-rep(1,5) #identity vector
delta <- 5 #risk aversion parameter
covariance<-cov(sample.data) #covariance matrix
mu <- colMeans(sample.data) #mean returns
mu <- t(t(mu))
#I calculate the standard mean-variance weights:
xt <- 1/delta* solve(covariance) %*% mu
m.w <- as.vector(xt) / In %*% xt %*% t(In)
```
My problem is that sometimes it can happen that the denominator: `In %*% xt #%*% t(In)` is a negative number.
Let us take the following example with 5 assets:
```
Mean returns: 6, 6, 1, 1, 1
Standard deviation of returns: 1, 1, 1, 1, 1
```
Portfolios with a mean of 6 are clearly superior, but the mean-variance calculation sometimes ends up putting large negative weights on the better assets.
This happens for the following reason:
Calculating `xt` results in:
`5.264789 6.134487 -5.267289 -3.337918 -2.79493`
The denominator (`In %*% xt #%*% t(In)`) is:
`-0.0008615427 -0.0008615427 -0.0008615427 -0.0008615427 -0.0008615427`
Since this denominator is negative and a really small number, the final weights end up being:
```
-6110.886 -7120.352 6113.787 3874.351 3244.1
```
Clearly this should be the other way round.
What am I missing?
EDIT: noob2 suggested that the problem might be that the covariance matrix is slightly negative definite, but it's not:
```
> eigen(covariance)
$values
[1] 4.90387493 0.12627889 0.11649928 0.09035977 0.07858112
$vectors
[,1] [,2] [,3] [,4] [,5]
[1,] -0.4529396 0.7235119 -0.1188464 -0.01716486 -0.50690946
[2,] -0.4664390 -0.2146771 -0.1914489 -0.81623850 0.18289445
[3,] -0.4511018 -0.6111482 -0.3089085 0.39903609 -0.41030564
[4,] -0.4289843 0.2157315 -0.2459586 0.41078039 0.73498045
[5,] -0.4356145 -0.1019909 0.8906754 0.07409282 0.03233327
```
Here's some example data with the properties described above:
https://www.dropbox.com/s/t3212c5sq7w1uug/example.Rdata?dl=0
## Answer by Dave Harris (score 2, accepted)
https://quant.stackexchange.com/a/31267
There are a couple of possibilities here. First, any "efficient" portfolio created using this algorithm can always be stochastically dominated, which implies, of course that it is impossible for it to be the efficient frontier. This is a well known defect of the model. In fact, you can prove, knowing only that, that the CAPM is a statistically invalid model in all circumstances. Most people do not have enough of the statistical fundamentals to actually know that. Using basic theorems in statistics, it is possible to show that the model specifications are always invalid.
The second is that your implied mean and standard deviation from your data are ranked in such a way that low risk stocks can get high returns and high risk stocks can get low returns. Your specific example would always cause a CAPM to fail because there is an implicit simple ordering requirement in the algorithm. Your example ties the variances, which violates a simple ordering. Your example, if the CAPM were correct, would be impossible. An error in the risk-free rate would also violate this ordering.
There is also a recent paper that derives the actual distribution of all asset classes. The distribution in either raw form or log-log form has no covariance matrix. The assets can co-move, but will violate the definition of covariance.
This implies that the covariance structure that the model is dependent on cannot mathematically happen, which in part explains the empirical stochastic dominance observed in the real world.
In 1963, Benoit Mandelbrot showed that the CAPM could not be true, empirically, but that claim has never stuck because no one could figure out why his observations should happen. Now that the distribution is known, it is obvious why his observations happened.
You can start with Mandelbrot's original paper. The Variation of Certain Speculative Prices, Benoit Mandelbrot, The Journal of Business, Vol. 36, No. 4 (Oct., 1963), pp. 394-419
## Answer by Mark Joshi (score 1)
https://quant.stackexchange.com/a/31241
this probably means that the risk-free rate is too high. If the risk-free rate is greater than the expected return of the minimal variance portfolio, the algorithm breaks and you end up with an optimally inefficient portfolio instead of an optimally efficient one.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.