Last data update: 2014.03.03

R: Bootstrap distribution: the full cashflow
dcl.bootR Documentation

Bootstrap distribution: the full cashflow

Description

Provide the distribution of the IBNR, RBNS and total (RBNS+IBRN) reserves by calendar years and rows using bootstrapping.

Usage

dcl.boot( dcl.par , sigma2 , Ntriangle , boot.type = 2 , B = 999 , 
  Tail = TRUE , summ.by = "diag" , Tables = TRUE , num.dec = 2 , n.cal = NA)

Arguments

dcl.par

A list object with the estimated parameters: the value returned by the functions dcl.estimation, bdcl.estimation or idcl.estimation.

sigma2

Optional. The variance of the individual payments in the first underwriting period.

Ntriangle

The counts data triangle: incremental number of reported claims. It should be a matrix with the observed counts located in the upper triangle and the lower triangle consisting in missing or zero values. It should be the same triangle used to get the value passed by the argument dcl.par.

boot.type

Choose between values 1, to provide only the variance process, or 2 (default), to take into account the uncertainty of the parameters.

B

The number of simulations in the bootstrap algorithm. The defaul value is 999.

Tail

Logical. If TRUE (default) the tail is provided.

summ.by

A character value such as "diag", "row" or "cell".

Tables

Logical. If TRUE (default) it is showed a table with the summary (mean, standard deviation, 1%, 5%, 50%, 95%, 99%) of the distribution of the outstanding liabilities in the future calendar periods (if summ.by="diag") or by underwriting period (if summ.by="row").

num.dec

Number of decimal places used to report numbers in the tables. Used only if Tables=TRUE

n.cal

Integer specifying the number of most recent calendars which will be used to calculate the development factors. By default n.cal=NA and all the observed calendars are used (classical chain ladder).

Details

If the calculated severity variance using the function dcl.estimation is not a valid estimate then it is recommended to provide directly this value through the argument sigma2. It can be calculated using the function var applied to a pilot sample of individual payments observed in the first underwriting period.

Value

array.rbns.boot

An array with dimensions (m,2m-1,B) (m being the dimension of the input triangles in DCL). Each array.rbns.boot[,,b] is a matrix, with m rows and 2m-1 columns, having the bootstrapped outstanding RBNS numbers as the entries (for b=1,...,B).

Mat.rbns

A matrix with B rows and 2m columns. Each Mat.rbns[b,] is a vector with elements being the outstanding liabilities for RBNS claims in the future calendar periods (sums by diagonals), and last value is the RBNS reserve (overall sum).

array.ibnr.boot

An array with dimensions (m,2m-1,B) (m being the dimension of the input triangles in DCL). Each array.ibnr.boot[,,b] is a matrix, with m rows and 2m-1 columns, having the bootstrapped outstanding IBNR numbers as the entries (for b=1,...,B).

Mat.ibnr

A matrix with B rows and 2m columns. Each Mat.ibnr[b,] is a vector with elements being the outstanding liabilities for IBNR claims in the future calendar periods (sums by diagonals), and last value is the RBNS reserve (overall sum).

Mat.total

A matrix with B rows and 2m columns. Each Mat.total[b,] is a vector with elements being the outstanding liabilities for total(=RBNS+IBNR) claims in the future calendar periods (sums by diagonals), and last value is the RBNS reserve (overall sum).

summ.rbns

A dataframe with the summary of the RBNS distribution. Only if Tables=TRUE.

summ.ibnr

A dataframe with the summary of the IBNR distribution. Only if Tables=TRUE.

summ.total

A dataframe with the summary of the total(=RBNS+IBNR) distribution. Only if Tables=TRUE.

Note

If boot.type=2 the function will take some time to perform the calculations. It increases with the dimension of the triangles and the specified number of simulations B.

Author(s)

M.D. Martinez-Miranda, J.P. Nielsen and R. Verrall

References

Martinez-Miranda, M.D., Nielsen, J.P. and Verrall, R. (2012) Double Chain Ladder. Astin Bulletin, 42/1, 59-76.

Martinez-Miranda, M.D., Nielsen, J.P. and Verrall, R. (2013) Double Chain Ladder and Bornhuetter-Ferguson. North Americal Actuarial Journal.

See Also

Plot.cashflow, dcl.boot.prior

Examples

# Results described in the data application by Martinez-Miranda, Nielsen and Verrall (2012)
data(NtriangleDCL)
data(XtriangleDCL)

# Estimation of the DCL parameters
est<-dcl.estimation(XtriangleDCL,NtriangleDCL)

