Skip to content
All library documents

Linear Programming for Expected Shortfall-Constrained Portfolios

Article Quant Q&A · Author: Winger 14

Summary

The document explains how to maximize expected return for a portfolio subject to a limit on expected shortfall (ES), also called conditional value-at-risk. It describes an auxiliary function of portfolio weights and a threshold variable: the function is convex and continuously differentiable, and minimizing it over the threshold yields ES at the selected confidence level.

This representation makes the risk constraint suitable for efficient optimization, including a linear programming formulation when returns are represented by discrete scenarios. The cited research paper and its worked example are offered as supporting references, but the document does not provide implementation details or numerical results. The method depends on the stated scenario-based setup and does not discuss practical constraints such as transaction costs, estimation error, or portfolio bounds.

Key ideas

  • Expected shortfall can constrain portfolio return optimization.
  • An auxiliary threshold function represents expected shortfall through a convex optimization problem.
  • Minimizing the auxiliary function over its threshold variable recovers expected shortfall.
  • Discrete return scenarios support a linear programming implementation.

Tags

Full text
# Optimizing a portfolio whose risk is target expected shortfall


# Optimizing a portfolio whose risk is target expected shortfall












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.

## Answer by g g (score 5, accepted)

https://quant.stackexchange.com/a/57337

This problem can be addressed efficiently by linear programming.

An (in my opinion) even better reference than the original paper by Uryasev, Rockafeller provided by noob2 is "PORTFOLIO OPTIMIZATION WITH CONDITIONAL VALUE-AT-RISK OBJECTIVE AND CONSTRAINTS" by Pavlo Krokhmal, Jonas Palmquist, and Stanislav Uryasev in The Journal of Risk, V. 4, # 2, 2002, 11-27. It is available here.

The basic idea relies on the observation that instead of controlling the condition $ \text{ES}_\alpha(\sum w_i R_i)$ directly, it is possible to define an auxiliary function (loc.cit. formula (4)):

$$ F_\alpha(w, \zeta) = \zeta + \frac{1}{1 - \alpha}\text{E}\left[\max\left(\sum w_i R_i - \zeta, 0\right)\right].$$

The nice things about $F$ are stated in their Theorem 1.:

- $F$ is convex and $C^1$

- The minimum of $F$ with respect to $\zeta$ is the ES at level $\alpha$.

The border between doable and non-doable is in optimisation not so much linear vs. non-linear but more convex vs non-convex. This is a case in point. The authors then show in Section 7 an example which should pretty much cover your problem in spirit.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.