In [ ]:
%matplotlib inline
In [ ]:
import chainladder as cl
import seaborn as sns
sns.set_style('whitegrid')
# Create a triangle
triangle = cl.load_dataset('GenIns')
# Fit a model
model = cl.Chainladder().fit(triangle)
# Develop IBNR runoff triangle
runoff = (model.full_triangle_.cum_to_incr() - triangle.cum_to_incr())
# Convert to calendar period and aggregate across all accident years
cal_yr_runoff = runoff.dev_to_val().dropna().sum(axis='origin')
# Plot results
cal_yr_runoff.T.plot(kind='bar', legend=False, color='red',
title='GenIns: IBNR Run-off', alpha=0.7) \
.set(xlabel='Calendar Year', ylabel='IBNR');