reserving.OdpBootstrapFit

A fitted ODP bootstrap of every segment.

Usage

reserving.OdpBootstrapFit()

reserves is one joint distribution with the triangle’s keys and "origin" as dimensions, so reserves.aggregate(["lob"]) keeps the dependence between segments. Per-origin lists run over the origins of each segment in turn, like the rows of to_frame() and the components of reserves. fitted, residuals and scale need a single-segment fit; for several segments use segment(...) or totals_frame(). fitted and residuals are nested lists indexed [origin][development], like one segment of Triangle.values, with nan where the triangle is not observed.

Attributes

Name Description
chain_ladder The deterministic volume-weighted chain ladder the bootstrap is
development Development ages in months.
fitted Fitted incremental values, [origin][development].
index Label of each segment, as Triangle.index.
keys Names of the triangle’s key columns; empty without keys.
origins Origin period of each per-origin value and reserve component.
reserves Joint distribution of the reserve (the sum of future incremental
residuals Adjusted Pearson residuals (x - m) / sqrt(|m|) * sqrt(n / (n - p)),
scale The scale parameter phi: the sum of squared unadjusted residuals

chain_ladder

The deterministic volume-weighted chain ladder the bootstrap is

chain_ladder: ChainLadderFit

centred on.


development

Development ages in months.

development: list[int]


fitted

Fitted incremental values, [origin][development].

fitted: list[list[float]]


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]


origins

Origin period of each per-origin value and reserve component.

origins: list[str]


reserves

Joint distribution of the reserve (the sum of future incremental

reserves: PredictiveDistribution

values) by segment and origin: the triangle’s keys and "origin" are its dimensions, one component per segment and origin, one row per simulation. Its mean and quantile describe the total reserve. Columns of draw_matrix() follow origins.


residuals

Adjusted Pearson residuals (x - m) / sqrt(|m|) * sqrt(n / (n - p)),

residuals: list[list[float]]

[origin][development]; nan where not observed or where the fitted value is zero.


scale

The scale parameter phi: the sum of squared unadjusted residuals

scale: float

over the degrees of freedom n - p.

Methods

Name Description
development_frame() The chain ladders’ development factors, one row per segment and
segment() The bootstrap of one segment, chosen by key values as
to_frame() One row per segment and origin: the key columns, origin, the
totals_frame() One row per segment: the key columns, the chain ladder’s totals, the

development_frame()

The chain ladders’ development factors, one row per segment and

Usage

development_frame()

age, as ChainLadderFit.development_frame. Needs pandas.

Returns
pandas.DataFrame

segment()

The bootstrap of one segment, chosen by key values as

Usage

segment(**keys)

ChainLadderFit.segment, with its part of the joint reserves (same dimensions).

Returns
OdpBootstrapFit

to_frame()

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

Usage

to_frame()

chain ladder’s latest, ultimate and reserve, and the mean and std_dev of the bootstrapped reserve. Needs pandas.

Returns
pandas.DataFrame

totals_frame()

One row per segment: the key columns, the chain ladder’s totals, the

Usage

totals_frame()

scale, and the mean and std_dev of the segment’s bootstrapped total reserve. Needs pandas.

Returns
pandas.DataFrame