pricing.CollectiveModel
The collective risk model: a claim count and a severity, with layer
Usage
pricing.CollectiveModel()moments in closed form.
For the layer limit xs attachment applied to each loss, with Y the loss to the layer from one claim, the aggregate has mean E[N] E[Y] and variance E[N] Var[Y] + Var[N] E[Y]**2.
Parameters
frequency: (Poisson, NegativeBinomial or Binomial)severity: (Lognormal, Grid, Pareto, PiecewisePareto, LogAffinePareto or GeneralizedPareto)
Examples
>>> from prospicio.distributions import Pareto, claim_count
>>> from prospicio.pricing import CollectiveModel
>>> m = CollectiveModel(claim_count(2.0, 1.5), Pareto(1e6, 2.0))
>>> round(m.layer_mean(4e6, 1e6))1600000
>>> m.excess_frequency(2e6)0.5
Methods
| Name | Description |
|---|---|
| excess_frequency() | Expected number of losses above x. |
| layer_mean() | Expected aggregate loss to the layer limit xs attachment. |
| layer_std() | Standard deviation of the aggregate loss to the layer. |
| layer_variance() | Variance of the aggregate loss to the layer. |
| mean() | Expected aggregate loss. |
| simulate() | n_sims simulated years of individual losses. |
| variance() | Variance of the aggregate loss. |
excess_frequency()
Expected number of losses above x.
Usage
excess_frequency(x)Parameters
x: float
Returns
float
layer_mean()
Expected aggregate loss to the layer limit xs attachment.
Usage
layer_mean(limit, attachment)Parameters
limit: float-
inffor an unlimited layer. attachment: float
Returns
float
layer_std()
Standard deviation of the aggregate loss to the layer.
Usage
layer_std(limit, attachment)Parameters
limit: floatattachment: float
Returns
float
layer_variance()
Variance of the aggregate loss to the layer.
Usage
layer_variance(limit, attachment)Parameters
limit: floatattachment: float
Returns
float
mean()
Expected aggregate loss.
Usage
mean()Returns
float
simulate()
n_sims simulated years of individual losses.
Usage
simulate(n_sims, seed)Parameters
n_sims: intseed: int
Returns
EventSet
variance()
Variance of the aggregate loss.
Usage
variance()Returns
float