# How to transform a cubic optimisation problem into a quadratic for portfolio allocation

I have the following cost function for portfolio allocation:

$$w^T\mu-\frac{1}{2}\gamma w^T\Sigma w+\frac{1}{6}\gamma^2 w^TM_3(w\otimes w),$$

which considers also the co-skewness ($$M_3$$ tensor), $$\gamma$$ is the risk aversion (a constant)

This function is cubic and non convex, so I cannot use the typical convex optimisation with cvxpy in python. However, it should be possible to transform/replace the cubic term with a quadratic term and adding a new constraint in order to have a non-convex but now quadratic form, which can be solved probably more easily.

Can anyone help please to reformulate the above equation in order to make it quadratic? Can I still use cvxpy for non-convex optimisation?

This question is a follow-up to:

• I think you could use any other multivariate optimisation routine from scipy.optimize, no for this problem if you want to introduce positivity constraints on your portfolio weights. If you can make do with unconstrained weights, you can simply derive the FOCs and run some multidimensional root finder on it. NB: For some reason there seems to be an upsurge in questions related to Skew/Kurtosis based optimisation... Oct 23, 2020 at 7:22
• thanks. Well no I have plenty of contraints on my asset classes and in turn on my weighs. So I would say making this quadratic non-convex should be easier to solve it than let it cubic non-convex.. Oct 23, 2020 at 7:30
• A quadratic form $x^T A x + b^T x + c$ is convex if A is semi-positive definite. Therefore for your reformulated optimisation problem to be non-convex would require a reformulated quadratic coefficient matrix to be neither semi-positive definite, nor semi-negative definite.
– Attack68
Oct 23, 2020 at 8:50
• that is clear thanks, but I do not want to impose the reformulated optimisation problem to be convex or not..because I guess that would be even harder imposition. The point is to remove/modify the cubic term and set it as constraint to have a quadratic form. Nevermind convex or not..if the new problem will have hessian positive semidefinite thus convex is better but if not I may use some non convex optimiser for quadratic problem (I guess they exist). all I want is to make the above function quadratic somehow, if this can be done..the question is asking how to do this reformulation..thanks Oct 23, 2020 at 8:59
• I suggest to move this question over to math? Oct 24, 2020 at 4:02