chainladder-python icon indicating copy to clipboard operation
chainladder-python copied to clipboard

DevelopmentConstant() Truncates LDFs in the Tail

Open kennethshsu opened this issue 2 years ago • 0 comments

If the a DevelopmentConstant() takes in ldfs, and the triangle applied is smaller (or shorter in length) than the constant, the rest of the constant is discarded.

Sample code:

paid_patterns = {12: 1.489, 24: 1.306, 36: 1.187, 48: 1.009, 60: 1.067, 72: 1.046}
paid_pattern = cl.DevelopmentConstant(patterns=paid_patterns, style="ldf")

raa = cl.load_sample("raa")
raa_small = raa[raa.valuation.year <= 1986]

cl.DevelopmentConstant(patterns=paid_patterns, style="ldf").fit_transform(
    raa_small
).ldf_

A better solution is convert all factors to CDFs first inside DevelopmentConstant(), then apply what is needed to the triangle object.

kennethshsu avatar May 20 '22 21:05 kennethshsu