Skip to main content

reserving.layer_exposure()

A copy of the triangle with a column name: the exposure column

Usage

reserving.layer_exposure(
    triangle,
    exposure,
    shares,
    name,
)

times each origin’s layer share, so that a Bornhuetter-Ferguson or Cape Cod prior reads the layer’s exposure.

The share comes from a severity (layer_share) or from an exposure curve of prospicio.pricing (curve.layer_share(limit, attachment, mpl)): the reserving core takes shares and not curves (design note, decision 2).

Parameters

triangle: Triangle
exposure: str

The exposure (premium) column.

shares: float or list of float

One share for every origin, or one per origin, each between 0 and 1.

name: str
The new column’s name, not already a column.

Returns

Triangle

Examples

>>> from prospicio.pricing import Mbbefd
>>> from prospicio.reserving import Triangle, layer_exposure
>>> tri = Triangle.from_long(
...     [2020, 2020, 2021], [12, 24, 12],
...     {"paid": [10.0, 15.0, 11.0], "premium": [100.0, 100.0, 120.0]},
... )
>>> share = Mbbefd.swiss_re(3.0).layer_share(5e6, 5e6, 10e6)
>>> layered = layer_exposure(tri, "premium", share, "layer_premium")
>>> "layer_premium" in layered.columns

True