Skip to main content

reserving.Benktander

The Benktander (iterated Bornhuetter–Ferguson) method: starting from

Usage

Source

reserving.Benktander()

U(0) = apriori * exposure, U(k) = latest + (1 - 1 / cdf) * U(k-1) for n_iters steps, as chainladder-python’s Benktander. n_iters=0 is the expected loss method, 1 is Bornhuetter–Ferguson, and many iterations approach the chain ladder. The steps are summed in closed form, so a large n_iters is cheap; where an origin’s cdf is below 1/2 they diverge instead.

Parameters

apriori: (float, sequence or dict) = 1.0

Expected loss ratio of the starting ultimate, positive: one for every origin, one per origin in origin order (oldest first, over the triangle’s origins or, for a latest diagonal, its origins), or a dict from origin (its label as fits report it, "2021" or "2021Q3", or an integer year) to its loss ratio. Every origin fitted needs one; a value for an origin the triangle does not have is an error. Over segments each segment takes its own origins’ values. A pandas Series is read by its index, as a dict, so df.set_index("origin")["elr"] works in any row order; one with a default RangeIndex is an error, since its order cannot be checked. A Polars Series or numpy array is a sequence. On a latest diagonal a sequence needs the rows oldest first, each origin once, and is otherwise an error, since the exposure is read by row.

n_iters: int = 1

Number of Bornhuetter–Ferguson steps.

average: (volume, simple, regression, geometric) = "volume"

How link ratios are averaged, as in ChainLadder.

sigma_interpolation: (log - linear, mack) = "log-linear"
n_periods: optional

As ChainLadder: average only the latest diagonals and leave out the highest and lowest link ratios at each age.

drop_high: optional

As ChainLadder: average only the latest diagonals and leave out the highest and lowest link ratios at each age.

drop_low: optional

As ChainLadder: average only the latest diagonals and leave out the highest and lowest link ratios at each age.

tail: (float, TailConstant, TailCurve, TailBondy or TailLogLinear)

As ChainLadder; no tail by default.

ldf: optional

A selected development pattern, as in ChainLadder: the development pattern’s factors at the ages it gives, so cdf and the share developed 1 / cdf follow it.

ldf_kind: optional

A selected development pattern, as in ChainLadder: the development pattern’s factors at the ages it gives, so cdf and the share developed 1 / cdf follow it.

ldf_weight: optional

A selected development pattern, as in ChainLadder: the development pattern’s factors at the ages it gives, so cdf and the share developed 1 / cdf follow it.

ldf_origin: optional

A selected development pattern, as in ChainLadder: the development pattern’s factors at the ages it gives, so cdf and the share developed 1 / cdf follow it.

ldf_underwriting: optional
A selected development pattern, as in ChainLadder: the development pattern’s factors at the ages it gives, so cdf and the share developed 1 / cdf follow it.

Examples

>>> from prospicio.reserving import Benktander, Triangle
>>> tri = Triangle.from_long(
...     [2020, 2020, 2021], [12, 24, 12],
...     {"paid": [100.0, 150.0, 200.0], "premium": [250.0, 250.0, 400.0]},
... )
>>> fit = Benktander(apriori=0.5, n_iters=2).fit(tri, "paid", "premium")
>>> [round(u, 2) for u in fit.ultimate]

[150.0, 288.89]

Attributes

Name Description
apriori Expected loss ratio of the starting ultimate: a float, a list in origin
average How link ratios are averaged.
drop_high Highest link ratios left out at each age.
drop_low Lowest link ratios left out at each age.
ldf The selected pattern by age, as given; None without one.
ldf_kind How ldf is expressed: "ldf", "cdf" or
ldf_origin The origin grain ldf was measured on, averaged over the fitted
ldf_underwriting The underwriting basis ldf is converted to at fit time
ldf_weight The weight on the selected factors: a number, a dict by age, or
n_iters Number of Bornhuetter–Ferguson steps.
n_periods Number of latest diagonals averaged; None uses every link ratio.
sigma_interpolation How unestimable variance parameters are filled in.
tail The tail: a constant factor as a number, otherwise its estimator.

apriori

Expected loss ratio of the starting ultimate: a float, a list in origin

apriori: Any

order or a dict by origin label, as given.


average

How link ratios are averaged.

average: str


drop_high

Highest link ratios left out at each age.

drop_high: int


drop_low

Lowest link ratios left out at each age.

drop_low: int


ldf

The selected pattern by age, as given; None without one.

ldf: dict | None


ldf_kind

How ldf is expressed: "ldf", "cdf" or

ldf_kind: str | None

"percent_developed"; None without a pattern.


ldf_origin

The origin grain ldf was measured on, averaged over the fitted

ldf_origin: str | None

origins’ periods at fit time; None reads it at the origin’s age.


ldf_underwriting

The underwriting basis ldf is converted to at fit time

ldf_underwriting: UnderwritingBasis | None

(UnderwritingBasis), or None.


ldf_weight

The weight on the selected factors: a number, a dict by age, or

ldf_weight: Any | None

None without a pattern.


n_iters

Number of Bornhuetter–Ferguson steps.

n_iters: int


n_periods

Number of latest diagonals averaged; None uses every link ratio.

n_periods: int | None


sigma_interpolation

How unestimable variance parameters are filled in.

sigma_interpolation: str


tail

The tail: a constant factor as a number, otherwise its estimator.

tail: Any

Methods

Name Description
fit() Fits one loss column in every segment of a triangle, each with its
fit_diagonal() Benktander on a latest diagonal with its exposure, in every

fit()

Fits one loss column in every segment of a triangle, each with its

Usage

Source

fit(triangle, column, exposure)

own exposure.

Parameters
triangle: Triangle
column: str

The losses to project.

exposure: str
The exposure column; each origin’s latest observed cumulative value is its exposure (an incremental triangle’s is cumulated).
Returns
ExpectedLossFit
Raises
ValueError
As ExpectedLoss.fit.

fit_diagonal()

Benktander on a latest diagonal with its exposure, in every

Usage

Source

fit_diagonal(diagonal, development=None, segment_map=None)

segment, as ChainLadder.fit_diagonal projects one.

Parameters
diagonal: LatestDiagonal

With an exposure per origin.

development: ChainLadderFit = None

As ChainLadder.fit_diagonal; this method keeps its own apriori and n_iters.

segment_map: dict = None
As ChainLadder.fit_diagonal.
Returns
ExpectedLossFit