Monday, May 20, 2019

Beyond 3/2 - power cones from user perspective

Here is feedback on power cones in Mosek 9 we received (published with permission of the user, anonymous for the purpose of this post).

Back to the power cones: we were excited about this feature because it allows us to implement market impact constraints with exponents that are arbitrary greater than one.

We benchmarked a simple portfolio optimization problem. The goal was to maximize an expected return on a 10 000 instrument portfolio under a market impact constraint. We chose this particular problem because it contains ten thousand power cones in order to implement the exponent part of the market impact constraint.

With Mosek 8.1 we were limited to powers 1, 3/2, 5/3 and 2 because other powers would have taken a gigantic effort to implement. With Mosek 9 all the powers above one are now easily available. As can be seen in the following timings (in seconds), in our case, the power cones are roughly as fast as the implementation using multiple rotated quadratic cones. This is great news as we were expecting a 10x degradation. Some oddities though: power 5/3 seems to be slower in Mosek 9 than in Mosek 8.1 and power 2 seemed faster in power cones than in rotated cones.

VersionMosek 8.1Mosek 9.0Mosek 9.0

ImplementationRotated ConesRotated ConesPower Cones

In conclusion, we are really happy with Mosek 9. The power cones are going to replace all the rotated cone shenanigans we previously had, they are as fast and a lot more powerful/simpler to use.

Tuesday, May 7, 2019

Mosek in Pyomo and Wasserstein distances

Pyomo is an open-source package for modeling optimization problems. You can read about its capabilities here.

The latest release of Pyomo supports MOSEK as a solver for linear, quadratic and quadratically constrained convex problems and their mixed-integer versions. This is thanks to a plugin prepared by our student employee Harun Kivril and thanks to the efforts of the Pyomo development team.

On this occasion we made two notebooks showcasing the use of our own Fusion API, of CVXPY and of Pyomo to model the same problem, namely finding the Wasserstein barycenter of discrete probability distributions, or, in our example application, averaging a set of images of the same handwritten digit.

The first notebook implements a linear Wasserstein barycenter problem in Fusion, CVXPY and Pyomo:

The second one implements an entropy-regularized version of the problem using the exponential cone capability available through Fusion and CVXPY: