Last data update: 2014.03.03
R: Plotting the full cashflow (bootstrap distribution)
Plot.cashflow R Documentation
Plotting the full cashflow (bootstrap distribution)
Description
Provide histograms and boxplots of the RBNS, IBNR and total(=RBNS+IBNR) cashflows. The boxplots corresponds to the distribution of the outstanding liabities in the future calendar periods. The histograms show the distribution of the reserve (overall total).
Usage
Plot.cashflow( cashflow )
Arguments
cashflow
A list object returned by the function dcl.boot
or dcl.boot.prior
.
Details
The cashflow should be derived by specifying the parameter summ.by="diag"
in the function dcl.boot
or dcl.boot.prior
.
Value
No returned value.
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 , 17(2), 101-113.
Martinez-Miranda, M.D., Nielsen, J.P., Verrall, R. and Wuthrich, M.V. (2013) Double Chain Ladder, Claims Development Inflation and Zero Claims. Scandinavian Actuarial Journal . In press.
See Also
dcl.boot
, dcl.boot.prior
, dcl.estimation
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 variance process)
# Below only B=200 simulations for a fast example
boot1<-dcl.boot(dcl.par=est,Ntriangle=NtriangleDCL,boot.type=1,B=200)
Plot.cashflow(boot1)
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/Plot.cashflow.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Plot.cashflow
> ### Title: Plotting the full cashflow (bootstrap distribution)
> ### Aliases: Plot.cashflow
> ### Keywords: Graphics
>
> ### ** 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 variance process)
> # Below only B=200 simulations for a fast 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 1247515.22 98980.42 1033761.92 1091819.07 1243315.69
2 2 672017.58 668290.09 72227.43 513389.02 564025.94 664460.63
3 3 453360.52 454359.31 56695.93 341670.06 360336.62 450220.31
4 4 292539.65 287565.22 43813.02 207919.77 225833.61 281210.21
5 5 164970.41 167441.18 39156.57 88930.76 106325.82 166097.67
6 6 103125.19 103576.06 27099.82 49854.25 56968.10 104484.36
7 7 54037.12 54544.87 19031.88 15859.58 25595.93 52749.41
8 8 30396.54 27935.23 13758.36 6938.18 9233.21 26659.33
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 3011227.18 148467.80 2697604.99 2755183.75 3012897.58
Q95.rbns Q99.rbns
1 1427714.16 1504296.32
2 790994.91 870505.95
3 557344.56 589334.46
4 366489.90 389253.38
5 237316.18 276301.47
6 148927.86 159181.94
7 88482.59 98023.37
8 54263.13 64551.83
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 3273584.02 3371792.66
period ibnr mean.ibnr sd.ibnr Q1.ibnr Q5.ibnr Q50.ibnr Q95.ibnr
1 1 97168.11 99721.52 28443.36 50273.75 57114.33 96223.67 155856.67
2 2 82620.00 81432.33 23634.54 35342.30 46678.12 80049.61 120213.72
3 3 35505.74 33179.37 17880.80 6023.39 11606.20 28821.55 70042.30
4 4 26503.46 25873.19 13919.16 6199.88 7717.41 24010.93 51502.49
5 5 20353.21 19315.28 12194.22 2034.33 3979.45 17127.19 43526.62
6 6 11970.64 11885.49 10281.42 687.21 1523.56 8701.32 32378.34
7 7 9074.00 8258.26 8263.90 212.10 516.27 6072.35 26345.76
8 8 5411.50 5003.95 7739.46 2.92 114.48 2704.47 18781.76
9 9 5459.61 5133.04 6454.23 9.93 55.22 2794.80 18954.30
10 10 1119.08 1085.91 2751.21 0.00 0.00 9.53 6160.41
11 11 580.33 371.54 1324.62 0.00 0.00 0.03 2082.57
12 12 355.37 308.93 1435.02 0.00 0.00 0.00 1089.04
13 13 210.61 101.36 504.22 0.00 0.00 0.00 389.82
14 14 116.42 73.67 493.06 0.00 0.00 0.00 113.37
15 15 64.70 7.04 56.24 0.00 0.00 0.00 0.00
16 16 32.12 4.10 29.39 0.00 0.00 0.00 0.00
17 17 12.77 0.17 2.46 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 291755.16 45679.94 197543.20 219962.84 290066.24 366338.06
Q99.ibnr
1 174653.43
2 140651.53
3 89636.22
4 69266.45
5 57079.86
6 45293.88
7 35203.52
8 36240.64
9 28027.49
10 14340.99
11 7690.21
12 8880.81
13 3012.62
14 1750.97
15 352.74
16 102.54
17 0.00
18 0.00
19 404625.41
period total mean.total sd.total Q1.total Q5.total Q50.total
1 1 1358076.01 1347236.74 106465.55 1114271.27 1172830.22 1339531.71
2 2 754637.59 749722.42 76214.92 596547.04 639336.18 743570.42
3 3 488866.26 487538.68 57687.33 368772.12 405962.24 482636.00
4 4 319043.11 313438.41 46395.11 219660.39 245423.32 306623.12
5 5 185323.62 186756.46 40812.18 101621.69 129840.53 186296.66
6 6 115095.83 115461.55 29642.14 59015.48 64703.45 115786.98
7 7 63111.11 62803.14 20627.66 27142.73 33708.72 61790.44
8 8 35808.04 32939.18 16978.71 8409.83 12050.56 29849.65
9 9 5459.61 5133.04 6454.23 9.93 55.22 2794.80
10 10 1119.08 1085.91 2751.21 0.00 0.00 9.53
11 11 580.33 371.54 1324.62 0.00 0.00 0.03
12 12 355.37 308.93 1435.02 0.00 0.00 0.00
13 13 210.61 101.36 504.22 0.00 0.00 0.00
14 14 116.42 73.67 493.06 0.00 0.00 0.00
15 15 64.70 7.04 56.24 0.00 0.00 0.00
16 16 32.12 4.10 29.39 0.00 0.00 0.00
17 17 12.77 0.17 2.46 0.00 0.00 0.00
18 18 0.00 0.00 0.00 0.00 0.00 0.00
19 Tot. 3327912.59 3302982.34 157688.46 2965399.25 3030756.86 3306453.64
Q95.total Q99.total
1 1531955.49 1650284.51
2 880235.98 940318.60
3 587219.07 621080.18
4 391120.38 440191.80
5 263012.29 290040.35
6 165041.82 189006.51
7 101511.97 118805.54
8 66436.74 82023.21
9 18954.30 28027.49
10 6160.41 14340.99
11 2082.57 7690.21
12 1089.04 8880.81
13 389.82 3012.62
14 113.37 1750.97
15 0.00 352.74
16 0.00 102.54
17 0.00 0.00
18 0.00 0.00
19 3553879.04 3665855.88
> Plot.cashflow(boot1)
>
>
>
>
>
> dev.off()
null device
1
>