DevelopmentCorrelation

DevelopmentCorrelation#

class chainladder.DevelopmentCorrelation(triangle, p_critical: float = 0.5)[source]#

Mack (1997) test for correlations between subsequent development factors. Results should be within confidence interval range otherwise too much correlation

Parameters:
triangle: Triangle

Triangle on which to estimate correlation between subsequent development factors.

p_critical: float (default=0.5)

Value between 0 and 1 representing the confidence level for the test. A value of 0.5 implies a 50% confidence. The default value is based on the example provided in the Mack 97 paper, the selection of which is justified on the basis of the test being only an approximate measure of correlations and the desire to detect correlations already in a substantial part of the triangle.

Attributes:
t_critical: DataFrame

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

t_expectation: DataFrame

Values representing the Spearman rank correlation

t_variance: float

Variance measure of Spearman rank correlation

confidence_interval: tuple

Range within which t_expectation must fall for independence assumption to be significant.

Examples

Mack (1997) lists “successive development factors are uncorrelated” as one of the assumptions underpinning the chain-ladder method. Before relying on a Chainladder or MackChainladder ultimate it is good practice to test that assumption on the triangle at hand. DevelopmentCorrelation performs Mack’s weighted Spearman rank test across consecutive development columns and exposes both the test statistic t_expectation and the no-correlation confidence_interval, so the decision is visible rather than reduced to a single boolean.

raa = cl.load_sample('raa')
dc = cl.DevelopmentCorrelation(raa, p_critical=0.5)
print(round(float(dc.t_expectation.iloc[0, 0]), 4))
print(round(float(dc.confidence_interval[0]), 4))
print(round(float(dc.confidence_interval[1]), 4))
print(bool(dc.t_critical.iloc[0, 0]))
0.0696
-0.1275
0.1275
False

The Spearman statistic 0.0696 lies inside the 50% confidence band (-0.1275, 0.1275) derived from t_variance = 2 / ((I - 2)(I - 3)), so the test does not reject independence and chain-ladder is appropriate for RAA on this dimension. See the Mack chain-ladder section of the user guide for the full assumption set.