Take the 2-minute tour ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

I have a trading system that chooses top 10 stocks in Nasdaq 100 ranked on relative strength and some other factors. However, I'd like to take positions in only 5 of these 10 stocks based on how minimally correlated these are to others for diversification effect. How do I resolve this? I do have the correlation/covariance matrices computed. Literature seems to indicate applying weights to reduce correlations but I felt there should be a simpler solution. That said, the stocks doesn't need to be equally weighted if it is easier to compute these weights.

A computationally easier solution is preferred even if it is not completely accurate since I need to implement this in Amibroker trading software.

share|improve this question
Weighing by 1-correlation is already a pretty simple method. Could you elaborate on why that's difficult? –  chrisaycock Aug 18 '11 at 2:38
add comment

2 Answers

One simple method, based on the principles of mean-variance optimization, is to set the weights proportional to the product of the inverse of the covariance matrix and a vector of standard deviations. This implicitly assumes that the normalized expected return of each stock is equal. If you wish, you can take only the top 5 weights and set the others to zero. The actual problem you face, of selecting just 5 stocks, can be solved rigorously with an optimizer, but since it is not a quadratic program, may be difficult to solve.


A more sophisticated but very interesting additional possibility is to find the "Maximum Diversification Portfolio (MDP)", as defined in Toward Maximum Diversification (free version, hat tip vonjd). The MDP is defined as the portfolio that maximizes the Diversification Ratio (DR), which in turn is defined as the ratio of the portfolio’s weighted average volatility to its overall volatility. A follow-up paper investigates the properties of this portfolio. From the paper:

This measure [DR] embodies the very nature of diversification whereby the volatility of a long-only portfolio of assets is less than or equal to the weighted sum of the assets' volatilities. As such, the DR of a long-only portfolio is greater than or equal to one, and equals unity for a single asset portfolio. Consider for example an equal-weighted portfolio of two independent assets with the same volatility: its DR is equal to $\sqrt{2}$, and to $\sqrt{N}$ for $N$ independent assets.

$DR(\bf{w})=\frac {\sum_i{\it{w}_i\sigma_i}} {\sigma(\bf{w})}$

share|improve this answer
You could probably use DEOptim() R package to solve this complex objective function. Along the lines suggested, I would add a constraint for the max number of assets. Also, you can include in the objective function a vector corresponding to the expected returns of each stock. Since you are optimizing only over 10 stocks the algorithm would converge rapidly. –  Quant Guy Aug 24 '11 at 22:43
@QuantGuy I haven't tried this, but the paper suggests that a long-only MDP will typically have much fewer assets than the total available, so a cardinality constraint may not be necessary here. –  Tal Fishman Aug 25 '11 at 1:44
@TalFishman I've looked at replicating TOBAM's results in the past, and you're absolutely correct: an unconstrained MDP portfolio on the R1K universe typically holds 50-200 names. –  michaelv2 Mar 21 '12 at 14:32
An expanded version of Toward Maximum Diversification from 2011 can be found here: papers.ssrn.com/sol3/papers.cfm?abstract_id=1895459 –  vonjd May 27 '12 at 17:46
add comment

The problem of the selecting the best portfolio (according to some risk measure) with a limited number of assets can be formulated as a mixed integer linear or quadratic program and is reviewed in the recent paper "Portfolio selection problems in practice: a comparison between linear and quadratic optimization models". It can be solved for reasonable sizes by several of the best optimizers like CPLEX or XPRESS. However, in the case of 5 stocks out of 10 there are only 252 possible possible different subsets (namely 10 choose 5) and they could be all exaustively explored with repect to the risk measure of preference by any personal computer.

share|improve this answer
Hi Fabio, welcome to quant.SE and thanks for contributing the link to your paper. I hope you will stay to contribute to the site more broadly. –  Tal Fishman Sep 28 '11 at 0:24
Hi Tal, thanks for the welcome. Indeed, this site looks actractive to me. I work more on the theoretical side, but I would like to share ideas also with people working on the practical side and this site seems to be a good place for it. –  Fabio Sep 28 '11 at 9:28
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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