# Why is portfolio optimization a convex problem if variance is concave?

Quantitative Finance Asked on December 4, 2020

Variance is concave, so portfolio risk must be too.

The mean-variance model employs quadratic programming to optimize (minimize) portfolio risk. My understanding is that quadratic programming requires a convex objective function. So if the objective function in portfolio optimization is concave, how can it be solved with a routine that requires a convex one?

Below are my guesses:

1. Portfolio risk is in fact convex somehow due to it being weighted variance
2. It complies to the optimizer because it is not variance, but a positive-definite covariance matrix, that satisfies the convexity requirement

First, a correction is in order: the math question you cite is the variance for a Bernoulli random variable as a function of the parameter $$p$$. That is, indeed, concave in $$p$$. However, the variance of a portfolio, $$w^TSigma w$$, is not concave in $$w$$. So your initial presumption of concavity is not correct.

For a Bernoulli random variable, the uncertainty of outcomes is most uncertain for outcomes that are equally likely. That is very different from a portfolio where weights of $$1/N$$ diversify our exposure to multiple sources of risk and thus tend to reduce the total variance.

For a mean-variance portfolio optimization, we have the following problem: begin{align} max_w &~w^T R - frac{lambda}{2} w^TSigma w \ text{s.t.} &~||w||_1 = 1. end{align}

Here, the objective function is a linear function minus a quadratic form; that is concave.

If we instead use a coherent measure of risk, the objective function just becomes $$w^T R - frac{lambda}{2} text{Risk}(w)$$. Note that coherent risk measures (like CVaR/ES/TCE/ETL) are convex as discussed in Föllmer and Schied (2008).

Both of these objectives are concave. However, as Arshdeep's existing answer notes, a concave function can be made convex by multiplying by -1. Finally I should note that we do not even need convexity but often merely quasi-convexity (which might be the case for constrained optimizations).

Correct answer by kurtosis on December 4, 2020

I'm in no way a portfolio theory expert, but the negative of a convex function is concave and vice versa. You can look at minimizing a concave function as maximizing a convex function and vice versa.

Also, the optimization problem is over the weights, and not over densities (which variance is concave in as your link shows). Portfolio variance is convex in the weights.

Answered by Arshdeep Singh Duggal on December 4, 2020