# Full cashflow considering the tail (only the variance process)
# Below only B=200 simulations to be faster in the example
boot1<-dcl.boot(dcl.par=est,Ntriangle=NtriangleDCL,boot.type=1,B=200)
Plot.cashflow(boot1)

# Full cashflow with tail and taking into account the parameters uncertainty
# and B=999 simulations. Do not run it unless you can wait about one minute
# boot2<-dcl.boot(dcl.par=est,Ntriangle=NtriangleDCL,boot.type=2)
# Plot.cashflow(boot2)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(DCL)
Loading required package: lattice
Loading required package: latticeExtra
Loading required package: RColorBrewer
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DCL/dcl.boot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: dcl.boot
> ### Title: Bootstrap distribution: the full cashflow
> ### Aliases: dcl.boot
> ### Keywords: htest
> 
> ### ** Examples
> 
> # Results described in the data application by Martinez-Miranda, Nielsen and Verrall (2012)
> data(NtriangleDCL)
> data(XtriangleDCL)
> 
> # Estimation of the DCL parameters
> est<-dcl.estimation(XtriangleDCL,NtriangleDCL)
   delay.par delay.prob inflation severity.mean severity.var
1     0.3649     0.3649    1.0000      208.4910    2055848.1
2     0.2924     0.2924    0.7562      157.6619    1175628.8
3     0.1119     0.1119    0.7350      153.2415    1110629.4
4     0.0839     0.0839    0.8908      185.7203    1631305.5
5     0.0630     0.0630    0.7840      163.4627    1263728.0
6     0.0332     0.0332    0.7791      162.4267    1247760.4
7     0.0245     0.0245    0.6605      137.7131     896947.6
8     0.0121     0.0121    0.7370      153.6665    1116798.1
9     0.0158     0.0142    0.6990      145.7439    1004609.0
10   -0.0012     0.0000    0.8198      170.9139    1381564.2
  mean.factor mean.factor.adj variance.factor
1    208.3748         208.491         2055848
> 
> # Full cashflow considering the tail (only the variance process)
> # Below only B=200 simulations to be faster in the example
> boot1<-dcl.boot(dcl.par=est,Ntriangle=NtriangleDCL,boot.type=1,B=200)
[1] "Please wait, simulating the distribution..."
[1] "Done!"
   period       rbns  mean.rbns   sd.rbns    Q1.rbns    Q5.rbns   Q50.rbns
1       1 1260907.90 1257970.38  91633.96 1063486.88 1111254.50 1255904.90
2       2  672017.58  668763.27  69887.45  515912.35  554340.09  673452.61
3       3  453360.52  453163.19  55295.68  343719.17  371748.17  453752.44
4       4  292539.65  292108.32  46176.89  181426.13  221790.18  290620.77
5       5  164970.41  165682.80  37528.85   96026.31  110394.09  161646.69
6       6  103125.19  105917.45  29254.20   49136.74   61066.20  103048.81
7       7   54037.12   51423.57  20683.36   11783.04   22338.22   49157.40
8       8   30396.54   28655.94  14303.42    5731.97    9922.31   25969.09
9       9       0.00       0.00      0.00       0.00       0.00       0.00
10     10       0.00       0.00      0.00       0.00       0.00       0.00
11     11       0.00       0.00      0.00       0.00       0.00       0.00
12     12       0.00       0.00      0.00       0.00       0.00       0.00
13     13       0.00       0.00      0.00       0.00       0.00       0.00
14     14       0.00       0.00      0.00       0.00       0.00       0.00
15     15       0.00       0.00      0.00       0.00       0.00       0.00
16     16       0.00       0.00      0.00       0.00       0.00       0.00
17     17       0.00       0.00      0.00       0.00       0.00       0.00
18     18       0.00       0.00      0.00       0.00       0.00       0.00
19   Tot. 3031354.91 3023684.93 146350.48 2735275.15 2796919.87 3018954.36
     Q95.rbns   Q99.rbns
1  1382943.13 1488553.79
2   778709.61  833115.91
3   543284.18  589765.65
4   368014.27  409628.14
5   229546.71  265474.81
6   156694.88  179069.46
7    88846.07   99553.55
8    54667.49   72783.00
9        0.00       0.00
10       0.00       0.00
11       0.00       0.00
12       0.00       0.00
13       0.00       0.00
14       0.00       0.00
15       0.00       0.00
16       0.00       0.00
17       0.00       0.00
18       0.00       0.00
19 3280104.01 3411033.79
   period      ibnr mean.ibnr  sd.ibnr   Q1.ibnr   Q5.ibnr  Q50.ibnr  Q95.ibnr
