Distributionally Robust Portfolio
Install and import#
npm install fintech-algorithmsimport { distributionallyRobustPortfolio } from "fintech-algorithms/portfolio-construction/bayesian-and-robust-allocation/distributionally-robust-portfolio";Signature#
distributionallyRobustPortfolio(mean, covariance, lossThreshold, returnFloor, tolerance, maxIterations)Minimizes the worst-case probability of a loss across every distribution sharing a given mean and covariance, subject to a return floor.
Parameters#
| Name | Type | Notes |
|---|---|---|
mean | length `n` vector | decimal return/period |
covariance | `n x n` matrix | return²/period |
lossThreshold | number | |
returnFloor | number | |
tolerance | unknown | |
maxIterations | 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.06, 0.03][
[0.04, 0],
[0, 0.01]
]0.020.04Call#
distributionallyRobustPortfolio(mean, covariance, lossThreshold, returnFloor, tolerance, maxIterations)Returns#
object with 11 fields: weights, expectedReturn, variance, riskScore, lossThreshold, returnFloor, outerIterations, status, …
{
"weights": [0.3333333333333334, 0.6666666666666665],
"expectedReturn": 0.039999999999999994,
"variance": 0.00888888888888889,
"riskScore": 1.5713484026367726,
"lossThreshold": 0.02,
"returnFloor": 0.04,
"outerIterations": 45,
"status": "optimal",
"searchBracket": [0.04, 0.04000000000788109],
"returnResidual": 6.938893903907228e-18,
"interpretation": "riskScore ranks worst-case loss probability only under the cited radial-class theorem; it is not itself an unconditional…"
}Diagrams#
Calculation flow#
Diagram
flowchart TB
N0[Declare radial class] --> N1
N1[Check return floor] --> N2
N2[Solve fixed returns] --> N3
N3[Search ratio score] --> N4
N4[Check bracket and weights]
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#
- Distributionally Robust Portfolio Optimization — I. E. Bardakci and C. M. Lagoa.
- Distributionally Robust Optimization Under Moment Uncertainty — Erick Delage and Yinyu Ye.
- Data-driven DRO using the Wasserstein metric — Peyman Mohajerin Esfahani and Daniel Kuhn.
- Equation review note