TailCurve Basics#
import chainladder as cl
import pandas as pd
This example demonstrates how the inverse_power
curve generally produces more
conservative tail factors than the exponential
fit.
clrd = cl.load_sample('clrd').groupby('LOB').sum()['CumPaidLoss']
cdf_ip = cl.TailCurve(curve='inverse_power').fit(clrd)
cdf_xp = cl.TailCurve(curve='exponential').fit(clrd)
result = pd.concat((cdf_ip.tail_.rename("Inverse Power"),
cdf_xp.tail_.rename("Exponential")), axis=1)
Show code cell source
import matplotlib.pyplot as plt
plt.style.use('ggplot')
%config InlineBackend.figure_format = 'retina'
ax = result.plot(
kind='bar', title='Curve Fit Comparison',
xlabel='Industry', ylabel='Tail Factor');