Jun 12, 2013

IBNR with the Chain-Ladder Method using the R ChainLadder package

ChainLadder is a package for the R statistical environment that contains various functions for performing loss reserving for Property/Casualty/General/Non-Life Insurance. Mostly, the package's functions are intended to implement sophisticated stochastic models, but many simpler, deterministic methods are relatively easy to perform using helper functions in the package. This post will demonstrate how to calculate IBNR with the Chain-Ladder Method using the ChainLadder package.


In simplest terms, the Chain-Ladder Method estimates ultimate loss as the product ("the development") of loss known to date (referred to here as "reported loss") and a loss development factor (LDF):

EstimatedUltimateLoss = ReportedLoss * LDF            (1)

Then IBNR is the difference between estimated ultimate loss and loss known to date:

IBNR = EstimatedUltimateLoss - ReportedLoss

Sources for loss development factors (LDFs) include a formulaic calculation from a loss "triangle" (loss data arranged in wide, longitudinal format), judgmental selections based partially on data in a triangle and partially on other information, and benchmark statistics.

Aside: Algorithm (1) is more generally referred to as the Loss Development Method, particularly when the LDFs come from a source separate from the source of the ReportedLoss being "developed" (projected to ultimate value). When link ratios from a triangle are chained together to form LDFs, as is demonstrated in this post below, the "Chain-Ladder Method" merits the full meaning of its name.

For an example we will look at the data in the Institute and Faculty of Actuaries Claims Reserving Manual, Section F, "Case Estimates & the Projection of Incurred Claims", p. 9:

> ReportedLossTriangle <- matrix(c(
   2777, 3264, 3452, 3594, 3719, 3717,
   3252, 3804, 3973, 4231, 4319,   NA,
   3725, 4404, 4779, 4946,   NA,   NA,
   4521, 5422, 5676,   NA,   NA,   NA,
   5369, 6142,   NA,   NA,   NA,   NA,
   5818,   NA,   NA,   NA,   NA,   NA), nrow = 6, byrow = TRUE)

As noted in the "Loss Ratio Method" post: use NA's for future values that truly are "not available" yet; the shape of the matrix (6x6) is completely specified by "nrow=6" because 36 values are given; and R stores data in column format and expects data to be entered accordingly, so byrow=TRUE is required because the data is entered in more readable, row-wise order. 

Let's give "names" to the rows and columns to aid our comprehension of the triangle when displayed. We will assume
  • the exposure periods that generate the six rows of observations are the most recent six accident years
  • the observations in a row are taken at the end of the last day of consecutive accident years starting with 12/31/2007, and that the time between each observation and the beginning of its accident year is measured in months.
> rownames(ReportedLossTriangle) <- 2007:2012
> colnames(ReportedLossTriangle) <- 12 * (1:6)

For a final bit of accouterments, let's name the row and column dimensions:

> names(dimnames(ReportedLossTriangle)) <- c("Accident Year", "Age")

Now the triangle displays informatively:

> ReportedLossTriangle
             Age
Accident Year   12   24   36   48   60   72
         2007 2777 3264 3452 3594 3719 3717
         2008 3252 3804 3973 4231 4319   NA
         2009 3725 4404 4779 4946   NA   NA
         2010 4521 5422 5676   NA   NA   NA
         2011 5369 6142   NA   NA   NA   NA
         2012 5818   NA   NA   NA   NA   NA

Chain-Ladder LDF's are estimated as the product of "link-ratios" (also know as "report-to-report"  RTR  development factors, or "age-to-age"  ATA  development factors) derived from the triangle. To calculate the triangle's link ratios, use ChainLadder's ata function.

> library(ChainLadder) # nothing above yet required the package
> ata(ReportedLossTriangle)
             Age
Accident Year 12-24 24-36 36-48 48-60 60-72
         2007 1.175 1.058 1.041 1.035 0.999
         2008 1.170 1.044 1.065 1.021    NA
         2009 1.182 1.085 1.035    NA    NA
         2010 1.199 1.047    NA    NA    NA
         2011 1.144    NA    NA    NA    NA
         smpl 1.174 1.059 1.047 1.028 0.999
         vwtd 1.173 1.058 1.046 1.027 0.999

