Skip to main content

methods.one_year_cdr()

The one-year claims development result: how far next year’s re-estimate

Usage

Source

methods.one_year_cdr(
    cells,
    *,
    dev_grain_months=12,
    sigma_rule="log_linear",
    zero_cells="observed",
    n_draws=20000,
    seed=None,
    process="gamma",
    parameter_risk=True,
    quantiles=_CDR_QUANTILES
)

of the chain-ladder ultimate can move.

cells is as in chain_ladder(). The chain ladder is Mack’s: volume-weighted factors over every link ratio, with no development options and no tail, because the formulas below are derived for exactly that.

Two answers come back, and they are meant to be compared:

  • the closed form of Merz and Wuthrich (2008), cdr_se, per origin and in total, with Mack’s run-off standard error runoff_se beside it;
  • a simulation of n_draws possible next years. Each draws next year’s diagonal from Mack’s conditional moments (with process as the shape of the noise, and, when parameter_risk is true, the factors drawn from their estimation error too), re-estimates the volume-weighted factors with that diagonal added, and reports the change in each origin’s ultimate. Its standard deviation agrees with cdr_se to Monte Carlo error when parameter_risk is true, and it also gives quantiles and tail means, which a capital figure needs.

ultimate_change is next year’s ultimate minus today’s, so positive is adverse (a strengthening); the kernels’ claims development result has the opposite sign.

Options:

  • dev_grain_months: months per development step. The result is a one-year figure only on an annual triangle, so any other step is read and then refused: aggregate a quarterly or monthly triangle to annual first, or use mack() for the run-off standard error.
  • sigma_rule: as in mack(); "log_linear" (the default, as in chainladder-python) or "mack". It moves the standard errors and the draws, not the ultimates.
  • zero_cells: "observed" (the default here, unlike the other methods) keeps a zero cumulative as data. "missing", chainladder’s rule, is accepted only where it changes nothing, on a triangle with no zero: the one-year formulas have not been checked with link ratios left out for a zero. Under either rule every still-developing origin needs a positive latest cumulative, because Mack’s variance divides by it.
  • n_draws: how many next years to simulate, a whole number of 1 or more (20,000 by default; the 99.5% quantile then rests on the top 100 draws). n_draws times the number of origins numbers are held in memory and returned in draws, about 70 bytes each at the peak, and that product is refused above 100,000,000 (about 7 GB).
  • seed: a whole number of 0 or more makes the draws repeatable; None (the default) draws from fresh entropy. The seed is turned into a stream the same way the gallery’s mack entry does for a triangle with one segment Total and the field values, so for the same seed, draw count and options the draws equal, bit for bit, the ones the Reserving app’s /cdr route gave through that entry, except that an origin at its last age has 0.0 where the app’s negated draws have -0.0. A seed passed straight to kernels.simulate_one_year_cdr is a different stream.
  • process: the shape of next year’s noise, "gamma" (the default), "lognormal" or "normal". All three have Mack’s mean and variance; only the first two keep the cumulative positive.
  • parameter_risk: True (the default) also draws the factors from their estimation error, which is the half of the one-year risk that comes from next year’s factors moving; False leaves only the noise of next year’s cells.
  • quantiles: the levels of the quantiles table, probabilities strictly between 0 and 1 (divide a percentile by 100). The default is 0.5, 0.75, 0.9, 0.95, 0.99, 0.995 and 0.999.

Returns a OneYearCDRResult. Input it will not answer is refused with Refusal, as the module docstring describes; besides the refusals of mack(), a step that is not twelve months and a zero under zero_cells="missing" are refused with not_supported, and a zero latest cumulative on a still-developing origin with variance_not_estimable. The Merz-Wuthrich figures tie out to R’s ChainLadder (CDR(MackChainLadder(MW2014, est.sigma="Mack"))) to 6 decimals, per origin and in total.