CVaR Portfolio Optimisation

Rockafellar & Uryasev (2000) · Coherent Tail-Loss Minimisation
Family 01 Risk LP under scenarios Coherent

Variance penalises upside symmetrically and cannot distinguish fat-tailed from thin-tailed distributions. Conditional Value-at-Risk (CVaR, a.k.a. Expected Shortfall) measures the expected loss in the worst $100(1-\alpha)\%$ of scenarios. Rockafellar & Uryasev (2000) proved CVaR minimisation is a convex programme and, under discrete scenarios, reduces to a linear programme — unlike VaR, which is non-convex and NP-hard to optimise. The Basel III 2019 capital rules adopted Expected Shortfall explicitly, moving global banking regulation onto CVaR.

Educational Purpose
Educational demonstration of a coherent risk measure. Not investment or risk-management advice. Scenario-based CVaR optimisation is sensitive to scenario count, sampling method, and distributional assumptions. Historical model performance never implies future results.

The model

Loss distribution, VaR vs CVaR, LP reformulation

OR family: Portfolio optimisation Solver class: LP under scenarios Measure: Physical $\mathbb{P}$ Realism: ★★★ Exact (LP)

Notation

SymbolMeaning
$w \in \mathbb{R}^n$Portfolio weights, $\sum w_i = 1$, $w_i \ge 0$
$L(w, \xi)$Loss as a function of weights and scenario $\xi$
$\alpha \in (0,1)$Confidence level (typically 0.95 or 0.99)
$\text{VaR}_\alpha(L)$Value at Risk: $\inf\{x : \mathbb{P}(L \le x) \ge \alpha\}$
$\text{CVaR}_\alpha(L)$Expected loss given $L \ge \text{VaR}_\alpha$
$\xi^{(m)}$Scenario $m$ (a vector of asset returns), $m = 1, \ldots, M$
$p_m$Probability of scenario $m$ (uniform $1/M$ under i.i.d. sampling)

Risk measure definitions

Value at Risk and Conditional Value at Risk $$ \text{VaR}_\alpha(L) \;=\; \inf\bigl\{x \in \mathbb{R} : \mathbb{P}(L \le x) \ge \alpha\bigr\} $$ $$ \text{CVaR}_\alpha(L) \;=\; \mathbb{E}\bigl[\, L \;\big|\; L \ge \text{VaR}_\alpha(L) \,\bigr] $$
CVaR is the tail mean; VaR is the tail quantile. $\text{CVaR}_\alpha \ge \text{VaR}_\alpha$ always, with equality iff the loss distribution has no mass above VaR.

Rockafellar-Uryasev characterisation (2000)

The key result: CVaR has an auxiliary-variable representation that is jointly convex in $(w, t)$:

Rockafellar-Uryasev auxiliary function $$ F_\alpha(w, t) \;=\; t + \frac{1}{1 - \alpha}\, \mathbb{E}\bigl[\,\max\!\bigl(L(w,\xi) - t,\, 0\bigr)\,\bigr] $$ $$ \text{CVaR}_\alpha(L) \;=\; \min_{t \in \mathbb{R}} F_\alpha(w, t) $$
Minimising jointly over $(w, t)$ yields the CVaR-optimal portfolio without ever computing VaR explicitly. The optimal $t^* = \text{VaR}_\alpha$.

LP reformulation under discrete scenarios

Replace the expectation with a sample average over $M$ equiprobable scenarios $\xi^{(m)}$, and introduce auxiliary non-negative variables $z_m$ for the hinge. The result is a linear programme:

CVaR-optimal portfolio (LP) $$ \min_{w, \, t, \, z} \quad t + \frac{1}{(1 - \alpha)\, M} \sum_{m=1}^{M} z_m $$ $$ \text{s.t.} \quad z_m \ge L(w, \xi^{(m)}) - t \quad \forall m $$ $$ \qquad\quad z_m \ge 0 \quad \forall m $$ $$ \qquad\quad \mu^\top w \ge r_{\text{target}}, \quad \mathbf{1}^\top w = 1, \quad w_i \ge 0 $$
For linear losses $L(w, \xi) = -\xi^\top w$, the entire programme is an LP: $n + M + 1$ variables, $2M + 2 + n$ constraints. Solvable by HiGHS / CPLEX / Gurobi at moderate sizes.

