I'm trying to maximize my portfolio, but don't know how to deal with the constraint which is on the form

max $2u^Tx-x^T \Sigma x$

Subject to

$e^Tx = 1$

$u^Tx - m (x^T \Sigma x)^{1/2} >= c $

Where $\Sigma$ is the covariance and psd matrix and $u$ is the expected return. $e^T$ is a vector consisting of ones (1,...,1). $m$ and $c$ are constants

I don't know how to deal with the square root. (I'm using R)



$$u^Tx - m (x^T \Sigma x)^{1/2} \geq c$$ is the same as $$u^Tx-c \geq m (x^T \Sigma x)^{1/2} $$

which is the same as $$(u^Tx-c)^2 \geq m (x^T \Sigma x)$$

This has no square roots.

| improve this answer | |
  • $\begingroup$ After some thought I realized that you can't just square the both sides since $c$ and $u^T x$ can be both negative and positive and $m(x^T \Sigma x)$ is alway positive. I should have thought of that earlier... So back to square one. $\endgroup$ – user19265 Mar 17 '16 at 15:35

I thought of that at first but I was confused how to reformulate.

$(u^T x)^2 + 2 c u^Tx - c^2$

but it's the same as

$x^T (u \times u^T) x + 2 c u^Tx - c^2$

and now it's solvable. I'm using gurobi and so it needs the constraints on the form

$x^T Q x + u^Tx >= c$

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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