Skip to contents

Sample data to demonstrate how to work with triangles with a higher development period frequency than origin period frequency

Usage

data(qpaid); data(qincurred)

Format

A matrix with 12 accident years and 45 development quarters of claims costs.

Source

Made up data for testing purpose

Examples

dim(qpaid)
#> [1] 12 45
dim(qincurred)
#> [1] 12 45
op=par(mfrow=c(1,2))
ymax <- max(c(qpaid,qincurred),na.rm=TRUE)*1.05
matplot(t(qpaid), type="l", main="Paid development", 
      xlab="Dev. quarter", ylab="$", ylim=c(0,ymax))
matplot(t(qincurred), type="l", main="Incurred development", 
          xlab="Dev. quarter", ylab="$", ylim=c(0,ymax))

par(op)
## MackChainLadder expects a quadratic matrix so let's expand 
## the triangle to a quarterly origin period.
n <- ncol(qpaid)
Paid <- matrix(NA, n, n)
Paid[seq(1,n,4),] <- qpaid
M <- MackChainLadder(Paid)
#> Warning: Information: essentially no variation in development data for period(s):
#> '39-40', '40-41'
plot(M)


# We expand the incurred triangle in the same way 
Incurred <- matrix(NA, n, n)
Incurred[seq(1,n,4),] <- qincurred

# With the expanded triangles we can apply MunichChainLadder
MunichChainLadder(Paid, Incurred)
#> Warning: Information: essentially no variation in development data for period(s):
#> '39-40', '40-41'
#> MunichChainLadder(Paid = Paid, Incurred = Incurred)
#> 
#>    Latest Paid Latest Incurred Latest P/I Ratio Ult. Paid Ult. Incurred
#> 1        1,100           1,100           1.0000     1,100         1,100
#> 5        1,298           1,300           0.9985     1,300         1,300
#> 9        1,198           1,200           0.9983     1,201         1,201
#> 13       1,293           1,298           0.9961     1,301         1,301
#> 17       1,573           1,583           0.9937     1,601         1,601
#> 21       1,054           1,066           0.9887     1,100         1,100
#> 25       1,387           1,411           0.9830     1,498         1,498
#> 29       1,760           1,820           0.9670     1,995         1,995
#> 33       1,100           1,221           0.9009     1,398         1,397
#> 37         948           1,212           0.7822     1,590         1,590
#> 41         183             422           0.4336     1,086         1,086
#> 45           1              13           0.0769     1,073         1,073
#>    Ult. P/I Ratio
#> 1               1
#> 5               1
#> 9               1
#> 13              1
#> 17              1
#> 21              1
#> 25              1
#> 29              1
#> 33              1
#> 37              1
#> 41              1
#> 45              1
#> 
#> Totals
#>             Paid Incurred P/I Ratio
#> Latest:   12,895   13,646      0.94
#> Ultimate: 16,243   16,242      1.00

# In the same way we can apply BootChainLadder
# We reduce the size of bootstrap replicates R 
# from the default of 999 to 99 purely to reduce run time.
BootChainLadder(Paid, R=99) 
#> BootChainLadder(Triangle = Paid, R = 99)
#> 
#>    Latest Mean Ultimate Mean IBNR  IBNR.S.E IBNR 75% IBNR 95%
#> 1   1,100         1,100      0.00      0.00     0.00     0.00
#> 5   1,298         1,301      3.23      5.22     5.51    11.31
#> 9   1,198         1,200      2.49      4.87     4.68     9.95
#> 13  1,293         1,302      8.63      6.76    12.64    21.34
#> 17  1,573         1,603     29.77     11.34    36.62    48.55
#> 21  1,054         1,099     44.94     11.19    51.72    66.27
#> 25  1,387         1,496    109.30     19.76   121.30   142.80
#> 29  1,760         1,996    236.01     31.24   257.09   286.86
#> 33  1,100         1,397    297.18     33.11   317.26   336.05
#> 37    948         1,579    631.46     56.83   664.11   722.59
#> 41    183         1,070    887.36    161.88   943.17 1,177.08
#> 45      1          -986   -987.11 31,242.27 2,194.11 7,635.94
#> 
#>                 Totals
#> Latest:         12,895
#> Mean Ultimate:  14,158
#> Mean IBNR:       1,263
#> IBNR.S.E        31,245
#> Total IBNR 75%:  4,245
#> Total IBNR 95%:  9,900