ChainLadder 0.2.0 adds Solvency II CDR functions

[This article was first published on mages' blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

ChainLadder is an R package that provides statistical methods and models for claims reserving in general insurance.

With version 0.2.0 we added new functions to estimate the claims development result (CDR) as required under Solvency II. Special thanks to Alessandro Carrato, Giuseppe Crupi and Mario Wüthrich who have contributed code and documentation.

New Features

  • New generic function CDR to estimate the one year claims development result. S3 methods for the Mack and bootstrap model have been added already:
    • CDR.MackChainLadder to estimate the one year claims development result of the Mack model without tail factor, based papers by Merz & Wüthrich (2008, 2014)
    • CDR.BootChainLadder to estimate the one year claims development result of the bootstrap model.
  • New function tweedieReserve to estimate reserves in a GLM framework, including the one year claims development result.
  • Package vignette has a new chapter on One Year Claims Development Result
  • New example data MW2008 and MW2014 form the Merz & Wüthrich (2008, 2014) papers

Changes

  • Source code development moved from Google Code to GitHub
  • as.data.frame.triangle now gives warning message when dev. period is a character.
  • Alessandro Carrato, Giuseppe Crupi and Mario Wüthrich have been added as authors, thanks to their major contribution to code and documentation.
  • Christophe Dutang, Arnaud Lacoume and Arthur Charpentier have been added as contributors, thanks to their feedback, guidance and code contribution.

Examples

The examples below use the triangle of the 2008 Merz & Wüthrich paper and illustrate how the one year claims development result can be estimated using the new CDR function for output of MackChainLadder and BootChainLadder. Also the tweedieReserve function is demonstrated, which can estimate the one year CDR as well, by setting the argument rereserving to TRUE.

For further details see package vignette and the help pages of the respective functions.

library(ChainLadder)
MW2008 # Example data from Merz & Wüthrich
# dev
# origin 1 2 3 4 5 6 7 8 9
# 1 2202584 3210449 3468122 3545070 3621627 3644636 3669012 3674511 3678633
# 2 2350650 3553023 3783846 3840067 3865187 3878744 3898281 3902425 NA
# 3 2321885 3424190 3700876 3798198 3854755 3878993 3898825 NA NA
# 4 2171487 3165274 3395841 3466453 3515703 3548422 NA NA NA
# 5 2140328 3157079 3399262 3500520 3585812 NA NA NA NA
# 6 2290664 3338197 3550332 3641036 NA NA NA NA NA
# 7 2148216 3219775 3428335 NA NA NA NA NA NA
# 8 2143728 3158581 NA NA NA NA NA NA NA
# 9 2144738 NA NA NA NA NA NA NA NA
plot(MW2008/1e3, lattice=TRUE, main="Data: MW2008",
ylab="$k", scales=list(alternating=1))
# MackChainLadder
M <- MackChainLadder(MW2008, est.sigma = "Mack")
M
## MackChainLadder(Triangle = MW2008, est.sigma = "Mack")
##
## Latest Dev.To.Date Ultimate IBNR Mack.S.E CV(IBNR)
## 1 3,678,633 1.000 3,678,633 0 0 NaN
## 2 3,902,425 0.999 3,906,803 4,378 566 0.1293
## 3 3,898,825 0.998 3,908,172 9,347 1,564 0.1673
## 4 3,548,422 0.992 3,576,814 28,392 4,157 0.1464
## 5 3,585,812 0.986 3,637,256 51,444 10,536 0.2048
## 6 3,641,036 0.970 3,752,847 111,811 30,319 0.2712
## 7 3,428,335 0.948 3,615,419 187,084 35,967 0.1923
## 8 3,158,581 0.885 3,570,445 411,864 45,090 0.1095
## 9 2,144,738 0.599 3,578,243 1,433,505 69,552 0.0485
##
## Totals
## Latest: 30,986,807.00
## Dev: 0.93
## Ultimate: 33,224,633.11
## IBNR: 2,237,826.11
## Mack.S.E 108,401.39
## CV(IBNR): 0.05
CDR(M)
## IBNR CDR(1)S.E. Mack.S.E.
## 1 0.000 0.0000 0.0000
## 2 4377.670 566.1744 566.1744
## 3 9347.477 1486.5603 1563.8075
## 4 28392.406 3923.0986 4157.2733
## 5 51444.021 9722.8598 10536.4380
## 6 111811.123 28442.6216 30319.4638
## 7 187084.178 20954.2870 35967.0384
## 8 411864.225 28119.3180 45090.1821
## 9 1433505.008 53320.8210 69552.3397
## Total 2237826.107 81080.5468 108401.3875
# ODP Bootstrap
B <- BootChainLadder(MW2008, process.distr = "od.pois")
B
## BootChainLadder(Triangle = MW2008, process.distr = "od.pois")
##
## Latest Mean Ultimate Mean IBNR IBNR.S.E IBNR 75% IBNR 95%
## 1 3,678,633 3,678,633 0 0 0 0
## 2 3,902,425 3,906,419 3,994 5,779 6,426 14,621
## 3 3,898,825 3,907,610 8,785 7,598 12,824 22,633
## 4 3,548,422 3,576,057 27,635 11,840 34,698 47,999
## 5 3,585,812 3,636,877 51,065 15,446 61,466 77,835
## 6 3,641,036 3,752,256 111,220 23,100 125,736 152,655
## 7 3,428,335 3,615,685 187,350 29,000 207,044 233,915
## 8 3,158,581 3,569,323 410,742 44,733 439,702 487,911
## 9 2,144,738 3,581,526 1,436,788 99,752 1,500,793 1,606,479
##
## Totals
## Latest: 30,986,807
## Mean Ultimate: 33,224,387
## Mean IBNR: 2,237,580
## IBNR.S.E 130,893
## Total IBNR 75%: 2,324,218
## Total IBNR 95%: 2,455,653
CDR(B)
## IBNR IBNR.S.E CDR(1)S.E CDR(1)75% CDR(1)95%
## 1 0.000 0.000 0.000 0.00 0.00
## 2 3994.007 5779.165 5779.165 6426.50 14621.00
## 3 8784.967 7597.903 5985.541 11790.83 20404.35
## 4 27634.586 11839.835 9584.609 33766.02 44194.98
## 5 51065.176 15446.155 10684.647 58052.43 69722.77
## 6 111220.383 23099.890 17000.837 122272.66 140259.60
## 7 187350.494 28999.690 19031.757 197371.74 219381.65
## 8 410741.944 44733.159 33159.681 432343.98 465312.24
## 9 1436787.957 99752.109 89549.562 1494946.24 1591057.69
## Total 2237579.515 130892.763 110071.483 2312494.10 2416815.88
# Tweedie Reserve
TW <- tweedieReserve(MW2008, rereserving = TRUE)
TW
## tweedieReserve(triangle = MW2008, rereserving = TRUE)
##
## Latest IBNR IBNR.S.E CDR(1)S.E
## 2 3902425 4309 5670.343 5670.343
## 3 3898825 8815 7545.499 5953.248
## 4 3548422 28643 12237.795 9964.051
## 5 3585812 51781 15891.087 10905.180
## 6 3641036 112576 22547.997 16926.834
## 7 3428335 187142 29876.491 19619.446
## 8 3158581 410550 43855.293 34607.594
## 9 2144738 1435644 96882.005 88652.038
## total 27308174 2239459 126305.779 109409.239

References

Michael Merz and Mario V. Wüthrich. Modelling the claims development result for solvency purposes. CAS E-Forum, Fall:542–568, 2008

Michael Merz and Mario V. Wüthrich. Claims run-off uncertainty: the full picture. SSRN Manuscript, 2524352, 2014.

Session Info

R version 3.1.3 (2015-03-09)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.2 (Yosemite)

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base     

other attached packages:
[1] ChainLadder_0.2.0 statmod_1.4.20 systemfit_1.1-14 lmtest_0.9-33    
[5] zoo_1.7-12        car_2.0-25     Matrix_1.1-5     

loaded via a namespace (and not attached):
 [1] acepack_1.3-3.3     actuar_1.1-8        cluster_2.0.1      
 [4] colorspace_1.2-6    digest_0.6.8        foreign_0.8-63     
 [7] Formula_1.2-0       ggplot2_1.0.0       grid_3.1.3         
[10] gtable_0.1.2        Hmisc_3.15-0        lattice_0.20-30    
[13] latticeExtra_0.6-26 lme4_1.1-7          MASS_7.3-39        
[16] mgcv_1.8-5          minqa_1.2.4         munsell_0.4.2      
[19] nlme_3.1-120        nloptr_1.0.4        nnet_7.3-9         
[22] parallel_3.1.3      pbkrtest_0.4-2      plyr_1.8.1         
[25] proto_0.3-10        quantreg_5.11       RColorBrewer_1.1-2 
[28] Rcpp_0.11.5         reshape2_1.4.1      rpart_4.1-9        
[31] sandwich_2.3-2      scales_0.2.4        SparseM_1.6        
[34] splines_3.1.3       stringr_0.6.2       survival_2.38-1    
[37] tools_3.1.3         tweedie_2.2.1

To leave a comment for the author, please follow the link and comment on their blog: mages' blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)