Inverse-Volatility Weighting
Install and import#
npm install fintech-algorithmsimport { inverseVolatilityWeights } from "fintech-algorithms/portfolio-construction/risk-allocation/inverse-volatility-weighting";Signature#
inverseVolatilityWeights(assetIds, standaloneVolatilities)Assigns capital in inverse proportion to each asset standalone volatility and normalizes the scores, with a covariance diagnostic showing what the rule leaves out.
Parameters#
| Name | Type | Notes |
|---|---|---|
assetIds | ordered `string[N]` | N >= 1, non-empty, unique; order is preserved |
standaloneVolatilities | ordered finite numeric `N`-vector | strictly positive; same declared horizon/unit |
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#
["A", "B", "C"][0.1, 0.2, 0.15]Call#
inverseVolatilityWeights(assetIds, standaloneVolatilities)Returns#
object with 6 fields: assetIds, weights, normalizedInverseVolatilityScores, sumWeights, method, status
{
"assetIds": ["A", "B", "C"],
"weights": [0.46153846153846145, 0.23076923076923073, 0.3076923076923077],
"normalizedInverseVolatilityScores": [1, 0.5, 0.6666666666666667],
"sumWeights": 0.9999999999999999,
"method": "inverse-volatility",
"status": "ok"
}Diagrams#
Calculation flow#
Input audit to risk diagnostic
flowchart LR
A[Ordered IDs + positive standalone vols] --> B{Core input audit}
B -->|invalid shape/domain| E[Structured invalid-input]
B -->|valid| C[Scale-free scores m / sigma]
C --> D[Normalize weights]
D --> W[A01 weights and w sigma products]
W --> X{Optional supplied covariance?}
X -->|no| O[Pure result: correlation-blind by definition]
X -->|yes| P[Metadata, horizon, currency, provenance audit]
P -->|split / stale FX / quantity / revision defect| Q[Blocked evidence: repair upstream input]
P -->|valid schema| S[Exact symmetry + per-diagonal scale + PSD]
S -->|failure| R[Structured diagnostic error]
S -->|valid| T[Normalize by actual s-Sigma; compute q]
T --> U{q state}
U -->|exact zero| Z[zero-risk; RC/share unavailable]
U -->|positive but near zero| N[numerically-unreliable; no division]
U -->|available| V[Signed RC and risk shares]
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#
- Palomar, *Portfolio Optimization: Theory and Application*, “Risk-Based Portfolios”
- Maillard, Roncalli, and Teïletche, “On the Properties of Equally-Weighted Risk Contributions Portfolios”
- Griveau-Billion, Richard, and Roncalli, “A Fast Algorithm for Computing High-dimensional Risk Parity Portfolios”
- Composer Knowledge Center, “Inverse Volatility Weighting”
- LAPACK `DSYEVD` documentation
- Research and evidence boundary