chainladder.TailCurve#
- class chainladder.TailCurve(curve='exponential', fit_period=(None, None), extrap_periods=100, errors='ignore', attachment_age=None, reg_threshold=(1.00001, None), projection_period=12)#
Allows for extraploation of LDFs to form a tail factor.
- Parameters:
- curvestr (‘exponential’, ‘inverse_power’)
The type of curve extrapolation you’d like to use
- fit_periodtuple (start, stop) or list(bool)
A tuple representing the range of ldfs to use in the curve fit. The use of
None
will use the edge of the triangle. For example, (48, None) will use development factors for age 48 and beyond. Alternatively, passing a list of booleans [True, False, …] will allow for excluding (False) any development patterns from fitting.- extrap_periodsint
Then number of development periods from attachment point to extrapolate the fit.
- errorsstr (‘raise’ or ‘ignore’)
Whether to raise an error or ignore observations that violate the distribution being fit. The most common is ldfs < 1.0 will not work in either the
exponential
orinverse_power
fits.- attachment_age: int (default=None)
The age at which to attach the fitted curve. If None, then the latest age is used. Measures of variability from original
ldf_
are retained when being used in conjunction with the MackChainladder method.- reg_thresholdtuple (lower, upper)
A tuple representing the lower and upper thresholds for the ldfs to be considered in the log regression of the tail fitting. Default lower threshold set to 1.00001 to avoid distortion caused by ldfs close to 1. Upper threshold can be used as an alternative to the fit_period start, to make the selection value based rather then period based.
- projection_periodint
The number of months beyond the latest available development age the ldf_ and cdf_ vectors should extend.
- Attributes:
- ldf_Triangle
ldf with tail applied.
- cdf_Triangle
cdf with tail applied.
- tail_DataFrame
Point estimate of tail at latest maturity available in the Triangle.
slope_
DataFrameDoes not work with munich
- interceptDataFrame
Intercept parameter of the curve fit.
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