ELRF Residuals#
import chainladder as cl
import pandas as pd
This example replicates the diagnostic residuals from Barnett and Zehnwirth’s
“Best Estimates for Reserves” paper in which they describe the Extended Link
Ratio Family (ELRF) model. This Development estimator is based on the ELRF
model.
The weighted standardized residuals are contained in the std_residuals_
property of the fitted estimator. Using these, we can replicate Figure 2.6
from the paper.
raa = cl.load_sample('raa')
model = cl.Development().fit(raa)
plot1a = model.std_residuals_.T
plot1b = model.std_residuals_.mean('origin').T
plot2a = model.std_residuals_
plot2b = model.std_residuals_.mean('development')
plot3a = model.std_residuals_.dev_to_val().T
plot3b = model.std_residuals_.dev_to_val().mean('origin').T
plot4 = pd.concat((
(raa[raa.valuation < raa.valuation_date] *
model.ldf_.values).unstack().rename('Fitted Values'),
model.std_residuals_.unstack().rename('Residual')), axis=1).dropna()