# Portfolio Optimization constrained to maximum N% of short selling portfolio weights

For mean-variance portfolio optimization with short-selling allowed, but restricted to a certain percentage of the portfolio weights (lets assume N), we can constrain it in the follwoing way:

(from j=1 to n) sum[max(-wj,0)] <= N

the problem is that it is not linear and so if we add it to our mean-variance problem formulation we will no longer have a convex quadratic program.

How would you linearize it with n new decision variables?

• For each security $i$ you could have two weights $w_i^{+},w_i^{-} \ge 0$. When you are long a security $w^{+}$ is the weight and $w^{-}$ is zero, and vice versa when you are short $-w^{-}$ represents the weight and the $w^{+}$ is set to zero. Jun 13 at 17:25

First of all, your nonlinear problem involving $$max(-w_i,0)$$ is still convex albeit inconvenient for standard solvers due lack of smoothness. In addition to the slack variables mentioned in the comments, the problem of constrained short exposure can be cast in a convex form as follows: $$w=argmax(\mu^Tw)\quad s.t.\quad w^T\Sigma w=R,$$ under the additional inequality constraint $$\sum_i w_i>{\tt your\_threshold}$$. Alternatively, the risk penalty can be subtracted from the PNL utility using a risk aversion coefficient. The latter can be iterated to meet the required $${\tt GMV}=\sum_i|w_i|$$ expressed in the same units as your short exposure threshold.