Coherence (Artzner-Delbaen-Eber-Heath axioms)

A risk measure $\rho$ is coherent if it satisfies: monotonicity, subadditivity ($\rho(X+Y) \le \rho(X)+\rho(Y)$ — diversification reduces risk), positive homogeneity, and translation invariance. CVaR satisfies all four under mild regularity conditions (Rockafellar-Uryasev 2002). VaR fails subadditivity on general distributions — merging two portfolios can increase VaR — which is why regulators moved to CVaR/ES.

Interactive solver

Sample-average CVaR under Gaussian scenarios

CVaR minimiser

★★☆ Projected-gradient LP surrogate
6
1000
0.95
6%
42
CVaR$_\alpha$
VaR$_\alpha$
E[Return]
Std dev
Active assets

Histogram of portfolio losses (in %). Gold dashed line = VaR$_\alpha$ quantile. Red dashed line = CVaR$_\alpha$ (mean of losses above VaR). The right tail beyond VaR is highlighted.

Portfolio weights $w_i$ for the CVaR-optimal allocation at the chosen $(\alpha, r_\text{target})$.

Assumptions & practical notes

What the LP buys you — and what it doesn’t

Modelling assumptions

  • Discrete scenarios. The LP reformulation assumes $\xi$ takes finitely many values; real returns are continuous. Convergence rate of sample-CVaR to true CVaR is $O(1/\sqrt{M})$.
  • Single period. As with Markowitz; multi-period CVaR is a stochastic programme, not a single LP.
  • Linear losses. $L(w, \xi) = -\xi^\top w$. Non-linear losses (e.g. options, leverage caps) break linearity but the convex structure is preserved.
  • No transaction costs. Turnover constraints add linear terms to the LP without changing its class.
  • No short-selling. $w_i \ge 0$; the unconstrained variant is also LP.

CVaR vs Markowitz in one line

Markowitz minimises variance (a symmetric risk measure); CVaR minimises expected tail loss (an asymmetric, downside-only measure). For Gaussian returns with quadratic utility they coincide; for fat-tailed distributions they diverge, often substantially — CVaR portfolios shrink exposure to heavy-tailed assets that Markowitz is blind to.

Key references

Founding papers and textbooks

Rockafellar, R. T. & Uryasev, S. (2000).
Optimization of Conditional Value-at-Risk.
Journal of Risk, 2(3), 21–41. doi:10.21314/JOR.2000.038
Rockafellar, R. T. & Uryasev, S. (2002).
Conditional Value-at-Risk for General Loss Distributions.
Journal of Banking & Finance, 26(7), 1443–1471. doi:10.1016/S0378-4266(02)00271-6
Artzner, P., Delbaen, F., Eber, J.-M. & Heath, D. (1999).
Coherent Measures of Risk.
Mathematical Finance, 9(3), 203–228. doi:10.1111/1467-9965.00068
Krokhmal, P., Palmquist, J. & Uryasev, S. (2002).
Portfolio Optimization with Conditional Value-at-Risk Objective and Constraints.
Journal of Risk, 4(2), 43–68. doi:10.21314/JOR.2002.057
Pflug, G. C. & Römisch, W. (2007).
Modeling, Measuring and Managing Risk.
World Scientific. ISBN 978-981-270-740-6.
Föllmer, H. & Schied, A. (2016).
Stochastic Finance: An Introduction in Discrete Time, 4th ed.
de Gruyter. ISBN 978-3-11-046344-9.
Basel Committee on Banking Supervision (2019).
Minimum Capital Requirements for Market Risk (FRTB).
Bank for International Settlements, Standards d457. bis.org/bcbs/publ/d457 (Expected Shortfall at 97.5% adopted.)

Related sub-applications

Portfolio optimisation under three risk measures: variance (Markowitz), tail (CVaR), worst-case (robust).

Reminder
Not investment advice. Scenario quality, stationarity, and distributional assumptions all matter; model outputs are not forecasts.