skfolio.distribution.empirical_tail_concentration#
- skfolio.distribution.empirical_tail_concentration(X, quantiles)[source]#
Compute empirical tail concentration for the two variables in X. This function computes the concentration at each quantile provided.
The lower and upper tail concentrations are estimated as:
\[ \begin{align}\begin{aligned}\lambda_L(q) = P(U_2 \le q \mid U_1 \le q)\\\lambda_U(q) = P(U_2 \ge q \mid U_1 \ge q)\end{aligned}\end{align} \]where \(U_1\) and \(U_2\) are the pseudo-observations.
- Parameters:
- Xarray-like of shape (n_observations, 2)
A 2D array with exactly 2 columns representing the pseudo-observations.
- quantilesarray-like of shape (n_quantiles,)
A 1D array of quantile levels (values between 0 and 1) at which to compute the concentration.
- Returns:
- concentrationndarray of shape (n_quantiles,)
An array of empirical tail concentration values for the given quantiles.
- Raises:
- ValueError
If X is not a 2D array with exactly 2 columns or if quantiles are not in [0, 1].
References
[1]“Quantitative Risk Management: Concepts, Techniques, and Tools”, McNeil, Frey, Embrechts (2005)