Calculating claims reserve using Python

Figure 1: Overview of claim components(Image by Author)

2.0. Data Preprocessing

Figure 2: Python script to load the required libraries and data set
Figure 3: A glimpse of the claims reserving dataset(Image by Author)

3.0. Feature engineering

Figure 4:Python script for creating paid loss triangulations
Figure 5: Triangle Summary(Image by Author)
Figure 6: Python script to generate incremental paid loss triangles by the line of business
Figure 7:Incremental paid loss triangles by the line of business(Image by Author)
Figure 8: Python script to generate cumulative paid loss triangles by the line of business
Figure 9:Cumulative paid loss triangles by the line of business(Image by Author)

3.0. Exploratory Data Analysis

Figure 10: Python script to plot the cumulative paid loss triangle
Figure 11: Cumulative paid loss development patterns by development year(Image by Author)
Figure 12: Python script for age-to-age factors(Image by Author)
Figure 13:Age-to-Age factors by the line of business(Image by Author)

4.0 Actuarial Modeling

Figure 14: Python script to test independence across calendar years
Figure 15: Results of the calendar year independence test(Image by Author)
Figure 16: Python script to test the correlation between subsequent development periods
Figure 17: Results of the development periods independence test(Image by Author)
Figure 18: Python script to perform the basic chainladder loss predictions
Figure 19: Results of the basic chain-ladder model(Image by Author)
Figure 20: Python script to generate summary results
Figure 21: Claims Reserve Summary by the line of business(Image by Author)

5.0 Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nicholas Misawo

Nicholas Misawo

Actuarial Data Science Specialist — P&C, Health | Data Evangelist | Using actuarial, data science and evidence to optimise investment risk for the common good.