Class ConcentrationRisk
java.lang.Object
com.quantfinlib.risk.ConcentrationRisk
Concentration risk metrics over exposures (by asset, counterparty, sector,
currency, ...): Herfindahl-Hirschman index, effective number of positions,
top-N share, and single-name limit breaches.
-
Method Summary
Modifier and TypeMethodDescriptionstatic doubleeffectivePositions(double[] exposures) Effective number of equally-weighted positions: 1 / HHI.static doubleherfindahlIndex(double[] exposures) Herfindahl-Hirschman index of |exposure| shares; 1/N (diversified) .. 1 (single name).limitBreaches(Map<String, Double> exposureByGroup, double maxShare) Group keys whose share exceeds the single-name concentration limit.|Exposure| share per group key.static doubletopNShare(double[] exposures, int n) Combined |exposure| share of the largestnpositions.
-
Method Details
-
herfindahlIndex
public static double herfindahlIndex(double[] exposures) Herfindahl-Hirschman index of |exposure| shares; 1/N (diversified) .. 1 (single name). -
effectivePositions
public static double effectivePositions(double[] exposures) Effective number of equally-weighted positions: 1 / HHI. -
limitBreaches
-