Bootstrap of Mack's model
mack_bootstrap_fit.RdThe lifetime view of reserve risk under Mack's model, bootstrapped as
England, Verrall and Wuthrich (2019, Appendix 1) describe: the link
ratios' residuals are resampled into pseudo factors (parameter error),
and every future cumulative value is drawn from the one before with
Mack's mean and variance (process error), to the triangle's last age, or
with a tail one more step to ultimate. An origin's reserve is its last
drawn value less its latest. Its standard deviation approximates
mack()'s standard error with the same tail, and by default
(centre_residuals = TRUE) its mean is the chain ladder's reserve.
The method, its formulas, the centring of the residuals, the tails and
its reference are documented once, in the
Rust reference.
Usage
mack_bootstrap_fit(ptr)
mack_bootstrap(
triangle,
column = NULL,
n_sims = 10000,
seed = 0,
process = c("gamma", "lognormal", "residuals", "normal", "none"),
average = "volume",
sigma_interpolation = "log-linear",
centre_residuals = TRUE,
tail = 1,
tail_sigma = NULL,
tail_std_err = NULL,
dependence = c("independent", "synchronized", "rank_correlation"),
spearman = NULL,
ldf = NULL,
ldf_kind = NULL,
ldf_weight = 1,
ldf_origin = NULL,
ldf_underwriting = NULL,
n_periods = NULL,
drop_high = 0,
drop_low = 0,
cells = FALSE
)Arguments
- ptr
A
MackBootstrapFitpointer; used internally.- triangle
A cumulative triangle, with any number of segments and any development grain, every origin observed from the first age up to its latest, with no negative value.
- column
Name of the column to fit; by default the only one.
- n_sims
Number of simulations; positive.
- seed
Seed of the simulation streams, a non-negative whole number.
- process
Process error on each next cumulative value:
"gamma"or"lognormal"(negated for a negative mean) or"normal", with Mack's mean and variance;"residuals"(the mean plus a resampled residual times the standard deviation); or"none"for parameter error only.- average, sigma_interpolation
How Mack's model averages the link ratios and fills in a sigma behind a single link ratio, as in
mack().- centre_residuals
Subtract the residuals' mean before resampling them, so that the pseudo factors are unbiased and the mean reserve is the chain ladder's (without a tail or with a constant one);
FALSEresamples them uncentred, as England, Verrall and Wuthrich's Appendix 1 is written.- tail
Development past the oldest age, as in
mack(): a number (a constant factor),tail_constant(),tail_curve(),tail_bondy()ortail_log_linear(); 1 (no tail) by default.mack_one_year()takes it withbootstrap_tail = TRUE.- tail_sigma
The tail's sigma (R's
tail.sigma), the process error of the step to ultimate, orNULLto extrapolate it. Unused when the tail factor is 1.- tail_std_err
A constant tail factor's standard error (R's
tail.se), orNULLto extrapolate it (unlikeodp_bootstrap(), which then keeps the factor fixed). Unused when the tail factor is 1, and an error with an estimated tail.- dependence, spearman
How the segments depend on each other, as in
odp_bootstrap().- ldf, ldf_kind, ldf_weight, ldf_origin, ldf_underwriting
A selected development pattern, as in
chain_ladder(). Mack's sigmas and residuals come from the triangle's own estimate; each simulation then usesw * selected + (1 - w) * pseudoat the selected ages, so a fully selected factor has no parameter error and a blended one1 - wtimes the pseudo factor's deviation, asmack()charges it; the process error is unchanged. A supplied pattern lowers the reported uncertainty. Each origin is projected from its observed latest value, so with every factor selected only the process error is left (unlikeodp_bootstrap(), which keeps the origins' level error). With notail, a cumulative pattern to the oldest age implies a constant tail (pattern_tailofchain_ladder()), the same in every simulation unlesstail_std_erris given.- n_periods, drop_high, drop_low
Which link ratios the factors average, as in
chain_ladder(). Only the link ratios that the observed triangle keeps have residuals and enter the pseudo factors (the drops are not ranked again in each simulation), somack()'s standard error under the same settings is the reference for the standard deviation."geometric"as the average is rejected.- cells
TRUEto keep each simulation's future incremental values in the fit'scells, forreinflate_draws(), as inodp_bootstrap(): the reserves are the same, bit for bit, with and without them, and it is an error when no segment has a future cell.
Details
Every segment is bootstrapped with its own Mack model and residuals,
into one joint distribution of the reserves, the segments depending on
each other as dependence says, as in odp_bootstrap(); synchronized,
every segment resamples the link-ratio residuals of the same origins and
ages. Simulation i uses random stream i of seed for every segment
in turn.
Properties of the fit: chain_ladder (the chain_ladder_fit of Mack's
averaging), mack (the mack_fit on the observed triangle, with the
analytic standard errors), origins, development, residuals (an
origin x development matrix, [o, k] the residual of the link from age
k to k + 1, NA where there is none; never centred; single segment
only) and reserves, a predictive_distribution of the reserve with the
triangle's keys and origin as dimensions.
cells is NULL unless the fit was made with cells = TRUE: then a
predictive_distribution of each simulation's future incremental
values, each simulated cumulative value less the one before it from the
observed latest value (so that they are payments), laid out as
odp_bootstrap()'s: the triangle's keys, origin and development as
dimensions, one component per future cell, one row per simulation in
the reserves' order. With a tail each origin has one more cell, the
ultimate less the value at the oldest age, at the oldest age plus one
development period. Each origin's cells sum to its reserve in every
simulation to round-off. reinflate_draws() takes them as they are;
segment() keeps its segment's part, NULL when that segment has no
future cell.
This is Python's MackBootstrap(...).fit(), which returns a
MackBootstrapFit.
See also
mack() for the analytic standard errors, mack_one_year()
for the one-year view on the same bootstrap, odp_bootstrap().
Examples
long <- data.frame(year = rep(2018:2021, 4:1),
age = c(12, 24, 36, 48, 12, 24, 36, 12, 24, 12),
paid = c(100, 150, 165, 170, 110, 170, 180, 120, 175, 130))
boot <- mack_bootstrap(triangle(long, "year", "age", "paid"), n_sims = 2000, seed = 42)
boot@reserves@keys
#> origin
#> 1 2018
#> 2 2019
#> 3 2020
#> 4 2021
c(mean = mean(boot@reserves), chain_ladder = boot@chain_ladder@total_reserve)
#> mean chain_ladder
#> 111.8672 111.4489
c(sd = sqrt(variance(boot@reserves)), mack = boot@mack@total_standard_error)
#> sd mack
#> 19.20362 19.54168
as.data.frame(boot)
#> origin latest ultimate reserve mean std_dev
#> 1 2018 170 170.0000 0.000000 0.000000 0.000000
#> 2 2019 180 185.4545 5.454545 5.520966 5.632281
#> 3 2020 175 194.3892 19.389205 19.642917 8.515991
#> 4 2021 130 216.6051 86.605114 86.703367 11.401785