@ Wellecks, it would be really interesting to see a python example of a portfolio that allowed for long and short positions, with inequality constraints that provided upper and lower bounds of x (say >= -10% & <= 10% per stock ), and equality constraints so sum(x) == target net long ( .3 or .5 typical) and sum(x.abs()) == target gross leverage (where 1.3 or 2 is typical). Would be interesting to see a min variance vs mean variance target return as you worked up above. There are plenty of examples in R but no one has provided a pythonic/CVXOPT solution.

If its helpful Boyd suggested this should be cast as a SOCP but its unclear to me.
https://groups.google.com/forum/#!searchin/cvxopt/portfolio/cvxopt/7krUdiIQ5OU/vY3G8GGX0nQJ

Regards LW

]]>