ValuationCorrelation

ValuationCorrelation#

class chainladder.ValuationCorrelation(triangle: Triangle, p_critical: float = 0.1, total: bool = True)[source]#

Mack (1997) test for calendar year effect.A calendar period has impact across developments if the probability of the number of small (or large) development factors, Z, in that period occurring randomly is less than p_critical

Parameters:
triangle: Triangle

Triangle on which to test whether the calendar effects violate independence requirements of the chainladder method.

p_critical: float (default=0.10)

Value between 0 and 1 representing the confidence level for the test. 0.1 implies 90% confidence.

total: boolean

Whether to calculate valuation correlation in total across all years (True) consistent with Mack 1993 or for each year separately (False) consistent with Mack 1997.

Attributes:
zTriangle or DataFrame

Z values for each Valuation Period

z_criticalTriangle or DataFrame

Boolean value for whether correlation is too high based on p_critical confidence level.

z_expectationTriangle or DataFrame

The expected value of Z.

z_varianceTriangle or DataFrame

The variance value of Z.

Examples

Mack’s second prerequisite for the chain-ladder method is that no calendar period systematically inflates or deflates link ratios (for example from a one-off reserve strengthening or a change in case reserving practice). ValuationCorrelation flags any diagonal on which the split of high versus low link ratios is unlikely under random ordering.

raa = cl.load_sample('raa')
vc = cl.ValuationCorrelation(raa, p_critical=0.1, total=False)
print(vc.z_critical)
       1982   1983   1984   1985   1986   1987   1988   1989   1990
1981  False  False  False  False  False  False  False  False  False

No diagonal crosses the 90% threshold, so the calendar-effect assumption is supported. If any cell read True you would inspect that diagonal before relying on Mack or chain-ladder ultimates.

The same test can be aggregated to a whole-triangle form (total=True, Mack 1993) instead of the per-diagonal form (total=False, Mack 1997) shown above:

vc_total = cl.ValuationCorrelation(raa, p_critical=0.1, total=True)
print(round(float(vc_total.z.iloc[0, 0]), 4))
print(bool(vc_total.z_critical.iloc[0, 0]))
14.0
False

The whole-triangle z statistic also falls inside the no-effect band, confirming the per-diagonal result.