Note:
  1. The dimension names and row names are inherited from the triangle and the column names are automatically generated from the column names of the triangle
  2. Each column's simple average ("smpl") and volume-weighted average ("vwtd") are "attributes" of the matrix returned by the 'ata' function and are automatically displayed when shown at the console
Selecting Factors
To learn how to select the simple or volume-weighted average calculated by ata, it would be helpful to inspect the contents of the object it returns. Save the result to a variable, then use R's str function:
> y <- ata(ReportedLossTriangle)
> str(y)
 ata [1:5, 1:5] 1.18 1.17 1.18 1.2 1.14 ...
 - attr(*, "dimnames")=List of 2
  ..$ Accident Year: chr [1:5] "2007" "2008" "2009" "2010" ...
  ..$ Age          : chr [1:5] "12-24" "24-36" "36-48" "48-60" ...
 - attr(*, "class")= chr [1:2] "ata" "matrix"
 - attr(*, "smpl")= Named num [1:5] 1.174 1.059 1.047 1.028 0.999
  ..- attr(*, "names")= chr [1:5] "12-24" "24-36" "36-48" "48-60" ...
 - attr(*, "vwtd")= Named num [1:5] 1.173 1.058 1.046 1.027 0.999
  ..- attr(*, "names")= chr [1:5] "12-24" "24-36" "36-48" "48-60" ...

Let's read this:
  • y is an 'ata' object with two dimensions, of length 5 in each dimension and starting with the first five values shown
  • y has a "dimnames" attribute, which means its two dimensions are themselves "named" -- "Accident Year" and "Age" -- have the values shown (and more ...)
  • y has three additinonal attributes: 'class', 'smpl' and 'vwtd' (NoteAttributes are R's way of attaching useful additional information to an object that can be used by downstream processes for special purposes)
    • classy has two 'classes': "ata" and "matrix". In ChainLadder the "ata" class allows such objects to display as above. R's general "matrix" class allows matrices to display as a two dimensional array and perform matrix operations, among other things.
    • smpl: simple averages of the development periods' link ratios
    • vwtd: volume-weighted averages of the development periods' link ratios
To extract the contents of an attribute of an object, use the attr function with the name of the object and the name of its attribute. Let's select the set of simple average link-ratio factors and store those values in the variable rtr:
> rtr <- attr(y, "smpl")
> rtr
    12-24     24-36     36-48     48-60     60-72 
1.1741319 1.0585053 1.0470062 1.0277895 0.9994622 

Actuarially speaking, we know that the first link-ratio will be applied to the most recent accident year. However, in the previous post we saw that the getLatestCumulative function will place the most recent accident year's value last. Therefore reverse the order of the elements in rtr before accumulating their product into an LDF. Finally, if we assume that the oldest accident year is already at ultimate, then the tail factor is unity, which is the sixth factor prepended to rtr. Putting all this together, we estimate ultimate loss and IBNR.
> rtr <- c(1.000, rev(rtr))
> LDF <- cumprod(rev(rtr))
> ReportedLoss <- getLatestCumulative(ReportedLossTriangle)
> EstimatedUltimateLoss <- ReportedLoss * LDF
> IBNR <- EstimatedUltimateLoss - ReportedLoss
> IBNR
     2007      2008      2009      2010      2011      2012 
 647.2483 1048.7603 1489.9588 1915.1175 2067.9313 1958.8447 

Of course, one need not select the simple or volume-weighted average but may round the values or determine an rtr vector using supporting information and actuarial judgment. Here is an example -- note
  • the factors are entered in the "usual order" -- least mature development period first
  • a 5% tail is added at the end
  • the rtr order is reversed before the cumulative LDF is calculated
> rtr <- c(1.175, 1.06, 1.05, 1.03, 1, 1.05)
> rtr <- c(1.175, 1.06, 1.05, 1.03, 1, 1.05)
> LDF <- cumprod(rev(rtr))
> EstimatedUltimateLoss <- ReportedLoss * LDF
> IBNR <- EstimatedUltimateLoss - ReportedLoss
> IBNR
     2007      2008      2009      2010      2011      2012 
 185.8500  215.9500  403.0990  769.5237 1251.1837 2410.7387



-dmm



No comments:

Post a Comment