BaseCopula
Ancestors
abc.ABC
Descendants
systematica.models.arbitrage_index.clayton.Claytonsystematica.models.arbitrage_index.frank.Franksystematica.models.arbitrage_index.gumbel.Gumbelsystematica.models.arbitrage_index.joe.Joesystematica.models.arbitrage_index.student_t.StudentT
Instance variables
-
model_name: str: Model name, incl. fitted rotation -
dependence: float: Estimate the parameters from copulas and the Kendall rank correlation. -
lower_tail_dependence: float: Theoretical lower tail dependence coefficient. -
upper_tail_dependence: float: Theoretical upper tail dependence coefficient. -
kendall_tau: float: Kendall’s tau correlation coefficient, with values ranging from-1(perfect disagreement) to1(perfect agreement) and0indicating no correlation. -
linear_space: numpy.ndarray: -
num: int: Number of samples to generate. Must be at least 10. Default is100. -
rotation: str | systematica.models.arbitrage_index.utils.BaseCopulaRotation: Rotations allow the copula to be adapted for different types of tail dependence. - A180rotation captures extreme co-movements in the lower tail (i.e. simultaneous extreme losses). - A90rotation captures scenarios where one variable exhibits extreme losses while the other shows extreme gains. - A270rotation captures the opposite scenario, where one variable experiences extreme gains while the other suffers extreme losses. SeeBaseCopulaRotation. If set toauto, applies best fitted rotation. Defaults toBaseCopulaRotation.R0. -
rotation_: systematica.models.arbitrage_index.utils.BaseCopulaRotation: Best fitted rotation applied to the copula model, initialized toR0(no rotation). -
sample: Tuple[numpy.ndarray, numpy.ndarray]: -
start: float: The starting value of the sequence. Must be greater than 0. Defaults to0.001. -
stop: float: The end value of the sequence. Must be less than 1. Defaults to0.999.
Methods
density
ui and vi values.
Parameters:
Returns:
cumulative_density
Returns:
arbitrage
Returns:
partial_derivative
Returns:
score
u and v are bivariate inputs (u, v) where each row represents a
bivariate observation. Both u and v must be in the interval [0, 1],
having been transformed to uniform marginals.
Returns:
probability
u and v are bivariate inputs (u, v) where each row represents a
bivariate observation. Both u and v must be in the interval [0, 1],
having been transformed to uniform marginals.set_rotation
Returns:
best_fit
u and v with rotated functions.
Handle model fitting and rotation of uniform marginals.
Parameters:
Returns:
criterion
aic) for the given copula model.
Parameters:
Returns:
Raises:
tail_concentration
- For quantiles :
- For quantiles :
- “Quantitative Risk Management: Concepts, Techniques, and Tools”, McNeil, Frey, Embrechts (2005)
Raises:
Returns:
empirical_tail_concentration
- Lower tail:
- Upper tail:
Raises:
Returns:
probability_density_matrix
Returns:
partial_derivative_matrix
Returns:
get_cross_tail_quantile_mask
1 - alpha
quantile range of the PDF values.
See np.quantile for more information.
u and v are bivariate inputs (u, v) where each row represents a
bivariate observation. In this context, u and v are evenly spaced
numbers over [start, stop, num] interval.
Returns:
get_cross_tail_triangle_mask
u and v are bivariate inputs (u, v) where each row represents a
bivariate observation. In this context, u and v are evenly spaced
numbers over [start, stop, num] interval.
Returns:
cross_tail_mask
Returns:
apply_cross_tail_concentration
Returns:
plot_tail_concentration
- Lower tail:
- Upper tail:
Returns:
plot_ecdf
Returns:
plot_heatmap
[0, 1]^2, computes the PDF, and
displays a contour plot of the PDF.
Contour levels are limited to the 97th quantile to avoid extreme
densities.
Parameters:
Returns:
plot_surface
[0, 1]^2, computes the PDF, and
displays a 3D surface plot of the PDF using Plotly.
Parameters:
Returns:
plot_contour
[0, 1]^2, computes the PDF, and
displays a contour plot of the PDF.
Contour levels are limited to the 97th quantile to avoid extreme
densities.
Parameters:
Returns:
plot_ellipse
Returns:
plot_density
Returns:
Raises:

