Distributionally Robust CVaR
Worst-case Conditional Value-at-Risk over a Wasserstein ball of probability distributions centred at the empirical return distribution. Hedges directly against return-distribution misspecification, which is exactly the failure mode ordinary CVaR optimisation is most vulnerable to.
Overview
Standard CVaR optimisation (Rockafellar and Uryasev, 2000, 2002) computes the expected loss in the worst -fraction of scenarios under a single estimated return distribution. The estimator works well when history is representative of the future, but it is brittle precisely when an investor needs tail-risk control: in regime breaks, in unprecedented stress, and when the sample is short relative to the dimension of the universe.
Distributionally Robust Optimisation (DRO) addresses this fragility by explicitly recognising that the empirical distribution is just one estimate. Instead of minimising expected loss under one distribution, DRO minimises the worst-case expected loss over an entire ambiguity set of distributions - here, a Wasserstein ball centred at the empirical distribution. Esfahani and Kuhn (2018) gave a tractable convex reformulation that turns the inner worst-case problem into a finite-dimensional cone programme, which made the approach practical for portfolio optimisation.
The radius of the Wasserstein ball is the single hyperparameter and acts as the "robustness budget": at the formulation collapses back to the sample objective, which here is the mean loss plus the sample CVaR (see below); as grows the optimiser hedges against ever-larger deviations from the empirical distribution.
Mathematical Formulation
Notation
- - empirical distribution of returns over historical scenarios
- - Wasserstein ball of radius
- - CVaR confidence level (commonly 0.95 or 0.99; fixed at 0.95 here)
- - portfolio loss
Worst-case CVaR
The inner supremum scans every distribution within Wasserstein distance of the empirical distribution and picks the one that produces the worst CVaR for the candidate weight vector. The outer min then chooses to minimise that worst case.
Tractable reformulation (Esfahani & Kuhn, 2018)
The inner worst-case problem admits a finite-dimensional convex reformulation when the loss function is piecewise-linear in returns. The objective that runs is a mean-CVaR utility with risk aversion . Through the Rockafellar-Uryasev form of CVaR it is the maximum of two affine pieces in , with a free threshold :
The return support is : no asset loses more than 100% in one day. With that support, Corollary 5.1 of Esfahani and Kuhn (2018) gives the program the solver receives:
The norm is the dual of the transport cost of the Wasserstein ball. Each is the multiplier of the support constraint, and is the set of weights the constraints allow. Every constraint is linear, so the program is a linear program. skfolio builds it, and CVXPY solves it with CLARABEL.
Set . The norm constraint then has no cost, and is optimal because every is non-negative. The program is then the sample objective, the mean loss plus times the sample CVaR:
The objective that runs is a mean-CVaR utility, not CVaR alone. skfolio follows the mean-risk form of Esfahani and Kuhn (2018): the worst case, over the ball, of the expected portfolio loss plus a risk-aversion multiple of CVaR. The risk aversion is fixed at 1.0. The return support is bounded below at -100%, and the scenarios are the daily returns of the run window. Per-name weight bounds, asset exclusions, and group sum limits such as sector caps pass to the estimator and enter the same program.
Calibrating the Wasserstein radius
can be set by cross-validation: split the history into in-sample and out-of-sample blocks, run the DRO programme on the in-sample block for a grid of , and select the radius whose out-of-sample CVaR is smallest. Esfahani and Kuhn (2018) provide theoretical guidance: under mild conditions, where is the dimension of the return vector and is sample size, and the resulting solution carries a finite-sample generalisation guarantee on out-of-sample CVaR.
In practice, FolioLab derives a moderate from the data so that the optimiser is meaningfully different from sample-CVaR but not so large that it collapses into an equal-weight portfolio. The base radius is one percent of the median daily asset volatility, , clipped to the interval . For daily volatilities of 1% to 3% that is 0.0001 to 0.0003. It is not a request field.
The radius you get is not always the base radius. The solve runs a retry ladder. It tries the base radius, then 2 times it, then 5 times, then 10 times, and returns the first portfolio a solver can produce. Every rung is capped at 0.05, so a base radius at or near the cap makes the later rungs identical to the first:
- Rung 1:
- Rung 2:
- Rung 3:
- Rung 4:
A portfolio returned from a later rung is built on a wider ambiguity set, so it is more conservative than the one the base radius asked for. When every rung fails, the run fails rather than returning a portfolio.
The result records the rung. Every result of this method carries a wasserstein_radius block with base_radius, applied_radius, radius_multiplier and radius_relaxed. The result page, the PDF and the Excel cover sheet state the radius, and say so when it was relaxed. A run stored before 2 November 2026 has no block.
Advantages & Limitations
Advantages
- Distributional robustness: Hedges against the dominant failure mode of sample CVaR.
- Tractable: Reformulates as a convex cone programme.
- Finite-sample guarantees, in the published method: Esfahani and Kuhn give a generalisation bound on out-of-sample CVaR for a radius chosen by their rule. The radius here is a volatility-scaled setting, so that bound is not claimed for a run.
- Single hyperparameter, derived not tuned: Only shapes the ambiguity set, and it is derived as one percent of the median daily asset volatility rather than entered on the run.
Limitations
- Conservative weights: The worst-case lens can be too defensive in calm markets.
- Computational cost: Larger universes need a conic-programming solver.
- No directional view: Cannot tilt toward expected-return forecasts.
- Sensitive to : A poorly chosen radius dominates the solution, and the retry ladder can widen it to 2, 5 or 10 times the base value when a solver fails, capped at 0.05.
References
- Mohajerin Esfahani, P., & Kuhn, D. (2018). "Data-Driven Distributionally Robust Optimization Using the Wasserstein Metric: Performance Guarantees and Tractable Reformulations." Mathematical Programming, 171(1-2), 115-166.
- Blanchet, J., Chen, L., & Zhou, X. Y. (2022). "Distributionally Robust Mean-Variance Portfolio Selection with Wasserstein Distances." Management Science, 68(9), 6382-6410.
- Pflug, G. C., & Wozabal, D. (2007). "Ambiguity in Portfolio Selection." Quantitative Finance, 7(4), 435-442.
- Rockafellar, R. T., & Uryasev, S. (2000). "Optimization of Conditional Value-at-Risk." Journal of Risk, 2(3), 21-42.
- Rockafellar, R. T., & Uryasev, S. (2002). "Conditional Value-at-Risk for General Loss Distributions." Journal of Banking & Finance, 26(7), 1443-1471.
- Palomar, D. P. (2025). Portfolio Optimization: Theory and Application. Cambridge University Press, Chapter 14 (Robust Portfolios).
- skfolio documentation -
skfolio.optimization.DistributionallyRobustCVaR.
Not investment advice. Past performance is not indicative of future results.