reserving.ExpectedLossFit

A fitted expected-loss method (ExpectedLoss,

Usage

reserving.ExpectedLossFit()

BornhuetterFerguson or Benktander) of every segment of a triangle column.

Per-origin lists (origins, latest, exposure, apriori, ultimate, reserve) run over the origins of each segment in turn, like the rows of to_frame(). ultimate and reserve are this method’s; chain_ladder holds the chain ladder’s. Per-age lists need a single-segment fit; for several segments use development_frame() or segment(...).

Examples

>>> from prospicio.reserving import BornhuetterFerguson, Triangle
>>> tri = Triangle.from_long(
...     [2020, 2020, 2021] * 2,
...     [12, 24, 12] * 2,
...     {"paid": [100.0, 150.0, 200.0, 10.0, 20.0, 30.0],
...      "premium": [250.0, 250.0, 400.0, 500.0, 500.0, 800.0]},
...     keys={"lob": ["Auto"] * 3 + ["Home"] * 3},
... )
>>> fit = BornhuetterFerguson(apriori=0.5).fit(tri, "paid", "premium")
>>> fit.exposure, fit.segment(lob="Home").ultimate

([250.0, 400.0, 500.0, 800.0], [20.0, 230.0])

Attributes

Name Description
apriori Expected loss ratio applied per origin.
cdf Age-to-ultimate factors, one per age, including the tail.
chain_ladder The underlying chain-ladder projection, with the chain ladder’s
development Development ages in months.
exposure Exposure per origin: the exposure column’s latest observed cumulative
index Label of each segment, as Triangle.index.
keys Names of the triangle’s key columns; empty without keys.
latest Latest observed cumulative value per origin.
ldf Age-to-age factors; factor k links age k to k + 1.
origins Origin period of each per-origin value.
reserve Reserve (ultimate minus latest) per origin.
total_reserve Total reserve across segments and origins.
total_ultimate Total ultimate across segments and origins.
ultimate This method’s ultimate per origin.

apriori

Expected loss ratio applied per origin.

apriori: list[float]


cdf

Age-to-ultimate factors, one per age, including the tail.

cdf: list[float]


chain_ladder

The underlying chain-ladder projection, with the chain ladder’s

chain_ladder: ChainLadderFit

ultimate.


development

Development ages in months.

development: list[int]


exposure

Exposure per origin: the exposure column’s latest observed cumulative

exposure: list[float]

value.


index

Label of each segment, as Triangle.index.

index: list[Any]


keys

Names of the triangle’s key columns; empty without keys.

keys: list[str]


latest

Latest observed cumulative value per origin.

latest: list[float]


ldf

Age-to-age factors; factor k links age k to k + 1.

ldf: list[float]


origins

Origin period of each per-origin value.

origins: list[str]


reserve

Reserve (ultimate minus latest) per origin.

reserve: list[float]


total_reserve

Total reserve across segments and origins.

total_reserve: float


total_ultimate

Total ultimate across segments and origins.

total_ultimate: float


ultimate

This method’s ultimate per origin.

ultimate: list[float]

Methods

Name Description
development_frame() One row per segment and age, as ChainLadderFit.development_frame.
segment() The fit of one segment, chosen by key values as
to_frame() One row per segment and origin: the key columns, origin,
totals_frame() One row per segment: the key columns and the segment’s total

development_frame()

One row per segment and age, as ChainLadderFit.development_frame.

Usage

development_frame()

Needs pandas.

Returns
pandas.DataFrame

segment()

The fit of one segment, chosen by key values as

Usage

segment(**keys)
Returns
ExpectedLossFit

to_frame()

One row per segment and origin: the key columns, origin,

Usage

to_frame()

latest, ultimate, reserve, exposure and apriori. Needs pandas.

Returns
pandas.DataFrame

totals_frame()

One row per segment: the key columns and the segment’s total

Usage

totals_frame()

latest, ultimate, reserve and exposure. Needs pandas.

Returns
pandas.DataFrame