merton.portfolio.concentration¶
Concentration metrics.
Functions¶
|
Herfindahl-Hirschman Index of a portfolio. |
|
Effective number of names |
|
Pykhtin-Dev (2002) granularity adjustment for the IRB asymptotic VaR. |
Module Contents¶
- merton.portfolio.concentration.hhi(exposures: merton._typing.ArrayLike) float[source]¶
Herfindahl-Hirschman Index of a portfolio.
\[\mathrm{HHI} = \sum_i w_i^2,\quad w_i = \frac{E_i}{\sum_j E_j}.\]Ranges in
[1/n, 1]. A perfectly diversified portfolio ofnequal exposures hasHHI = 1/n; a portfolio concentrated in one name hasHHI = 1.
- merton.portfolio.concentration.effective_n(exposures: merton._typing.ArrayLike) float[source]¶
Effective number of names
1/HHI.
- merton.portfolio.concentration.granularity_adjustment(pd: merton._typing.ArrayLike, lgd: merton._typing.ArrayLike, rho: merton._typing.ArrayLike, exposures: merton._typing.ArrayLike, *, alpha: float = 0.999) float[source]¶
Pykhtin-Dev (2002) granularity adjustment for the IRB asymptotic VaR.
Computes the leading-order correction to the Vasicek IRB VaR for finite portfolio size. Returns the additive adjustment in units of exposure fraction (so the actual VaR upper bound is
VaR_IRB(pd, lgd, rho) + granularity_adjustment(...)).Pykhtin & Dev (2002) Credit Risk in Asset Securitizations. Risk 15(5).