I want to maximize the return of a $n$-asset portfolio under known risk: $$\max_{\{w \in \mathbb{R}^{n}|w_{1}+...+w_{n}=1\}} \; \mathbb{E}\left[\sum_{i=1}^{n}w_{i}R_{i}\right]$$ under the constraint $$ES\left(\sum_{i=1}^{n}w_{i}R_{i}\right) \le r$$ where $ES$ is the expected shortfall, also known as conditional value-at-risk (CVaR) (at some level $\alpha$) and $r$ is the desired level of risk.
$R_{i}$ denotes the return of asset $i$ and is considered a discrete random variable consisting of $m$ scenarios.
Unfortunately this is a nonlinear optimization due to the nature of the expected shortfall. Also, I can´t compute a gradient w.r.t. $w$ for the expected shortfall, so incorporating the gradient into the optimization will also be impossible. How can I efficiently implement this optimization?
Recall that the expected shortfall at level $\alpha$ is the average portfolio value in the lower $\alpha$ % quantile of all possible portfolio values.