Skip to contents

The cumulative share of the ultimate that an origin with nothing yet observed would have reached at each development age, under the development each simulation drew: the bootstraps' pseudo factors (selected, blended and with the tail drawn as the reserves use them), or the Bayesian models' column effects of the posterior draw the simulation took (docs/design/reserving-v02.md, decision 28; for Meyers' models exp(beta_d g), the median value at each age over the median at the oldest age of an origin after the newest, g its speed-up (1 - gamma)^n in CSR and 1 in CRC and CAY; for the compartmental model the ODE's expected cumulative paid at each age of the square over that at its last age, of an origin with nothing observed at the population's rates, with each observed age's development effects). Row i is simulation i of fit@reserves, so it keeps the dependence with ultimate_draws() and every other vector built from the fit.

Usage

pattern_draws(fit, segment = NULL)

monthly_pattern_draws(
  fit,
  months,
  segment = NULL,
  basis = NULL,
  monotone = "refuse"
)

Arguments

fit

An odp_bootstrap_fit, mack_bootstrap_fit, bayes_odp_fit, bayes_odp_fits, bayes_bf_fit, bayes_bf_normalised_fit, meyers_fit, meyers_fits, compartmental_fit, compartmental_fits or a new_year_fit (the new year's emergence).

segment

NULL for a fit of one segment, or the segment's key values ("Auto", c("Auto", "NSW")) over segments.

months

The number of months, a whole number of at least 1; patterns are padded with 1 past the month at which they reach it.

basis

NULL or "origin" for the origin's own basis, "origin_ln_linear" for its log-linear reading, or an underwriting_basis().

monotone

"refuse" (the default) or "running_max".

Value

A numeric matrix with one row per simulation: for pattern_draws() one column per development age, named by the age in months; for monthly_pattern_draws() months columns.

Details

pattern_draws() gives the shares at the triangle's own ages (the compartmental model's at the ages of its square, one origin period per origin). monthly_pattern_draws() gives, per simulation, the share at the end of each of the first months months from inception, the form that cashflow_run() takes as paid_patterns. On the origin's own basis (basis = NULL, the default) a pattern of accident periods longer than a month is read between its ages by a Weibull growth curve; "origin_ln_linear" reads it log-linearly, as before decision 25. An underwriting_basis() converts it to the pattern of a year of policies written and earned as the basis says, so the terms' written and earned must describe the same basis (the engine cannot check it).

A fit with a tail reaches 1 one development period after the oldest age; the Bayesian models have no tail, so their pattern reaches 1 at the oldest age. Every monthly pattern ends at exactly 1, and months shorter than the month at which a converted pattern reaches 1 is an error. A pseudo factor below 1 makes a simulation's share fall, and a negative factor (which Mack's bootstrap can draw) makes it negative; the cash-flow engine refuses both: monotone = "refuse" (the default) is an error naming how many simulations and the first, "running_max" holds each share at the largest before it, capped at 1, and gives a share that is not positive the next positive share, which the simulation then pays from its first age. Bootstrap draws usually need "running_max": at the oldest ages, where one or two cells set the factor, the ODP bootstrap draws a pseudo factor below 1 in some simulations, which puts the share above 1 before it falls back to 1 (77 of 2,000 draws on the sample submission's paid triangle to 108 months). Nothing in Meyers' models keeps beta_d rising or below 0, so their shares can fall and pass 1 (on Meyers' group 353 data a share falls in nearly every simulation): use "running_max", which also caps each share at 1. The compartmental model's paid curve rises, so its shares do not fall with cumulative paid and no development effects (model 1) or with incremental paid (model 2).

No fit knows whether its triangle is paid: a pattern from an incurred triangle is an incurred pattern, and the engine reads it as paid.

Under a growth-curve reading each simulation's curve is searched from the mean pattern's, and the simulations are read on all cores, so 2,000 draws at 144 months take well under a second on 16 cores (a few seconds on one). The result does not depend on the number of threads; it is within about 1e-9 of a share of the search from every start that an underwriting_basis()'s conversion of a single pattern makes.

Examples

long <- data.frame(year = c(2020, 2020, 2020, 2021, 2021, 2022),
                   age = c(12, 24, 36, 12, 24, 12),
                   paid = c(100, 150, 165, 110, 170, 120))
fit <- odp_bootstrap(triangle(long, "year", "age", "paid"), n_sims = 200, seed = 1)
p <- pattern_draws(fit)
dim(p)
#> [1] 200   3
colMeans(p)
#>        12        24        36 
#> 0.5968603 0.9083610 1.0000000 
m <- monthly_pattern_draws(fit, 48, monotone = "running_max")
dim(m)
#> [1] 200  48