0

My optimization problem needs to have a constraint that I am not sure can be expressed in convex functions.

The vector I want to optimize is $x$ with size $m\approx 10$ . I have a tall $n \times m$ matrix $A$ where $n \approx 10^5$. I have another "weights" vector $w \geq 0$ of size $n$. I want to have a constraint such that the weighted standard deviation of $y = Ax$ be within relatively tight range. I don't mind if it's $L^1$ or $L^2$ norm. i.e. the constraint could be written as

$$20 \leq \frac{\displaystyle\sum_i w_i |y_i|}{\displaystyle\sum_i w_i} \le 20.1$$ or

$$20 \leq \sqrt{\frac{\displaystyle\sum_i w_i y^2_i}{\displaystyle\sum_i w_i}} \le 20.1 $$

so I can put into a convex programming solver. The thing is this constraint doesn't look convex to me. The function itself is convex but the $20 \leq $ constraint is not standard in convex optimization. If I express it as an equality constraint, it also doesn't look affine. Any tricks to reformate it?

I have looked up some similar problem. It somewhat looks like the portfolio optimization problem where one maximizes the return while keeping the risk below a threshold (section 1.3 of this PDF), but not exactly the same..

[EDIT] if I have to choose one constraint, $\sigma \geq \gamma_{\min}$ is actually more important than $\sigma \leq \gamma_{\max}$.

CuriousMind
  • 1,411

1 Answers1

1

I would work with the variance instead. Note that

$$ \sigma^2 = \cdots = \frac1n {\bf x}^\top {\bf A}^\top \underbrace{ \left( {\bf I}_n - \frac1n {\bf 1}_n {\bf 1}_n^\top \right) }_{\succeq {\bf O}_n} {\bf A} \,{\bf x} $$

is convex and quadratic in $\bf x$. Hence, $\sigma^2 \leq \gamma_{\max}$ is convex, whereas $\sigma^2 \geq \gamma_{\min}$ is not.

  • hm is there a trick to express the $\sigma^2 \geq \gamma_{\min}$ constraints? If I have to choose one, the min is more important than max – CuriousMind Sep 13 '21 at 00:15
  • @CuriousMind Think of function $x \mapsto x^2$. Note that $x^2 \geq 4$ has solutions $x \in (-\infty,-2] \cup [2,\infty)$, which is very much non-convex. – Rodrigo de Azevedo Sep 13 '21 at 06:04