I don't think you can reformulate the problem as written to be quadratic, but you can "cheat", and approximate it as a quadratic problem locally. That's the general idea behind using Newton's method in optimization. If
$$
f(w) := w^T\mu-\frac{1}{2}\gamma w^T\Sigma w+\frac{1}{6}\gamma^2 w^TM_3(w\otimes w)
$$
is your optimization function, then, thanks to the Taylor series, at any $w_k \in \mathbb{R}$ with all the required derivatives defined,
$$
f(w_k) \approx f(w_k) + \nabla f(w_k)^Tw_k + \frac{1}{2}w_k^T\nabla^2f(w_k)w_k^T
$$
in some neighborhood of $w_k$. Here $\nabla f(w_k)$ and $\nabla^2 f(w_k)$ are the gradient and Hessian matrix, respectively. Under some fairly general conditions, like boundedness near the minimum, or constraints on the size of the derivative, you can show that Newton's method will converge superlinearly to a minimum.
That solves one of your two problems, which is how to deal with cubic terms. You iteratively approximate your function as a quadratic at each step, until you find a minimum. In practice, this can work quite well for a wide class of problems.
The second problem you mentioned is that the function is non-convex, which poses some risks:
- The function has local minimum, and your optimization method converges on a non-global, local minimum.
- The function has no minimum at all, and your optimization method sputters on until it hits some maximum number of steps and gives up.
There are some techniques that can be used to deal with local minimum, but there's usually not a guarantee that they will find a global minimum. Stochastic optimization methods are built to deal with this type of problem, but you don't always need the complexity these introduce. In particular, if you have some domain knowledge you can use to find a "close" initial guess of the minimum, Newton's method should converge to the global minimum when it exists.
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... $\endgroup$