Selecting Sparse Stock Baskets to Track an Index
Summary
This document describes ways to select a small stock basket that tracks a broad index, framing the limit on the number of holdings as a cardinality constraint. A mixed-integer quadratic program directly handles that constraint, while a genetic algorithm is offered as another search method. Both can be computationally demanding when the candidate universe is large.
For a more flexible sparsity target, the answer suggests adding a regularization penalty, as in ridge regression or LASSO, and tuning it to encourage zero weights. It also proposes using stock-index correlations or existing index weights as optimization starting points, then examining partial correlations to identify potentially redundant stocks. A bi-objective view can compare tracking performance across different basket sizes. These are alternative optimization approaches and heuristics, not a demonstrated winning procedure: the document provides no out-of-sample tracking results, and the penalty-to-holdings relationship may change over time.
Key ideas
- A maximum number of holdings is a cardinality constraint in index-tracking optimization.
- Mixed-integer quadratic programming can impose the constraint directly but may be slow for a large stock universe.
- Regularization can encourage sparse weights when an exact holding limit is relaxed.
- Correlations and existing index weights can provide useful starting points or screening signals.
- Comparing tracking performance across basket sizes frames the task as a trade-off between sparsity and fit.
Tags
Full text
# Finding a basket of stocks that tracks an index # Finding a basket of stocks that tracks an index Given an index, let's say S&P500, I am trying to find a list of maximum n underlyings, which altogether track the index quite well. I am thinking of running a portfolio optimization algorithm, where I long the Index (weight = 1) and short the n underlyings, with the aim of minimizing portfolio variance. The output would be the weights of the underlyings. However, given there are 500 underlyings, there would be too many different combinations of underlyings, whose len(underlyings) <= n, and as a result the program would run very slowly. Is there a faster way / another way of selecting a basket of stocks that track the index well? ## Answer by John (score 3, accepted) https://quant.stackexchange.com/a/14175 The requirement that the number of stocks is less than a certain number is called a cardinality constraint. A mixed integer quadratic programming solver is the most natural approach to this type of problem. However, for 500 stocks, this can also be quite slow, for the same reason you mention above. Alternately, Matlab also has a Webinar where they use a genetic algorithm to solve an optimization problem with cardinality constraints. If these approaches are still too slow and you don't mind relaxing the strict cardinality constraint to something more loose, then you can try norm constraints (you might also see papers referring to sparse portfolios or portfolio regularization). Basically the idea is to introduce an additional penalty term into the optimization, like what is done with ridge regression or LASSO. So in this sense, if you increase the penalty term, then that will make the portfolio more sparse (more 0s). You might have to play around with the term to get the number of stocks you want (and the relationship between number of stocks and the choice of the term may not necessarily be constant over time). ## Answer by berkorbay (score 2) https://quant.stackexchange.com/a/14179 As a heuristic you can prioritize stocks with higher correlation to the index. If your starting weight vector is, for instance, normalized values of correlations, you can have a better start at optimization. You can also go with original weights in the index as a starting point (which would be roughly the market caps), and naturally I suspect the two starting points will be highly similar. Then to reach your desired number of stocks you can eliminate alternatives by checking partial correlations. Higher partial correlation may indicate similar behavior therefore potential candidates to remove. Recently a friend recommended me Graphical Lasso Report, perhaps it may help to improve your model. I might also add, it would be a nice problem if you look at it as a bi-objective problem (i.e. for different values of n, what is the performance of index representation).
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.