pricing.InsuranceCharge
The insurance charge and savings of an aggregate loss distribution, at
Usage
pricing.InsuranceCharge()any entry ratio: a Table M without the rows.
For aggregate losses A with mean E and an entry ratio r, the charge is phi(r) = E[max(A / E - r, 0)] and the savings psi(r) = E[max(r - A / E, 0)], with phi(r) - psi(r) = 1 - r.
Build one with InsuranceCharge.from_grid (an aggregate on a grid, from fft or panjer) or InsuranceCharge.from_sample (simulated or observed totals). With a per-occurrence limit, build it from the limited aggregate (the limited Table M) and call table_l for a Table L.
Examples
>>> from prospicio.pricing import InsuranceCharge
>>> table = InsuranceCharge.from_sample([0.0, 50.0, 100.0, 250.0])
>>> table.expected100.0
>>> table.charge(1.0), table.savings(1.0)(0.375, 0.375)
Attributes
| Name | Description |
|---|---|
| expected | What the entry ratios multiply: the expected aggregate loss, and |
| loss_elimination | A Table L’s share of expected losses removed by the limit; 0 for |
expected
What the entry ratios multiply: the expected aggregate loss, and
expected: float
for a Table L the expected loss without the limit.
loss_elimination
A Table L’s share of expected losses removed by the limit; 0 for
loss_elimination: float
any other table.
Methods
| Name | Description |
|---|---|
| charge() |
The insurance charge phi(r).
|
| from_grid() | The table of an aggregate loss distribution on a grid. |
| from_sample() | The table of a sample of aggregate losses, each equally likely: |
| savings() |
The insurance savings psi(r) = phi(r) + r - 1.
|
| table() | The table at the given entry ratios. |
| table_l() | This table of a limited aggregate as a Table L: entry ratios become |
charge()
The insurance charge phi(r).
Usage
charge(entry_ratio)Parameters
entry_ratio: float
Returns
float
from_grid()
The table of an aggregate loss distribution on a grid.
Usage
from_grid(aggregate)Parameters
Returns
InsuranceCharge
Raises
ValueError- If the grid’s mean is not positive.
Examples
>>> from prospicio.distributions import Grid
>>> from prospicio.pricing import InsuranceCharge
>>> agg = Grid(50.0, [0.25, 0.25, 0.25, 0.0, 0.0, 0.25])
>>> InsuranceCharge.from_grid(agg).charge(0.5)0.625
from_sample()
The table of a sample of aggregate losses, each equally likely:
Usage
from_sample(losses)simulated years, or the experience of a group of similar risks.
Parameters
losses: list of float- The totals, in any order.
Returns
InsuranceCharge
Raises
ValueError- If the sample is empty, holds a negative or non-finite loss, or has mean zero.
savings()
The insurance savings psi(r) = phi(r) + r - 1.
Usage
savings(entry_ratio)Parameters
entry_ratio: float
Returns
float
table()
The table at the given entry ratios.
Usage
table(entry_ratios)Parameters
entry_ratios: list of float
Returns
Examples
>>> from prospicio.pricing import InsuranceCharge
>>> t = InsuranceCharge.from_sample([0.0, 50.0, 100.0, 250.0]).table([0.0, 0.5, 1.0])
>>> t["charge"], t["savings"]([1.0, 0.625, 0.375], [0.0, 0.125, 0.375])
table_l()
This table of a limited aggregate as a Table L: entry ratios become
Usage
table_l(unlimited_expected)multiples of the unlimited expected loss, and the charge takes on the share of losses the per-occurrence limit removes.
Parameters
unlimited_expected: float- The expected aggregate loss without the limit.
Returns
InsuranceCharge
Raises
ValueError-
If
unlimited_expectedis below the limited mean or not finite, or the table is already a Table L.
Examples
>>> from prospicio.pricing import InsuranceCharge
>>> limited = InsuranceCharge.from_sample([110.0, 100.0, 0.0, 200.0])
>>> table = limited.table_l(132.5)
>>> round(table.loss_elimination, 6)0.226415
>>> table.charge(0.0)1.0