1       1  97168.11  94802.55 25732.30  51541.81  58365.35  90816.43 143616.84
2       2  82620.00  82309.07 24966.94  35258.38  46182.25  80355.23 126206.25
3       3  35505.74  35756.25 16446.56   5626.02  12420.87  33856.40  63992.98
4       4  26503.46  27951.53 16640.70   3071.71   7094.95  24534.61  59969.93
5       5  20353.21  20728.96 12640.99   2029.97   4950.90  18497.15  43838.67
6       6  11970.64  11693.20 10218.48    555.78   1007.49   8344.85  29904.24
7       7   9074.00   8863.22  9106.95    152.68    637.14   5862.94  23732.39
8       8   5411.50   5179.04  5461.34     12.13     79.97   3484.70  16587.00
9       9   5459.61   5720.40  7086.28      9.65    140.71   3418.25  19165.83
10     10   1119.08   1242.28  3588.69      0.00      0.00     50.94   6488.13
11     11    580.33    421.75  1514.58      0.00      0.00      0.01   2886.58
12     12    355.37    255.64  1315.66      0.00      0.00      0.00    514.07
13     13    210.61    160.11   917.33      0.00      0.00      0.00    591.94
14     14    116.42     36.19   226.52      0.00      0.00      0.00     47.59
15     15     64.70     77.96   591.67      0.00      0.00      0.00     61.94
16     16     32.12     32.85   382.65      0.00      0.00      0.00      0.00
17     17     12.77      1.68    23.72      0.00      0.00      0.00      0.00
18     18      0.00      0.00     0.00      0.00      0.00      0.00      0.00
19   Tot. 296557.68 295232.66 44264.78 212536.04 229236.95 293129.75 370479.93
    Q99.ibnr
1  166032.67
2  149989.41
3   83384.78
4   76372.95
5   52810.80
6   44787.54
7   44573.11
8   23817.04
9   32987.56
10  12530.28
11   5763.90
12   7167.45
13   3716.95
14   1445.12
15   3623.54
16    212.15
17      0.00
18      0.00
19 385166.58
   period      total mean.total  sd.total   Q1.total   Q5.total  Q50.total
1       1 1358076.01 1352772.93  95394.33 1128050.43 1193127.54 1357278.93
2       2  754637.59  751072.35  73301.72  613464.52  637104.54  749452.63
3       3  488866.26  488919.44  55436.13  384324.84  404557.66  489488.51
4       4  319043.11  320059.85  49353.78  213766.04  241211.10  318259.98
5       5  185323.62  186411.76  39699.12  111578.27  130327.96  183690.21
6       6  115095.83  117610.65  30363.30   56367.92   70961.37  117563.53
7       7   63111.11   60286.79  22907.72   20943.47   28578.23   57081.55
8       8   35808.04   33834.98  14739.32   10527.89   14076.52   32150.29
9       9    5459.61    5720.40   7086.28       9.65     140.71    3418.25
10     10    1119.08    1242.28   3588.69       0.00       0.00      50.94
11     11     580.33     421.75   1514.58       0.00       0.00       0.01
12     12     355.37     255.64   1315.66       0.00       0.00       0.00
13     13     210.61     160.11    917.33       0.00       0.00       0.00
14     14     116.42      36.19    226.52       0.00       0.00       0.00
15     15      64.70      77.96    591.67       0.00       0.00       0.00
16     16      32.12      32.85    382.65       0.00       0.00       0.00
17     17      12.77       1.68     23.72       0.00       0.00       0.00
18     18       0.00       0.00      0.00       0.00       0.00       0.00
19   Tot. 3327912.59 3318917.59 149866.92 3028057.58 3090611.03 3320491.82
    Q95.total  Q99.total
1  1494143.12 1572836.15
2   875298.98  903893.67
3   583673.42  618262.88
4   406275.52  432143.04
5   256511.18  295882.36
6   163314.73  197372.29
7    98444.20  128174.71
8    60978.02   79790.62
9    19165.83   32987.56
10    6488.13   12530.28
11    2886.58    5763.90
12     514.07    7167.45
13     591.94    3716.95
14      47.59    1445.12
15      61.94    3623.54
16       0.00     212.15
17       0.00       0.00
18       0.00       0.00
19 3598642.73 3680372.98
> Plot.cashflow(boot1)
> 
> # Full cashflow with tail and taking into account the parameters uncertainty
> # and B=999 simulations. Do not run it unless you can wait about one minute
> # boot2<-dcl.boot(dcl.par=est,Ntriangle=NtriangleDCL,boot.type=2)
> # Plot.cashflow(boot2)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>