pub enum SeverityDistribution {
Lognormal {
mu: f64,
sigma: f64,
},
Pareto {
alpha: f64,
theta: f64,
},
SingleParameterPareto {
alpha: f64,
theta: f64,
},
Exponential {
mean: f64,
},
MixedExponential {
weights: Vec<f64>,
means: Vec<f64>,
},
GeneralizedPareto {
xi: f64,
beta: f64,
},
}Expand description
Parametric P&C claim severity distributions with exact closed-form Limited
Expected Values E[X ∧ L], survival functions, layer losses, and excess ratios.
Variants§
Lognormal
Lognormal ln(X) ~ N(mu, sigma^2) (sigma > 0).
Pareto
Two-parameter Pareto (Type II / Lomax): S(x) = (θ / (x + θ))^α
for x >= 0 (α > 0, θ > 0).
SingleParameterPareto
Single-parameter Pareto: S(x) = (θ / x)^α for x >= θ (α > 0, θ > 0).
Exponential
Exponential with mean θ > 0: S(x) = exp(-x / θ).
MixedExponential
Mixed Exponential (Keatinge 1999; ISO ILF standard):
S(x) = Σ_k w_k · exp(-x / θ_k) with w_k > 0, Σ w_k = 1, θ_k > 0.
Fields
GeneralizedPareto
Generalized Pareto Distribution (GPD, Peaks-Over-Threshold):
S(x) = (1 + ξ · x / β)^{-1/ξ} (β > 0, ξ >= 0 heavy/exponential tail).
Implementations§
Source§impl SeverityDistribution
impl SeverityDistribution
Sourcepub const fn lognormal(mu: f64, sigma: f64) -> Self
pub const fn lognormal(mu: f64, sigma: f64) -> Self
Construct a Lognormal severity ln(X) ~ N(mu, sigma^2).
Sourcepub const fn pareto(alpha: f64, theta: f64) -> Self
pub const fn pareto(alpha: f64, theta: f64) -> Self
Construct a two-parameter Pareto Type II (Lomax) severity.
Sourcepub const fn single_parameter_pareto(alpha: f64, theta: f64) -> Self
pub const fn single_parameter_pareto(alpha: f64, theta: f64) -> Self
Construct a single-parameter Pareto severity (x >= theta).
Sourcepub const fn exponential(mean: f64) -> Self
pub const fn exponential(mean: f64) -> Self
Construct an Exponential severity with given mean.
Sourcepub fn mixed_exponential(
weights: impl Into<Vec<f64>>,
means: impl Into<Vec<f64>>,
) -> Self
pub fn mixed_exponential( weights: impl Into<Vec<f64>>, means: impl Into<Vec<f64>>, ) -> Self
Construct a Mixed Exponential severity from weights and component means.
Sourcepub const fn gpd(xi: f64, beta: f64) -> Self
pub const fn gpd(xi: f64, beta: f64) -> Self
Construct a Generalized Pareto (GPD) severity with shape xi and scale beta.
Sourcepub fn discretize_rounding(
&self,
step: f64,
max_index: usize,
capture_upper_tail: bool,
) -> Result<Vec<f64>, ValidationError>
pub fn discretize_rounding( &self, step: f64, max_index: usize, capture_upper_tail: bool, ) -> Result<Vec<f64>, ValidationError>
Discretize onto 0, step, ..., max_index * step via the Method of Rounding.
Sourcepub fn discretize_mean_preserving(
&self,
step: f64,
max_index: usize,
) -> Result<Vec<f64>, ValidationError>
pub fn discretize_mean_preserving( &self, step: f64, max_index: usize, ) -> Result<Vec<f64>, ValidationError>
Discretize onto 0, step, ..., max_index * step via mean-preserving LEV local moment matching.
Sourcepub fn lognormal_from_mean_cv(
mean: f64,
cv: f64,
) -> Result<Self, ValidationError>
pub fn lognormal_from_mean_cv( mean: f64, cv: f64, ) -> Result<Self, ValidationError>
Construct a Lognormal distribution from ground-up mean and coefficient
of variation cv = sd / mean > 0.
Sourcepub fn validate(&self) -> Result<(), ValidationError>
pub fn validate(&self) -> Result<(), ValidationError>
Validate distribution parameters.
Sourcepub fn unbounded_mean(&self) -> Option<f64>
pub fn unbounded_mean(&self) -> Option<f64>
Ground-up unlimited mean E[X], or None when the first moment diverges
(Pareto alpha <= 1 or GPD xi >= 1).
Sourcepub fn limited_expected_value(&self, limit: f64) -> Result<f64, ValidationError>
pub fn limited_expected_value(&self, limit: f64) -> Result<f64, ValidationError>
Exact closed-form Limited Expected Value E[X ∧ limit]
(Klugman, Panjer & Willmot, Appendix A; Lee 1988).
Sourcepub fn layer_expected_loss(
&self,
attachment: f64,
limit: f64,
) -> Result<f64, ValidationError>
pub fn layer_expected_loss( &self, attachment: f64, limit: f64, ) -> Result<f64, ValidationError>
Expected loss in layer [attachment, attachment + limit]:
E[min(max(X - attachment, 0), limit)] = E[X ∧ (a + w)] - E[X ∧ a].
Sourcepub fn excess_ratio(&self, retention: f64) -> Result<f64, ValidationError>
pub fn excess_ratio(&self, retention: f64) -> Result<f64, ValidationError>
Excess ratio R(retention) = E[(X - retention)_+] / E[X] = 1 - E[X ∧ retention] / E[X].