IncrementalAdditive#

class chainladder.IncrementalAdditive(trend=0.0, n_periods=-1, average='volume', future_trend=0, drop=None, drop_high=None, drop_low=None, drop_above=inf, drop_below=-inf, drop_valuation=None, preserve=1)[source]#

The Incremental Additive Method.

This estimator implements the additive method of Schmidt (2006), Section 4.7: expected incremental losses satisfy E[Z_{i,k}] = eta_i * gamma_k, where eta_i is exposure (sample_weight, e.g. premium) for accident year i and gamma_k is an incremental loss ratio at development age k that is common to all accident years. The fitted zeta_ estimates those common gamma_k; unobserved incrementals are completed as zeta_ * sample_weight. Dollar incremental_ differ by origin because exposure differs; implied multiplicative ldf_ are derived from the completed incremental triangle and can also differ by origin.

Parameters:
trend: float (default=0.0)

Implementation extension (not in Schmidt, 2006): multiplicative trend applied to incremental losses before zeta_ is estimated, trending each development period to the triangle valuation date.

future_trend: float (default=None)

Implementation extension: trend applied when projecting incrementals beyond the valuation date into the lower triangle. If None, uses trend.

n_periods: integer, optional (default=-1)

number of origin periods to be used in the ldf average calculation. For all origin periods, set n_periods=-1

average: str optional (default=’volume’)

type of averaging to use for average incremental factor calculation. Options include ‘regression’, ‘volume’ and ‘simple’.

drop: tuple or list of tuples

Drops specific origin/development combination(s)

drop_high: bool or list of bool (default=None)

Drops highest link ratio(s) from LDF calculation

drop_low: bool or list of bool (default=None)

Drops lowest link ratio(s) from LDF calculation

drop_above: float or list of floats (default = numpy.inf)

Drops all link ratio(s) above the given parameter from incremental factor calculation

drop_below: float or list of floats (default = -numpy.inf)

Drops all link ratio(s) below the given parameter from incremental factor calculation

preserve: int (default = 1)

The minimum number of incremental factor(s) required for incremental factor calculation

drop_valuation: str or list of str (default=None)

Drops specific valuation periods. str must be date convertible.

Attributes:
ldf_: Triangle

The estimated loss development patterns

cdf_: Triangle

The estimated cumulative development patterns

tri_zeta: Triangle

The raw incrementals as a percent of exposure trended to the valuation date of the Triangle.

fit_zeta: Triangle

The raw incrementals as a percent of exposure trended to the valuation date of the Triangle. Only those used in the fitting.

zeta_: Triangle

Fitted incremental loss ratios gamma_k (common across accident years) as a percent of exposure, trended to the valuation date of the Triangle.

cum_zeta_: Triangle

The fitted cumulative percent of exposure trended to the valuation date of the Triangle

w_ndarray

The weight used in the zeta fitting

w_tri_: Triangle

Triangle of w_

sample_weight: Triangle

The exposure used to obtain incremental factor

incremental_: Triangle

A triangle of full incremental values.

References

Schmidt, K. (2006). Methods and Models of Loss Reserving Based on Run-Off Triangles: A Unifying Survey. CAS Forum, Fall 2006, Section 4.7 (Additive Method). https://www.casact.org/sites/default/files/database/forum_06fforum_273.pdf

Examples

Schmidt (2006), Example F, uses the ia_sample triangle: cumulative loss with latest exposure as sample_weight (premiums). Fitted incremental_ are dollars by origin and age; zeta_ is one pattern shared across origins; implied ldf_ can still vary by origin.

import numpy as np

tri = cl.load_sample("ia_sample")
ia = cl.IncrementalAdditive().fit(
    tri["loss"], sample_weight=tri["exposure"].latest_diagonal
)
print(np.round(ia.incremental_.values[0, 0, -1, :], 0))
print(np.round(ia.ldf_.values[0, 0, :3, :3], 4))
[1889. 1811. 1256. 1157.  740.  300.]
[[1.8531 1.3062 1.2332]
 [1.8895 1.3191 1.2336]
 [1.9233 1.3288 1.2301]]

A volume-weighted estimate of the common gamma_k across origins, multiplied by latest exposure, reproduces the fitted incrementals in the lower triangle (here at age 72), as in Schmidt’s additive predictors.

import numpy as np

tri = cl.load_sample("ia_sample")
ia = cl.IncrementalAdditive().fit(
    tri["loss"], sample_weight=tri["exposure"].latest_diagonal
)
zeta = tri["loss"].cum_to_incr().sum("origin") / tri["exposure"].sum("origin")
projected = (
    zeta.values[0, 0, 0, -1]
    * tri["exposure"].latest_diagonal.values[0, 0, -1, 0]
)
fitted = ia.incremental_.values[0, 0, -1, -1]
print(np.isclose(projected, fitted))
True

The trend and future_trend parameters are not part of Schmidt (2006); they are chainladder extensions for trending incrementals before fitting zeta_ and when projecting the lower triangle. The effect is material on projected dollars (not on cumulative link-ratio semantics).

import numpy as np

tri = cl.load_sample("ia_sample")
sw = tri["exposure"].latest_diagonal
base = cl.IncrementalAdditive().fit(tri["loss"], sample_weight=sw)
trended = cl.IncrementalAdditive(trend=0.02, future_trend=0.05).fit(
    tri["loss"], sample_weight=sw
)
print(float(np.round(base.incremental_.values[0, 0, -1, -1], 0)))
print(float(np.round(trended.incremental_.values[0, 0, -1, -1], 0)))
300.0
383.0
fit(X, y=None, sample_weight=None)[source]#

Fit the model with X.

Parameters:
XTriangle-like

Triangle to which the incremental method is applied. Triangle must be cumulative.

yNone

Ignored

sample_weight

Exposure used in the method.

Returns:
selfobject

Returns the instance itself.

transform(X)[source]#

If X and self are of different shapes, align self to X, else return self.

Parameters:
XTriangle

The triangle to be transformed

Returns:
X_newNew triangle with transformed attributes.

Inherited Methods

IncrementalAdditive.fit_transform

Fit to data, then transform it.

IncrementalAdditive.get_metadata_routing

Get metadata routing of this object.

IncrementalAdditive.get_params

Get parameters for this estimator.

IncrementalAdditive.pipe

Apply func(self, *args, **kwargs).

IncrementalAdditive.set_backend

Converts triangle array_backend.

IncrementalAdditive.set_output

Set output container.

IncrementalAdditive.set_params

Set the parameters of this estimator.

IncrementalAdditive.to_json

Serializes triangle object to json format

IncrementalAdditive.to_pickle

Serializes triangle object to pickle.