Skip to contents

Mack'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 ChainLadderFit pointer; 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, so mack() 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" (regress log(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() or tail_log_linear().

tail_sigma

The tail's sigma (R's tail.sigma), or NULL to extrapolate it. Unused when the tail factor is 1.

tail_std_err

The tail factor's standard error (R's tail.se), or NULL to 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 age and value. 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, where c("12" = 1.5, "36" = 1.2) selects 1.5; nothing warns of this.

ldf_kind

How ldf is expressed: "ldf" (age-to-age factors), "cdf" (factors to ultimate) or "percent_developed", each finite and positive and in any order. Required with ldf, since age-to-age factors and factors to ultimate cannot be told apart.

ldf_weight

The weight w on 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 periods ldf was 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 one ldf_weight for every factor, not one by age, and the averaged pattern cannot be weighted by age from R. With ldf_underwriting it is the grain of the accident periods ldf is converted from instead.

ldf_underwriting

NULL (the default), or an underwriting_basis() to which ldf, an accident-period pattern, is converted for the target's underwriting periods: an underwriting year's share developed at age a from its start is sum_t e(t) p(a - t), with e its exposure by accident month and p an accident month's (SelectedPattern::to_underwriting_basis). ldf is on accident periods of ldf_origin, or of the target's origin grain without it: an accident-year pattern on underwriting-year origins needs no ldf_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's reading says: 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 with reading = "ln-linear" (31% too much developed at 12 months on that book). The result runs past ldf'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 from ldf'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 give underwriting_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_periods keeps the latest n_periods calendar diagonals (NULL, the default, keeps every one; an age with fewer links uses all of them). Then the drop_high highest and drop_low lowest of the kept ratios are left out, except at an age where that would leave none. Whole numbers from 0 (n_periods from 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), and claims_development_result() rejects any of them, even one that removes nothing. The fit's n_links and excluded report what was used.

Value

A mack_fit object.

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