From: Richard Warnung on
Hello there,

I am trying to solve a problem that sounds pretty basic but it is hard
to solve.
Economically the task is to minimize variance of a portfolio of N
assets (N e.q. 200) under some linear
constraints and additionally the constraint, that at most K (K e.g.
20) assets get a weight different than zero.
Mathematically this is a quadratic minimization problem with some
linear and a cardinality constraint.

If you search the web then this is sometimes solved via (non-linear)
mixed-integer programming or various heuristics (Simmulated Annealing,
genetic algorithms, ..) , but I wonder if there is a (maybe
commercial) mathematica package that adresses exactly this problem.
Furthermore I would be thankful for hints on which interfaces to
external packages can be recommended for this task.

Thanks for your help and suggestions,
best regards
Richard