Friday, October 26, 2012

Portfolio Optimization

During a course the question posed was to find a small portfolio of n stocks with a good Sharpe Ratio. Of course we use an MINLP to help us with that:


This model picks both n instruments and the weights. The r’s are the (daily) returns for the individual symbols and R indicates the return for the portfolio. Actually I could do this with Excel Solver for the small data set I used.

For a pure Sharp Ratio optimization problem several smart algorithms are available (e.g., However here we want a cardinality constrained version, and that makes things a little bit more difficult. For a more standard cardinality constrained mean-variance problem, an MIQP model can be formulated (also a lot of research papers with alternative algorithms for this case are available).

These “n out of m” problems tend to be difficult to solve to full optimality using MIP/MINLP solvers.

PS. Interesting paper on cardinality constrained portfolio optimization algorithm by Stanford’s Walter Murray and Howard Shek: