chainladder.Development

Contents

chainladder.Development#

class chainladder.Development(n_periods=-1, average='volume', sigma_interpolation='log-linear', drop=None, drop_high=None, drop_low=None, preserve=1, drop_valuation=None, drop_above=inf, drop_below=0.0, fillna=None, groupby=None)#

A Transformer that allows for basic loss development pattern selection.

Parameters:
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: string or float, optional (default = ‘volume’)

type of averaging to use for ldf average calculation. Options include ‘volume’, ‘simple’, and ‘regression’. If numeric values are supplied, then (2-average) in the style of Zehnwirth & Barnett is used for the exponent of the regression weights.

sigma_interpolation: string optional (default = ‘log-linear’)

Options include ‘log-linear’ and ‘mack’

drop: tuple or list of tuples

Drops specific origin/development combination(s)

drop_high: bool, int, list of bools, or list of ints (default = None)

Drops highest (by rank) link ratio(s) from LDF calculation If a boolean variable is passed, drop_high is set to 1, dropping only the highest value Note that drop_high is performed after consideration of n_periods (if used)

drop_low: bool, int, list of bools, or list of ints (default = None)

Drops lowest (by rank) link ratio(s) from LDF calculation If a boolean variable is passed, drop_low is set to 1, dropping only the lowest value Note that drop_low is performed after consideration of n_periods (if used)

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

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

drop_below: float or list of floats (default = 0.00)

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

preserve: int (default = 1)

The minimum number of link ratio(s) required for LDF calculation

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

Drops specific valuation periods. str must be date convertible.

fillna: float, (default = None)

Used to fill in zero or nan values of an triangle with some non-zero amount. When an link-ratio has zero as its denominator, it is automatically excluded from the ldf_ calculation. For the specific case of ‘volume’ averaging in a deterministic method, this may be reasonable. For all other averages and stochastic methods, this assumption should be avoided.

groupby:

An option to group levels of the triangle index together for the purposes of estimating patterns. If omitted, each level of the triangle index will receive its own patterns.

Attributes:
ldf_: Triangle

The estimated loss development patterns

cdf_: Triangle

The estimated cumulative development patterns

sigma_: Triangle

Sigma of the ldf regression

std_err_: Triangle

Std_err of the ldf regression

std_residuals_: Triangle

A Triangle representing the weighted standardized residuals of the estimator as described in Barnett and Zehnwirth.

Methods

fit(X[, y, sample_weight])

Fit the model with X.

fit_transform(X[, y])

Fit to data, then transform it.

get_metadata_routing()

Get metadata routing of this object.

get_params([deep])

Get parameters for this estimator.

set_backend(backend[, inplace, deep])

Converts triangle array_backend.

set_fit_request(*[, sample_weight])

Request metadata passed to the fit method.

set_output(*[, transform])

Set output container.

set_params(**params)

Set the parameters of this estimator.

to_json()

Serializes triangle object to json format

to_pickle(path[, protocol])

Serializes triangle object to pickle.

transform(X)

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

pipe