TailConstant

TailConstant#

class chainladder.TailConstant(tail=1.0, decay=0.5, attachment_age=None, projection_period=12)[source]#

Allows for the entry of a constant tail factor to LDFs.

Parameters:
tail: float

The constant to apply to all LDFs within a triangle object.

decay: float (default=0.50)

An exponential decay constant that allows for decay over future development periods. A decay rate of 0.5 sets the development portion of each successive LDF to 50% of the previous LDF.

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.

projection_period: int

The number of months beyond the latest available development age the ldf_ and cdf_ vectors should extend.

Attributes:
ldf_:

ldf with tail applied.

cdf_:

cdf with tail applied.

tail_: DataFrame

Point estimate of tail at latest maturity available in the Triangle.

See also

TailCurve

Notes

The tail constant does not support the entry of variability parameters necessary for stochastic approaches, so any usage of TailConstant will be inherently deterministic.

Examples

Applying a 5% tail factor to the RAA sample triangle. The tail_ attribute returns the point estimate of the tail at the latest maturity, while ldf_ and cdf_ are extended to include the tail.

raa = cl.load_sample('raa')
dev = cl.Development().fit_transform(raa)
tail = cl.TailConstant(tail=1.05).fit(dev)
print(tail.tail_)
       120-Ult
(All)     1.05
print(tail.cdf_)
         12-Ult    24-Ult    36-Ult    48-Ult    60-Ult    72-Ult   84-Ult    96-Ult   108-Ult  120-Ult  132-Ult
(All)  9.366246  3.122749  1.923441  1.513462  1.291708  1.160163  1.11347  1.077625  1.059677     1.05  1.02538

Using decay to control how the tail factor is distributed across future development periods. A higher decay rate retains more of the tail factor in the immediately following development period rather than spreading it out evenly. Compare the 120-132 and 132-144 LDFs below against the default decay=0.5.

tail = cl.TailConstant(tail=1.10, decay=0.75).fit(dev)
print(tail.ldf_)
          12-24     24-36     36-48     48-60     60-72     72-84     84-96    96-108   108-120   120-132   132-144
(All)  2.999359  1.623523  1.270888  1.171675  1.113385  1.041935  1.033264  1.016936  1.009217  1.023512  1.074731

Using attachment_age to attach the tail at an earlier development age than the latest available. Below, the tail is attached at age 72 instead of the default 120, so ages 84 onward are filled with the decayed tail factors rather than the original LDFs.

tail = cl.TailConstant(tail=1.05, attachment_age=72).fit(dev)
print(tail.cdf_)
         12-Ult    24-Ult  36-Ult    48-Ult    60-Ult  72-Ult   84-Ult    96-Ult  108-Ult   120-Ult   132-Ult
(All)  8.476874  2.826229  1.7408  1.369751  1.169054    1.05  1.02538  1.013216  1.00717  1.004156  1.002652

Using projection_period to extend the ldf_ and cdf_ vectors further beyond the latest available development age. Below, the projection is extended by 36 months instead of the default 12, adding two extra development columns to cdf_.

tail = cl.TailConstant(tail=1.05, projection_period=36).fit(dev)
print(tail.cdf_)
         12-Ult    24-Ult    36-Ult    48-Ult    60-Ult    72-Ult   84-Ult    96-Ult   108-Ult  120-Ult  132-Ult   144-Ult  156-Ult
(All)  9.366246  3.122749  1.923441  1.513462  1.291708  1.160163  1.11347  1.077625  1.059677     1.05  1.02538  1.013216  1.00717
fit(X, y=None, sample_weight=None)[source]#

Fit the model with X.

Parameters:
XTriangle-like

Set of LDFs to which the tail will be applied.

yIgnored
sample_weightIgnored
Returns:
selfobject

Returns the instance itself.

Inherited Methods

TailConstant.fit_transform

Fit to data, then transform it.

TailConstant.get_metadata_routing

Get metadata routing of this object.

TailConstant.get_params

Get parameters for this estimator.

TailConstant.pipe

TailConstant.set_backend

Converts triangle array_backend.

TailConstant.set_output

Set output container.

TailConstant.set_params

Set the parameters of this estimator.

TailConstant.to_json

Serializes triangle object to json format

TailConstant.to_pickle

Serializes triangle object to pickle.

TailConstant.transform

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