Class ComponentVar
java.lang.Object
com.quantfinlib.risk.ComponentVar
COMPONENT VaR — the answer to the risk committee's actual question. A
portfolio VaR of $10m is a fact; "which desk owns how much of it?" is
the decision. Under the delta-normal model the Euler allocation makes
the split exact and additive:
sigma_p = sqrt(w' Σ w) marginal_i = (Σw)_i / sigma_p d sigma_p / d w_i component_i = w_i · marginal_i and Σ_i component_i = sigma_p (exact)
Scaled by the same z-score, component VaRs SUM EXACTLY to portfolio VaR — no "diversification residual" bucket to argue over. The three numbers answer three different questions:
- component VaR — how much of today's risk this position owns (the risk-budget number);
- marginal VaR — how fast VaR moves per unit added (the "should the next dollar go here?" number);
- incremental VaR — how much VaR disappears if the position is CLOSED entirely (a full re-computation without it — NOT component VaR, and the difference is the whole point: a large position that hedges the book has POSITIVE size, NEGATIVE component, and closing it RAISES VaR).
Delta-normal only, stated: allocations inherit the model's
assumptions (linear positions, normal returns). For the portfolio-level
numbers under fatter models, see VarEngine; the Euler split of
a Monte Carlo ES is a different (kernel-estimation) exercise this class
does not pretend to do. Sign convention: VaR is reported positive;
components carry sign (a hedge's component is negative). Research
lane, deterministic.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentVar.Allocationallocate(double[] weights, double[][] covariance, double confidence) Euler allocation of delta-normal VaR.static doubleincremental(double[] weights, double[][] covariance, double confidence, int i) Incremental VaR of positioni: portfolio VaR now minus VaR with the position closed (weight zeroed).
-
Method Details
-
allocate
public static ComponentVar.Allocation allocate(double[] weights, double[][] covariance, double confidence) Euler allocation of delta-normal VaR.- Parameters:
weights- position exposures (currency units), signedcovariance- return covariance matrix, symmetric, n×nconfidence- e.g. 0.99; z = Φ⁻¹(confidence)
-
incremental
public static double incremental(double[] weights, double[][] covariance, double confidence, int i) Incremental VaR of positioni: portfolio VaR now minus VaR with the position closed (weight zeroed). Positive means closing it REDUCES risk; negative means the position is a hedge and closing it raises VaR.
-