Mack chain ladder
mack_fit.RdMack's distribution-free chain ladder (Mack 1993, 1999): the chain-ladder
projection plus the process and parameter standard errors of each
origin's reserve and of the total, as R ChainLadder's
MackChainLadder(). Needs at least three development ages, and every
sigma estimable or fillable by sigma_interpolation. Every segment of
the triangle is fitted on its own.
Usage
mack_fit(ptr)
mack(
triangle,
column = NULL,
average = "volume",
sigma_interpolation = "log-linear",
tail = 1,
tail_sigma = NULL,
tail_std_err = NULL,
ldf = NULL,
ldf_kind = NULL,
ldf_weight = 1,
ldf_origin = NULL,
ldf_underwriting = NULL,
n_periods = NULL,
drop_high = 0,
drop_low = 0
)Arguments
- ptr
A
ChainLadderFitpointer; used internally.- triangle
A triangle, with any number of segments, or, for
chain_ladder(), a latest_valuation (a latest diagonal on its own).- column
Name of the column to fit; by default the only one. Not given for a latest valuation.
- average
"volume","simple","regression"or"geometric"."geometric"is the geometric mean of the link ratios: it gives the factors only, with no sigma or standard error, somack()and the bootstraps reject it.- sigma_interpolation
How a variance parameter that cannot be estimated (an age with a single link ratio) is filled in:
"log-linear"(regresslog(sigma)on age and extrapolate, the default of R ChainLadder) or"mack"(Mack 1993).- tail
Development past the oldest age: a number, the factor from the oldest age to ultimate (1 means no tail), or a
tail_constant(),tail_curve(),tail_bondy()ortail_log_linear().- tail_sigma
The tail's sigma (R's
tail.sigma), orNULLto extrapolate it. Unused when the tail factor is 1.- tail_std_err
The tail factor's standard error (R's
tail.se), orNULLto extrapolate it. Unused when the tail factor is 1.- ldf
A selected development pattern (above): a numeric vector named by age in months, or a data.frame with columns
ageandvalue.NULL(the default) estimates every factor. Ages off the triangle's (or latest valuation's) ages are read on the pattern's own ages,log(cdf)linear between them, and what the pattern gives past the oldest age folds into a constant tail at full weight (docs/design/reserving-v02.md, decision 18). Adding one off-grid age to a sparse age-to-age pattern changes how its other factors are read: each factor then runs to the pattern's next age, not the triangle's. On RAA,c("12" = 1.5, "18" = 1.1, "36" = 1.2)selects 1.5484 from 12 to 24 months, wherec("12" = 1.5, "36" = 1.2)selects 1.5; nothing warns of this.- ldf_kind
How
ldfis expressed:"ldf"(age-to-age factors),"cdf"(factors to ultimate) or"percent_developed", each finite and positive and in any order. Required withldf, since age-to-age factors and factors to ultimate cannot be told apart.- ldf_weight
The weight
won each selected factor, from 0 (the estimate) to 1 (the selection, the default): a number for every selected factor, or a numeric vector named by age (the age that starts the factor's link), the others fully selected.- ldf_origin
NULL(the default), or the grain ("M","Q","S"or"Y") of the origin periodsldfwas measured on, when it differs from the triangle's or latest valuation's: a pattern of accident months read for accident years, say. The pattern is averaged over the origin period with exposure even through it (SelectedPattern::averaged_over_origins), exact up to the pattern's end, with development deferred past it; a constant tail from the monthly pattern is the safer choice there. Equal to the target's grain, it changes nothing. It needs oneldf_weightfor every factor, not one by age, and the averaged pattern cannot be weighted by age from R. Withldf_underwritingit is the grain of the accident periodsldfis converted from instead.- ldf_underwriting
NULL(the default), or anunderwriting_basis()to whichldf, an accident-period pattern, is converted for the target's underwriting periods: an underwriting year's share developed at ageafrom its start issum_t e(t) p(a - t), witheits exposure by accident month andpan accident month's (SelectedPattern::to_underwriting_basis).ldfis on accident periods ofldf_origin, or of the target's origin grain without it: an accident-year pattern on underwriting-year origins needs noldf_origin. An accident-month pattern (ldf_origin = "M") converts under any writing and term; a pattern of longer accident periods needs a policy term that is a whole multiple of them or writing even within each of them. Given at every month from 1 it is exact; at other ages (annual ones, say) it is read between them as the basis'sreadingsays: by default the Weibull fitted through the period averages and corrected to the nearest monotone accident-month pattern whose averages are the given values exactly, within 0.2% of a simulated parallelogram book at every age, or by the rule above withreading = "ln-linear"(31% too much developed at 12 months on that book). The result runs pastldf's end by the writing months plus the policy term less the accident period (12 months for an accident-year pattern under the default, 23 for an accident-month one), and a constant tail fromldf's own tail is the safer choice there. The writing must be no longer than the target's origin period (the default's 12 months suit underwriting years only; on underwriting quarters giveunderwriting_basis(c(1, 1, 1))), or the fit is an error.- n_periods, drop_high, drop_low
Which link ratios the factor at each age averages.
n_periodskeeps the latestn_periodscalendar diagonals (NULL, the default, keeps every one; an age with fewer links uses all of them). Then thedrop_highhighest anddrop_lowlowest of the kept ratios are left out, except at an age where that would leave none. Whole numbers from 0 (n_periodsfrom 1); the defaults exclude nothing.mack(), the bootstraps and the one-year views accept them (the bootstraps and views keep the link ratios that the observed triangle keeps), andclaims_development_result()rejects any of them, even one that removes nothing. The fit'sn_linksandexcludedreport what was used.
Details
A tail other than 1 is one more development step, from the oldest age to
ultimate, with its own sigma and standard error, as
MackChainLadder(tail = ..., tail.sigma = ..., tail.se = ...); unless
given, both are extrapolated log-linearly (R's tail_SE). Every origin,
the oldest included, then carries the tail's risk. Without a tail (the
default) the fit is R's MackChainLadder(tail = FALSE). A tail below 1
follows chainladder-python: it scales the ultimates and carries the risk
read where a tail of 1.001 would be. R's MackChainLadder() ignores a
tail below 1 altogether.
The fit has the properties of a chain_ladder_fit (and the fit itself
as m@chain_ladder), plus per origin process_risk, parameter_risk
and standard_error, and total_process_risk, total_parameter_risk,
total_standard_error and total_cv (the total standard error over the
total reserve). Risks are standard errors, not variances. Its
tail_sigma and tail_std_err are the values used, given or
extrapolated. The totals' risks need a single-segment fit: with several
segments use totals_frame(), which has them per segment, or
segment(). claims_development_result() gives Merz and Wuthrich's
one-year view of a single-segment fit without a tail.
With a selected pattern (ldf), a selected factor is taken as known: its
parameter risk is 1 - w times Mack's (none for a fully selected
factor), checked against R's MackChainLadder() on the triangle's own
factors (validation/tests/reserving_patterns.rs); the process risk
keeps the triangle's sigmas, around the factors used. A supplied pattern
therefore lowers the reported standard errors. claims_development_result()
takes the pattern too: with weights strictly between 0 and 1 its calendar
years need not add up to Mack's. A tail implied by a cumulative pattern
with no tail (chain_ladder()'s pattern_tail) has no parameter
error (tail_std_err 0 unless given), and its sigma is extrapolated as
a constant tail's unless tail_sigma is given.
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))
m <- mack(triangle(long, "year", "age", "paid"))
m@standard_error
#> 2018 2019 2020 2021
#> 0.000000 5.616429 8.527608 11.566353
m@total_cv
#> [1] 0.1753421
as.data.frame(m)
#> origin latest ultimate reserve process_risk parameter_risk standard_error
#> 1 2018 170 170.0000 0.000000 0.000000 0.000000 0.000000
#> 2 2019 180 185.4545 5.454545 3.884121 4.056832 5.616429
#> 3 2020 175 194.3892 19.389205 6.396266 5.639848 8.527608
#> 4 2021 130 216.6051 86.605114 8.973521 7.297702 11.566353
# With R ChainLadder's tail = TRUE rule.
mack(triangle(long, "year", "age", "paid"), tail = tail_log_linear())@total_standard_error
#> [1] 25.96684