Assuming I have N stocks. I want to have the following constraint in my optimization problem setup.

$|x_i| \le \alpha \sum_{j}^N |x_j|$ where $\alpha$ is known, say 0.6. The intuition here is the GMV of every optimized stock can't be more than $\alpha$ of the optimized overall GMV, to achieve a more diversified portfolio.

Assuming N = 3, then we have:

$|x_0| \le 0.6 (|x_0| + |x_1| + |x_2|)$

$|x_1| \le 0.6 (|x_0| + |x_1| + |x_2|)$

$|x_2| \le 0.6 (|x_0| + |x_1| + |x_2|)$

How do I re-formulate this in a convex way? The solve I'm using is Mosek.


  • $\begingroup$ This isn't technically an answer, because I can't immediately observe if what you are trying to do is achieveable but, since $\alpha$ seems somewhat subjective in your query would you consider readjusting this subjectivity: $ \alpha_1 \sum_i |x_i| \approx \alpha_2 ||\mathbf{x}||_2 $ Then you solve this with SOCP. $\endgroup$
    – Attack68
    Commented May 17 at 19:15
  • $\begingroup$ Thanks. Can you elaborate on how to solve $\alpha_1 \sum_i |x_i| \approx \alpha_2 || x||_{2}$ in SOCP? Following the thoughts, what about if the constraint is changed to: $x_i^2 \le \alpha \sum_{j}^N x_j^2$ Is there a way to reformulate this one? $\endgroup$
    – inf
    Commented May 17 at 19:50

1 Answer 1


The closest I have come so far is to engineer a the constraint into a quadratically constrained quadratic program (QCQP):

enter image description here

where in your case, $q_i=0$ and $r_i=0$ and, $ P_i = \mathbf{I} - \alpha \mathbf{1} $ (where $\mathbf{1}$ is a matrix of ones)

I am assuming that your objective function is probably quaudratic as well according to most portfolio optimization problems.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.