Robust Mean-Variance
Install and import#
npm install fintech-algorithmsimport { robustMeanVariance } from "fintech-algorithms/portfolio-construction/bayesian-and-robust-allocation/robust-mean-variance";Signature#
robustMeanVariance(mean, covariance, uncertaintyShape, kappa, riskPenalty, maxIterations, tolerance)Optimizes against an explicit ellipsoidal uncertainty set around the mean, so the robustness claim names the uncertainty it is built to survive.
Parameters#
| Name | Type | Notes |
|---|---|---|
mean | length `n` vector | decimal return/period |
covariance | `n x n` | return²/period |
uncertaintyShape | Matrix | |
kappa | scalar | dimensionless radius |
riskPenalty | unknown | |
maxIterations | unknown | |
tolerance | unknown |
Worked example#
executed Captured by running this function on the input its own test provides. Real output of real code — but not asserted against a published figure.
Input#
[0.09, 0.05][
[0.04, 0],
[0, 0.01]
][
[0.02],
[-0.02]
]1Call#
robustMeanVariance(mean, covariance, uncertaintyShape, kappa, riskPenalty, maxIterations, tolerance)Returns#
object with 10 fields: weights, nominalReturn, uncertaintyPenalty, robustReturn, variance, objective, worstCaseMean, iterations, …
{
"weights": [0.5, 0.5],
"nominalReturn": 0.07,
"uncertaintyPenalty": 0,
"robustReturn": 0.07,
"variance": 0.0125,
"objective": 0.05750000000000001,
"worstCaseMean": [0.09, 0.05],
"iterations": 1,
"projectedGradientNorm": 0,
"status": "optimal"
}Diagrams#
Calculation flow#
Diagram
flowchart TB
N0[Declare the mean set] --> N1
N1[Project exposure] --> N2
N2[Find the worst mean] --> N3
N3[Optimize on simplex] --> N4
N4[Check stationarity]
How it works#
This page states the contract — how to call it correctly. The article explains the concept: why it works, and where it breaks.
References#
- Robust Portfolio Selection Problems — Donald Goldfarb and Garud Iyengar.
- Robust Asset Allocation — Reha H. Tütüncü and Mark Koenig.
- Estimation error and robust optimization — MOSEK ApS.
- Ellipsoidal support function