reserving.development_correlation()
Mack’s test for correlation between adjacent development factors
Usage
reserving.development_correlation(
triangle,
column,
ci=Ellipsis,
)(Mack 1994, appendix G; R ChainLadder’s dfCorTest) on every observed link ratio of one column of a single-segment triangle. MackFit.development_correlation tests only the link ratios a fit averaged.
Parameters
triangle: Trianglecolumn: strci: float = 0.5- The interval’s confidence level, Mack’s and R’s 50%.
Returns
DevelopmentCorrelationTest
Raises
ValueError- If the triangle has several segments or lacks the column, ci is not strictly between 0 and 1, or no pair of adjacent link columns has two origins in common and untied ranks (fewer than four ages on a square triangle).
Examples
>>> from prospicio.reserving import Triangle, development_correlation
>>> paid = [[100.0, 160.0, 180.0, 186.0, 188.0], [110.0, 170.0, 195.0, 200.0],
... [120.0, 200.0, 220.0], [130.0, 205.0], [140.0]]
>>> rows = [(2020 + w, 12 * (d + 1), v) for w, r in enumerate(paid)
... for d, v in enumerate(r)]
>>> origin, age, values = map(list, zip(*rows))
>>> tri = Triangle.from_long(origin, age, {"paid": values})
>>> dc = development_correlation(tri, "paid")
>>> [p["age"] for p in dc.pairs][12, 24]