Excess-layer loss development: layer factors from the ground-up triangle
reserving-excess-layers.RmdRendered from docs/guides/reserving-excess-layers.qmd.
The code runs each time the site is built, so the output below is
current.
The losses above an attachment (a reinsurer’s excess layer, or a primary insurer’s high deductible) develop much more slowly than the ground-up losses they come from. The layer’s own triangle is sparse: most early cells are zero, and the first non-zero link ratios are very large, so the chain ladder is unstable or fails.
The usual method derives the layer’s development from the dense
ground-up triangle and a claim size distribution, then blends it with
the layer’s own data. The R package has the parts (#192, design note
docs/design/reserving-excess.md):
-
excess_pattern()derives a layer pattern under a scale shift (scale_shift()) or under Pinto and Gogol’s Pareto shape drift (pareto_shape()). -
excess_credibility_weights()blends the pattern with the layer’s own factors. -
layer_share(),layer_exposure(),layer_share_prior()andbayes_bf_layer()give the Bornhuetter-Ferguson prior of a layer.
Sections 2 and 3 run each part on the printed examples of the
literature: Bloom and Patrik, A Methodology for Avoiding the
Pitfalls of Excess Loss Development (CAS E-Forum, Fall 2013), pages
4 to 8; Pinto and Gogol, An Analysis of Excess Loss Development
(PCAS 74, 1987); and Bear’s discussion of it (PCAS 79, 1992).
knowledge/references/excess-development-literature.md
summarises what each source prints. Sections 4 to 6 use a simulated book
with a sparse layer.
How the numbers here are checked. CI
(R/prospicio/tests/test-guides.R) runs each chunk that has
a text block after it and compares its output (a table prints as its
formatted cells) with that text. This is the R twin of the Python guide
reserving-excess-layers.md,
with the same sections and data. The simulated books use the same
generator, so the figures equal the Python guide’s.
1. Why a layer develops slowly
Suppose every claim grows by the same factor between two ages, as case reserves do. Claims below the attachment give the layer nothing at the earlier age, and some rise above it later, so the layer grows from the claims already in it and from the claims that enter it. The table is the design note’s own calculation (not from a source): lognormal severity, log-sd 1.5, mean 65,000 at ultimate, every claim 1.3 times its earlier value, fixed counts.
ultimate <- lognormal(log(65000) - 1.5^2 / 2, 1.5) # mean 65,000
two_ages <- triangle(data.frame(year = 2020, age = c(12, 24), incurred = c(1, 1.3)),
"year", "age", "incurred")
note <- c("1m xs 0" = 1.275, "750k xs 250k" = 1.545, "2m xs 1m" = 1.761, "7m xs 3m" = 1.982)
layers <- list(excess_layer(0, 1e6), excess_layer(250e3, 750e3), excess_layer(1e6, 2e6),
excess_layer(3e6, 7e6))
factors <- data.frame(layer = names(note), prospicio = NA_real_, design_note = unname(note))
for (i in seq_along(layers)) {
p <- excess_pattern(two_ages, "incurred", layers[[i]], scale_shift(ultimate))
factors$prospicio[i] <- p@layer_ldf[1]
}
gt(factors, rowname_col = "layer") |>
tab_header("Layer factor from 12 to 24 months", "The ground-up factor is 1.3") |>
cols_label(design_note = "design note") |>
fmt_number(columns = prospicio, decimals = 4) |>
fmt_number(columns = design_note, decimals = 3)| Layer factor from 12 to 24 months | ||
| The ground-up factor is 1.3 | ||
| prospicio | design note | |
|---|---|---|
| 1m xs 0 | 1.2754 | 1.275 |
| 750k xs 250k | 1.5449 | 1.545 |
| 2m xs 1m | 1.7612 | 1.761 |
| 7m xs 3m | 1.9819 | 1.982 |
The higher the layer, the larger its factor (near 2 on the highest). The layer’s own triangle shows this only late, so the rest of this guide takes the factors from the dense ground-up triangle.
2. Bloom and Patrik’s example: the pitfall and the cure
Year One has four claims, reported at 100, 375, 250 and 500 at 12 months. Ground-up losses develop by 3.60 from 12 to 24 months and by 1.25 from 24 to 36 months (the end of development), so every claim reaches 4.5 times its 12-month value. Years Two and Three have the same claims with 5% inflation a year. The layer is all loss above a deductible of 350.
Every claim has the same factor, so this is exactly a scale
shift: the claims at age j are the ultimate claims
divided by a shift c_j, the ground-up factor to ultimate
(4.5, 1.25 and 1 at 12, 24 and 36 months). The chunk builds the paper’s
triangle at the end of Year Three and sets its excess column beside the
paper’s:
claims <- c(100, 375, 250, 500) # Year One at 12 months
to_ultimate <- c(4.5, 1.25, 1) # at 12, 24 and 36 months
price <- c(1, 1.05, 1.05^2) # 5% inflation a year
deductible <- 350
rows <- NULL
for (year in 1:3) {
for (k in 1:3) {
if (year + k <= 4) { # the cells known at the end of Year Three
sizes <- claims * price[year] * 4.5 / to_ultimate[k]
rows <- rbind(rows, data.frame(year = year, age = 12 * k, ground_up = sum(sizes),
excess = sum(pmax(sizes - deductible, 0)),
limited = sum(pmin(sizes, deductible))))
}
}
}
bp <- triangle(rows, "year", "age", c("ground_up", "excess", "limited"))
printed <- c(175, 3010, 4113, 219, 3231, 265)
excess_cells <- data.frame(cell = sprintf("Year %d, %d months", rows$year, rows$age),
prospicio = rows$excess, paper = printed)
gt(excess_cells, rowname_col = "cell") |>
tab_header("Excess of 350 at the end of Year Three", "Currency units") |>
fmt_number(columns = prospicio, decimals = 2, use_seps = FALSE) |>
fmt_integer(columns = paper)| Excess of 350 at the end of Year Three | ||
| Currency units | ||
| prospicio | paper | |
|---|---|---|
| Year 1, 12 months | 175.00 | 175 |
| Year 1, 24 months | 3010.00 | 3,010 |
| Year 1, 36 months | 4112.50 | 4,113 |
| Year 2, 12 months | 218.75 | 219 |
| Year 2, 24 months | 3230.50 | 3,231 |
| Year 3, 12 months | 264.69 | 265 |
The trap is to develop this excess triangle alone. Inflation moved more of Year Two’s claims above the deductible early, so the 12 to 24 month factor, from Years One and Two, overstates the development of Year Three:
own <- chain_ladder(bp, "excess")
truth <- sum(pmax(claims * price[3] * 4.5 - deductible, 0))
comma <- function(x, digits = 0, width = 1) {
formatC(x, format = "f", digits = digits, big.mark = ",", width = width)
}
cat(sprintf("own factors %.4f %.4f\n", own@ldf[1], own@ldf[2]))## own factors 15.8489 1.3663
overstated <- data.frame(
measure = c("Year Three ultimate", "True ultimate", "Overstatement (%)"),
prospicio = c(own@ultimate[3], truth, 100 * (own@ultimate[3] / truth - 1)),
paper = c(5732, 4678, 22.5))
gt(overstated, rowname_col = "measure") |>
tab_header("Developing the excess triangle alone", "Year Three, currency units") |>
fmt_number(columns = prospicio, rows = 1:2, decimals = 1) |>
fmt_number(columns = paper, rows = 1:2, decimals = 0) |>
fmt_number(columns = c(prospicio, paper), rows = 3, decimals = 1)| Developing the excess triangle alone | ||
| Year Three, currency units | ||
| prospicio | paper | |
|---|---|---|
| Year Three ultimate | 5,731.5 | 5,732 |
| True ultimate | 4,677.5 | 4,678 |
| Overstatement (%) | 22.5 | 22.5 |
The cure is to trend the severity, not the pattern: cut the layer
from each year’s claim sizes at that year’s price level. The severity is
each year’s ultimate claims (450, 1,687.5, 1,125 and 2,250 at Year One’s
prices), a grid_distribution() of four equal point masses.
A step of 112.5 hits all four exactly, so the layer expectations are
exact. excess_pattern() solves the shifts from the
ground-up triangle and returns the layer’s factors:
ultimate_claims <- function(price) {
probs <- numeric(21)
probs[c(4, 15, 10, 20) + 1] <- 0.25 # 450, 1,687.5, 1,125 and 2,250 at Year One's prices
grid_distribution(112.5 * price, probs)
}
paper <- list(c(17.20, 1.37, 23.50), c(14.77, 1.36, 20.06), c(13.08, 1.35, 17.67))
patterns <- list()
by_year <- NULL
for (year in 1:3) {
one_year <- triangle(
data.frame(year = year, age = c(12, 24, 36),
ground_up = sum(claims) * price[year] * 4.5 / to_ultimate),
"year", "age", "ground_up")
p <- excess_pattern(one_year, "ground_up", excess_layer(deductible),
scale_shift(ultimate_claims(price[year])))
patterns[[year]] <- p
by_year <- rbind(
by_year,
data.frame(year = sprintf("Year %d", year), a = p@layer_ldf[1], b = p@layer_ldf[2],
c = p@layer_cdf[1]),
data.frame(year = sprintf("Year %d, paper", year), a = paper[[year]][1],
b = paper[[year]][2], c = paper[[year]][3]))
}
gt(by_year, rowname_col = "year") |>
tab_header("Layer factors of each year", "Excess of 350") |>
cols_label(a = "12 to 24", b = "24 to 36", c = "12 to ultimate") |>
fmt_number(columns = c(a, b, c), rows = c(1, 3, 5), decimals = 4) |>
fmt_number(columns = c(a, b, c), rows = c(2, 4, 6), decimals = 2)| Layer factors of each year | |||
| Excess of 350 | |||
| 12 to 24 | 24 to 36 | 12 to ultimate | |
|---|---|---|---|
| Year 1 | 17.2000 | 1.3663 | 23.5000 |
| Year 1, paper | 17.20 | 1.37 | 23.50 |
| Year 2 | 14.7680 | 1.3583 | 20.0600 |
| Year 2, paper | 14.77 | 1.36 | 20.06 |
| Year 3 | 13.0797 | 1.3511 | 17.6719 |
| Year 3, paper | 13.08 | 1.35 | 17.67 |
The factors agree to the paper’s two decimals, and the unrounded
values are exact (17.2 = 3,010 / 175). @shifts holds the
c_j, the ground-up factors to ultimate, with the tail last
(1 here). With a counts column the count development is
divided out first; without one the counts are taken as complete.
cat("shifts", sprintf("%g", patterns[[1]]@shifts), " ground-up factors",
sprintf("%g", patterns[[1]]@ground_up_ldf), "\n")## shifts 4.5 1.25 1 ground-up factors 3.6 1.25
The pattern goes into any development method through
ldf, ldf_kind and ldf_weight:
excess_selected(p) gives them as a list for
do.call(), and p@tail is the layer’s tail. One
pattern serves every origin at the severity’s price level, so trend the
severity to the origins’ level first. Year Three’s pattern on the full
triangle is exact for Year Three and a little low for Year Two, whose
claims are at the previous year’s prices:
p3 <- patterns[[3]]
fit <- do.call(chain_ladder, c(list(bp, "excess", tail = p3@tail), excess_selected(p3)))
refit <- data.frame(
year = sprintf("Year %d", 1:3), ultimate = fit@ultimate,
true = vapply(1:3, function(y) sum(pmax(claims * price[y] * 4.5 - deductible, 0)), numeric(1)))
refit$error <- 100 * (refit$ultimate / refit$true - 1)
gt(refit, rowname_col = "year") |>
tab_header("Year Three's pattern on the full triangle", "Excess of 350") |>
cols_label(error = "error (%)") |>
fmt_number(columns = c(ultimate, true), decimals = 1, use_seps = FALSE) |>
fmt_number(columns = error, decimals = 2, force_sign = TRUE)| Year Three's pattern on the full triangle | |||
| Excess of 350 | |||
| ultimate | true | error (%) | |
|---|---|---|---|
| Year 1 | 4112.5 | 4112.5 | 0.00 |
| Year 2 | 4364.7 | 4388.1 | −0.53 |
| Year 3 | 4677.5 | 4677.5 | 0.00 |
Fit origins at different price levels or retentions in separate groups, each with its own pattern.
The excess loss factor route. Bloom and Patrik’s
section 4 reaches the same answer without a severity curve, from the
dense triangle limited to 350. The excess loss factor (ELF) is the share
of ultimate ground-up loss above 350, and
excess CDF = ELF / (1 / CDF_unlimited - (1 - ELF) / CDF_limited)
(Pinto and Gogol’s layer identity). For Year Three, with the limited
factor from the chain ladder:
limited <- chain_ladder(bp, "limited")
cdf_limited <- limited@ldf[1] * limited@ldf[2]
limited_ult <- rows$limited[6] * cdf_limited # Year Three at 12 months
ground_up_ult <- rows$ground_up[6] * 4.5
elf <- 1 - limited_ult / ground_up_ult
route <- data.frame(
measure = c("Limited factor, 12 to 24", "ELF", "Excess factor to ultimate",
"From the paper's rounded inputs", "Scale shift, exact"),
prospicio = c(limited@ldf[1], elf, elf / (1 / 4.5 - (1 - elf) / cdf_limited),
0.764 / (1 / 4.5 - (1 - 0.764) / 1.32), p3@layer_cdf[1]),
paper = c(1.32, 0.764, 17.54, NA, NA))
gt(route, rowname_col = "measure") |>
tab_header("Year Three by the excess loss factor route", "Excess of 350") |>
fmt_number(columns = prospicio, decimals = 4) |>
fmt_number(columns = paper, rows = c(1, 3), decimals = 2) |>
fmt_number(columns = paper, rows = 2, decimals = 3) |>
sub_missing(columns = paper, missing_text = "")| Year Three by the excess loss factor route | ||
| Excess of 350 | ||
| prospicio | paper | |
|---|---|---|
| Limited factor, 12 to 24 | 1.3223 | 1.32 |
| ELF | 0.7637 | 0.764 |
| Excess factor to ultimate | 17.5364 | 17.54 |
| From the paper's rounded inputs | 17.5898 | |
| Scale shift, exact | 17.6719 | |
The paper’s 17.54 (from unrounded inputs) is 0.77% below the exact 17.67, because the limited factor, like the excess factor above, is estimated on older years.
3. Shape drift: Pinto and Gogol, and Bear
Pinto and Gogol found in ISO data that the tail of the size
distribution also becomes heavier as claims mature: a Pareto fitted
above a threshold k has a shape q that falls
with maturity. Their factor for the losses excess of c k is
the development of the losses excess of k times
c^(q_i - q_j); with the counts above k as the
base it also has a ratio of (q - 1) terms.
pareto_shape() takes the threshold, a shape at every age
(named by age) and at ultimate, and the base that the column holds
(base = "counts", or an excess_layer()). The
column then holds the base development, not the ground-up losses.
shape_factor <- function(base_development, threshold, shapes, layer, base) {
tri <- triangle(data.frame(year = 2020, age = c(12, 24), base = c(1, base_development)),
"year", "age", "base")
model <- pareto_shape(threshold, c("12" = shapes[1], "24" = shapes[2]), shapes[2], base = base)
excess_pattern(tri, "base", layer, model)@layer_ldf[1]
}
# Pinto and Gogol p. 247: losses excess of 25,000 develop by 2.5, q from 1.75 to 1.25.
pg <- shape_factor(2.5, 25000, c(1.75, 1.25), excess_layer(100000), excess_layer(25000))
# The same from the counts above 25,000: they develop by 2.5 (0.25 / 0.75).
pgc <- shape_factor(2.5 * 0.25 / 0.75, 25000, c(1.75, 1.25), excess_layer(100000), "counts")
# Bear p. 138: the layer 100,000 to 300,000 develops by 3.5, q from 1.25 to 1.10.
bear <- shape_factor(3.5, 100000, c(1.25, 1.10), excess_layer(200000, 400000),
excess_layer(100000, 200000))
examples <- data.frame(
example = c("Pinto and Gogol p. 247, excess of 100,000",
"The same from the counts above 25,000",
"Bear p. 138, layer 200,000 to 600,000"),
prospicio = c(pg, pgc, bear), paper = c(5, NA, 3.88)) # 2.5 (4)^0.5 = 5.0
gt(examples, rowname_col = "example") |>
tab_header("Layer factors under shape drift", "Pinto and Gogol print 2.5 x 4^0.5 = 5.0") |>
fmt_number(columns = prospicio, decimals = 4) |>
fmt_number(columns = paper, decimals = 2) |>
sub_missing(columns = paper, missing_text = "")| Layer factors under shape drift | ||
| Pinto and Gogol print 2.5 x 4^0.5 = 5.0 | ||
| prospicio | paper | |
|---|---|---|
| Pinto and Gogol p. 247, excess of 100,000 | 5.0000 | 5.00 |
| The same from the counts above 25,000 | 5.0000 | |
| Bear p. 138, layer 200,000 to 600,000 | 3.8835 | 3.88 |
Pinto and Gogol’s Appendix B works the shape drift from 27 months to
ultimate above 10,000 (q from 1.6 to 1.3). It prints the
losses of several retentions and layers as multiples of the losses
excess of 10,000, to three decimals. The ratio of the two ages is the
layer’s factor relative to the base development a:
appendix_b <- data.frame( # in thousands; NA is unlimited; the amounts as printed
from = c(100, 300, 500, 1000, 100, 300, 500), to = c(NA, NA, NA, NA, 300, 500, 1000),
at27 = c(0.251, 0.130, 0.096, 0.063, 0.121, 0.034, 0.033),
ult = c(0.501, 0.360, 0.309, 0.251, 0.141, 0.051, 0.058))
appendix <- NULL
for (i in seq_len(nrow(appendix_b))) {
r <- appendix_b[i, ]
layer <- if (is.na(r$to)) excess_layer(r$from * 1e3) else excess_layer(r$from * 1e3, (r$to - r$from) * 1e3)
f <- shape_factor(1, 10000, c(1.6, 1.3), layer, excess_layer(10000))
name <- if (is.na(r$to)) {
sprintf("excess of %sk", formatC(r$from, format = "d", big.mark = ","))
} else {
sprintf("%sk to %sk", formatC(r$from, format = "d", big.mark = ","),
formatC(r$to, format = "d", big.mark = ","))
}
appendix <- rbind(appendix, data.frame(layer = name, prospicio = f, ultimate = r$ult,
at27 = r$at27, ratio = r$ult / r$at27))
}
gt(appendix, rowname_col = "layer") |>
tab_header("Pinto and Gogol's Appendix B", "Layer factor as a multiple of a") |>
cols_label(at27 = "27 months", ratio = "paper ratio") |>
fmt_number(columns = prospicio, decimals = 4) |>
fmt_number(columns = c(ultimate, at27, ratio), decimals = 3)| Pinto and Gogol's Appendix B | ||||
| Layer factor as a multiple of a | ||||
| prospicio | ultimate | 27 months | paper ratio | |
|---|---|---|---|---|
| excess of 100k | 1.9953 | 0.501 | 0.251 | 1.996 |
| excess of 300k | 2.7742 | 0.360 | 0.130 | 2.769 |
| excess of 500k | 3.2336 | 0.309 | 0.096 | 3.219 |
| excess of 1,000k | 3.9811 | 0.251 | 0.063 | 3.984 |
| 100k to 300k | 1.1606 | 0.141 | 0.121 | 1.165 |
| 300k to 500k | 1.4932 | 0.051 | 0.034 | 1.500 |
| 500k to 1,000k | 1.7843 | 0.058 | 0.033 | 1.758 |
Excess of 100,000 is exactly 10^0.3 = 1.99526 times
a; the paper’s 1.996 is the ratio of rounded amounts. The
other rows agree within that rounding (0.033 can be anything from 0.0325
to 0.0335).
Shape drift needs a shape at every age, so claim-level data or
layered losses by maturity; a scale shift needs only the ground-up
triangle. The two differ on high layers when the tail becomes heavier.
In a simulation study
(knowledge/findings/excess-simulation-study.md, 500 books
per arm) with drifting shapes, the scale shift understates the ultimate
of the sparse layer by about 26% and of the thin layer by 14%;
pareto_shape() with the true shapes is unbiased.
4. A sparse layer on a simulated book
We simulate a book with a known truth: ten accident years, 2015 to 2024, of 120 claims each, valued at the end of 2024. Ultimate claim sizes are lognormal (mean about 30,000, log-sd 1.8). The reported value at each age is the ultimate divided by a shift that falls from 3.0 at 12 months to 1.01 at 120 months (the last 1% is the tail). The book follows the scale shift by construction, so it shows the mechanics and does not test the model; the simulation study above is the test.
A small linear congruential generator, written out in the chunk, draws the uniforms (the Python guide draws the same claims). The chunk tracks a high layer (750,000 xs 250,000) and a working layer (400,000 xs 100,000), and counts the claims in each:
sev <- lognormal(8.7, 1.8)
years <- 2015:2024
ages <- 12 * (1:10)
shift <- c(3.0, 1.8, 1.4, 1.2, 1.1, 1.05, 1.03, 1.02, 1.015, 1.01) # ultimate / reported
n_claims <- 120
premium <- 5500000
ground_up_tail <- 1.01
book_layers <- list(high = excess_layer(250000, 750000), working = excess_layer(100000, 400000))
in_layer <- function(x, layer) pmin(pmax(x - layer@attachment, 0), layer@limit)
simulate <- function(seed) {
# One book: its triangle and each layer's true ultimate by origin.
state <- seed
claims <- list()
for (y in years) {
u <- numeric(n_claims)
for (i in seq_len(n_claims)) { # Park and Miller's minimal standard generator
state <- (state * 16807) %% 2147483647
u[i] <- state / 2147483647
}
claims[[as.character(y)]] <- quantile(sev, u)
}
cells <- list()
for (y in years) {
for (j in seq_along(ages)) {
if ((y - 2015) + (j - 1) <= 9) { # the cells known at the end of 2024
reported <- claims[[as.character(y)]] / shift[j]
cell <- list(origin = y, age = ages[j], incurred = sum(reported), premium = premium)
for (name in names(book_layers)) {
cell[[name]] <- sum(in_layer(reported, book_layers[[name]]))
cell[[paste0(name, "_n")]] <- sum(reported > book_layers[[name]]@attachment)
}
cells[[length(cells) + 1]] <- cell
}
}
}
long <- do.call(rbind, lapply(cells, as.data.frame))
book <- triangle(long, "origin", "age", setdiff(names(long), c("origin", "age")))
truth <- lapply(book_layers, function(layer) {
vapply(years, function(y) sum(in_layer(claims[[as.character(y)]], layer)), numeric(1))
})
list(book = book, truth = truth)
}
sim <- simulate(20241231)
book <- sim$book
truth <- sim$truth
latest <- function(column) unname(latest_diagonal(book)[1, column, ])
latest_high <- data.frame(origin = as.character(years), ground_up = latest("incurred"),
high_layer = latest("high"), claims = latest("high_n"),
true_ultimate = truth$high)
latest_high <- rbind(latest_high, data.frame(origin = "total", as.list(colSums(latest_high[-1]))))
gt(latest_high, rowname_col = "origin") |>
tab_header("The simulated book at the end of 2024", "Currency units; claims in the high layer") |>
cols_label(ground_up = "ground-up", high_layer = "high layer",
true_ultimate = "true high ultimate") |>
fmt_integer(columns = c(ground_up, high_layer, claims, true_ultimate))| The simulated book at the end of 2024 | ||||
| Currency units; claims in the high layer | ||||
| ground-up | high layer | claims | true high ultimate | |
|---|---|---|---|---|
| 2015 | 2,297,915 | 0 | 0 | 0 |
| 2016 | 3,338,009 | 534,042 | 3 | 553,303 |
| 2017 | 2,509,633 | 255,071 | 2 | 270,172 |
| 2018 | 2,473,626 | 210,437 | 1 | 224,250 |
| 2019 | 3,066,471 | 565,998 | 2 | 619,298 |
| 2020 | 2,652,024 | 173,574 | 1 | 215,931 |
| 2021 | 2,499,806 | 101,581 | 1 | 206,309 |
| 2022 | 3,187,793 | 614,715 | 4 | 1,260,601 |
| 2023 | 2,103,713 | 17,007 | 1 | 494,749 |
| 2024 | 965,657 | 0 | 0 | 161,796 |
| total | 25,094,646 | 2,472,425 | 15 | 4,006,410 |
The high layer’s own chain ladder fails: 2015, the only origin at the oldest link, is zero, so that factor has no estimate. The working layer’s runs, on factors from a few claims:
msg <- tryCatch({
chain_ladder(book, "high", tail = ground_up_tail)
"ran"
}, error = conditionMessage)
cat("high layer, own chain ladder:", msg, "\n")## high layer, own chain ladder: factor from development index 8: earlier values sum to zero
own_working <- chain_ladder(book, "working", tail = ground_up_tail)
cat("working layer, own factors", sprintf("%.3f", own_working@ldf), "\n")## working layer, own factors 3.055 1.521 1.321 1.159 1.079 1.036 1.018 1.009 1.016
The derived patterns need only the ground-up column and the ultimate severity (here the true one; in practice fit it to trended ultimate claims). They are incurred patterns from volume-weighted ground-up factors, and the ground-up tail of 1.01 gives each layer its own, larger tail. The table’s shift is the one at the start of each link; the last row is the tail:
derived <- lapply(book_layers, function(layer) {
excess_pattern(book, "incurred", layer, scale_shift(sev), tail = ground_up_tail)
})
p <- derived$high
dev <- data.frame(
link = c(sprintf("%d to %d", ages[-10], ages[-10] + 12), "tail"), shift = p@shifts,
ground_up = c(p@ground_up_ldf, p@ground_up_tail),
high_layer = c(derived$high@layer_ldf, derived$high@tail),
working_layer = c(derived$working@layer_ldf, derived$working@tail))
gt(dev, rowname_col = "link") |>
tab_header("Age-to-age factors, in months", "Derived from the ground-up triangle") |>
cols_label(ground_up = "ground-up", high_layer = "high layer",
working_layer = "working layer") |>
fmt_number(columns = shift, decimals = 3) |>
fmt_number(columns = c(ground_up, high_layer, working_layer), rows = 1:9, decimals = 3) |>
fmt_number(columns = c(ground_up, high_layer, working_layer), rows = 10, decimals = 4)| Age-to-age factors, in months | ||||
| Derived from the ground-up triangle | ||||
| shift | ground-up | high layer | working layer | |
|---|---|---|---|---|
| 12 to 24 | 3.000 | 1.667 | 2.446 | 2.180 |
| 24 to 36 | 1.800 | 1.286 | 1.513 | 1.431 |
| 36 to 48 | 1.400 | 1.167 | 1.278 | 1.236 |
| 48 to 60 | 1.200 | 1.091 | 1.145 | 1.124 |
| 60 to 72 | 1.100 | 1.048 | 1.074 | 1.064 |
| 72 to 84 | 1.050 | 1.019 | 1.030 | 1.026 |
| 84 to 96 | 1.030 | 1.010 | 1.015 | 1.013 |
| 96 to 108 | 1.020 | 1.005 | 1.008 | 1.006 |
| 108 to 120 | 1.015 | 1.005 | 1.008 | 1.006 |
| tail | 1.010 | 1.0100 | 1.0153 | 1.0131 |
cat("to ultimate at 12 months: ground-up", sprintf("%.2f,", shift[1]),
paste(sprintf("%s %.2f", names(derived), sapply(derived, function(q) q@layer_cdf[1])),
collapse = ", "), "\n")## to ultimate at 12 months: ground-up 3.00, high 6.27, working 4.91
library(ggplot2, exclude = "layer") # keeps prospicio's layer()
link_ages <- ages[-length(ages)]
factors <- rbind(
data.frame(age = link_ages, series = "ground-up", factor = p@ground_up_ldf),
data.frame(age = link_ages, series = "working layer", factor = derived$working@layer_ldf),
data.frame(age = link_ages, series = "high layer", factor = derived$high@layer_ldf))
ggplot(factors, aes(age, factor, colour = series)) +
geom_line(linewidth = 0.8) +
geom_point(size = 2) +
scale_y_log10(breaks = c(1, 1.5, 2, 2.5)) +
scale_x_continuous(breaks = link_ages) +
labs(x = "age at the start of the link (months)", y = "age-to-age factor (log scale)",
colour = NULL, title = "The higher the layer, the slower it develops") +
theme(legend.position = "top")The next chunks fit the chain ladder, Mack and the
Bornhuetter-Ferguson (BF) on the high layer with
excess_selected(p) and tail = p@tail. The BF
prior is the ground-up expected loss ratio times the premium times the
layer share (section 6):
elr <- n_claims * mean(sev) / premium
share <- layer_share(sev, book_layers$high)
layered <- layer_exposure(book, "premium", share, "high_premium")
cl <- do.call(chain_ladder, c(list(book, "high", tail = p@tail), excess_selected(p)))
mk <- do.call(mack, c(list(book, "high", tail = p@tail), excess_selected(p)))
bf <- do.call(bornhuetter_ferguson, c(list(layered, "high", "high_premium", apriori = elr,
tail = p@tail), excess_selected(p)))
cat(sprintf("ground-up ELR %.4f, layer share %.4f, expected layer ultimate a year %s\n", elr, share,
comma(elr * share * premium)))## ground-up ELR 0.6618, layer share 0.1603, expected layer ultimate a year 583,548
ultimates <- data.frame(origin = as.character(years), chain_ladder = unname(cl@ultimate),
BF = unname(bf@ultimate), true = truth$high)
ultimates <- rbind(ultimates, data.frame(origin = "total", as.list(colSums(ultimates[-1]))))
gt(ultimates, rowname_col = "origin") |>
tab_header("Ultimate loss in the high layer", "Currency units") |>
cols_label(chain_ladder = "chain ladder") |>
fmt_integer(columns = c(chain_ladder, BF, true))| Ultimate loss in the high layer | |||
| Currency units | |||
| chain ladder | BF | true | |
|---|---|---|---|
| 2015 | 0 | 8,785 | 0 |
| 2016 | 546,307 | 547,143 | 553,303 |
| 2017 | 262,895 | 272,438 | 270,172 |
| 2018 | 220,153 | 236,191 | 224,250 |
| 2019 | 609,855 | 607,963 | 619,298 |
| 2020 | 200,936 | 253,038 | 215,931 |
| 2021 | 134,694 | 245,040 | 206,309 |
| 2022 | 1,041,936 | 853,985 | 1,260,601 |
| 2023 | 43,614 | 373,000 | 494,749 |
| 2024 | 0 | 490,530 | 161,796 |
| total | 3,060,390 | 3,888,113 | 4,006,410 |
cat(sprintf("Mack reserve %s, standard error %s\n", comma(mk@total_reserve),
comma(mk@total_standard_error)))## Mack reserve 587,966, standard error 210,007
by_year <- rbind(
data.frame(year = years, method = "chain ladder", ultimate = cl@ultimate / 1e3),
data.frame(year = years, method = "Bornhuetter-Ferguson", ultimate = bf@ultimate / 1e3))
ggplot() +
geom_col(aes(year, ultimate, fill = "true ultimate"),
data = data.frame(year = years, ultimate = truth$high / 1e3)) +
geom_line(aes(year, ultimate, colour = method), data = by_year, linewidth = 0.8) +
geom_point(aes(year, ultimate, colour = method), data = by_year, size = 2) +
scale_fill_manual(values = c("true ultimate" = "grey75")) +
scale_x_continuous(breaks = years) +
labs(x = "accident year", y = "ultimate loss in the high layer (thousands)",
fill = NULL, colour = NULL,
title = "The BF fills the immature years that the chain ladder leaves empty") +
theme(legend.position = "top")The chain ladder does not see unreported losses: 2024’s layer is empty at 12 months, so its ultimate is zero, and the single small claim of 2023 develops to only 43,614. The BF puts the expected layer loss on the unreported part, so it is the usual method for an immature layer, and its total is nearer the truth. Where the layer losses are nearly all reported (2016 to 2019), the methods agree. This is one book; section 5 compares them over a hundred.
Mack’s standard error is large against its reserve: the selected pattern has no parameter error, and the process error of a few claims is large.
5. Blending with the layer’s own development
When a layer has data of its own, blend the derived pattern with its
own factors: f = w f_derived + (1 - w) f_own, with
w = 1 - n / (n + k) at each age
(excess_credibility_weights()). n is the
number of layer claims at the earlier age (with a counts
column), or else the number of origins with a positive earlier value.
k is a required credibility constant; the simulation
study’s candidate, k = 20, is used here. A cap limits the
credibility further: removing any one origin moves the blended factor by
at most max_influence of it (0.1 here), so one very large
link ratio cannot dominate. Where the layer’s own factor cannot be
estimated, the weight is exactly 1:
weights <- data.frame(link = sprintf("%d to %d", ages[-10], ages[-10] + 12))
for (name in c("high", "working")) {
weights[[name]] <- unname(excess_credibility_weights(
derived[[name]], book, name, k = 20, max_influence = 0.1, counts = paste0(name, "_n")))
}
gt(weights, rowname_col = "link") |>
tab_header("Weight on the derived pattern", "Months; k = 20, max_influence = 0.1") |>
cols_label(high = "high layer", working = "working layer") |>
fmt_number(columns = c(high, working), decimals = 3)| Weight on the derived pattern | ||
| Months; k = 20, max_influence = 0.1 | ||
| high layer | working layer | |
|---|---|---|
| 12 to 24 | 0.909 | 0.556 |
| 24 to 36 | 0.741 | 0.455 |
| 36 to 48 | 0.714 | 0.426 |
| 48 to 60 | 0.714 | 0.426 |
| 60 to 72 | 0.714 | 0.444 |
| 72 to 84 | 0.769 | 0.476 |
| 84 to 96 | 0.800 | 0.513 |
| 96 to 108 | 0.870 | 0.606 |
| 108 to 120 | 1.000 | 0.741 |
The high layer’s few claims leave most of the weight on the derived
pattern, and exactly 1 at the oldest age, where the zero of 2015 gives
no own factor. Pass the weights to excess_selected():
do.call(chain_ladder, c(list(book, "high", tail = p@tail), excess_selected(p, w))).
One book cannot rank the methods, because a few large claims decide
the result. So we simulate a hundred books (seeds 1 to 100, the same
model) and compare the error of each layer’s total ultimate under four
methods: the layer’s own chain ladder, the derived pattern, the blend
with k = 20, and the BF with the derived pattern. Mean
error and root mean square error (RMSE) are relative to the mean true
ultimate:
runs <- list()
for (seed in 1:100) {
s <- simulate(seed)
for (name in names(book_layers)) {
layer <- book_layers[[name]]
q <- excess_pattern(s$book, "incurred", layer, scale_shift(sev), tail = ground_up_tail)
w <- excess_credibility_weights(q, s$book, name, k = 20, max_influence = 0.1,
counts = paste0(name, "_n"))
lb <- layer_exposure(s$book, "premium", layer_share(sev, layer), "layer_premium")
methods <- list(
"own chain ladder" = function() chain_ladder(s$book, name, tail = ground_up_tail),
"derived pattern" = function() {
do.call(chain_ladder, c(list(s$book, name, tail = q@tail), excess_selected(q)))
},
"blend, k = 20" = function() {
do.call(chain_ladder, c(list(s$book, name, tail = q@tail), excess_selected(q, w)))
},
"BF, derived" = function() {
do.call(bornhuetter_ferguson, c(list(lb, name, "layer_premium", apriori = elr,
tail = q@tail), excess_selected(q)))
})
for (label in names(methods)) {
error <- tryCatch(sum(methods[[label]]()@ultimate) - sum(s$truth[[name]]),
error = function(e) NA) # the own factors cannot be estimated
key <- paste(name, label, sep = "|")
runs[[key]] <- rbind(runs[[key]], c(error = error, truth = sum(s$truth[[name]])))
}
}
}
study <- do.call(rbind, lapply(names(runs), function(key) {
v <- runs[[key]]
ok <- v[!is.na(v[, "error"]), "error"]
mean_truth <- mean(v[, "truth"])
parts <- strsplit(key, "|", fixed = TRUE)[[1]]
data.frame(method = paste(parts[1], parts[2], sep = ", "), runs = length(ok),
mean_error = 100 * mean(ok) / mean_truth,
rmse = 100 * sqrt(sum(ok^2) / length(ok)) / mean_truth)
}))
gt(study, rowname_col = "method") |>
tab_header("Error of the total ultimate over 100 simulated books") |>
cols_label(mean_error = "mean error (%)", rmse = "RMSE (%)") |>
fmt_number(columns = mean_error, decimals = 1, force_sign = TRUE) |>
fmt_number(columns = rmse, decimals = 1) |>
fmt_integer(columns = runs)| Error of the total ultimate over 100 simulated books | |||
| runs | mean error (%) | RMSE (%) | |
|---|---|---|---|
| high, own chain ladder | 93 | +19.2 | 95.1 |
| high, derived pattern | 100 | −3.9 | 15.5 |
| high, blend, k = 20 | 100 | −1.9 | 19.4 |
| high, BF, derived | 100 | +0.5 | 9.5 |
| working, own chain ladder | 100 | −0.3 | 13.1 |
| working, derived pattern | 100 | −2.0 | 8.1 |
| working, blend, k = 20 | 100 | −1.2 | 9.9 |
| working, BF, derived | 100 | −0.6 | 4.4 |
The own chain ladder fails on seven high-layer books. Where it runs, it overstates the high layer by a fifth, with an RMSE near the full ultimate, because the early link ratios of a few claims are very large. The derived pattern cuts the RMSE to a fraction of that on both layers; it is a little low because an origin with no loss yet in the layer stays at zero. The BF is best, because it does not multiply the chance results of the immature years, but the test favours it: it uses the true loss ratio and severity, and a real prior only approximates them.
Here the model holds exactly, so the derived pattern needs no help.
The reason to blend is that the severity assumption may be wrong: in the
simulation study, under shape drift, a blend near k = 20
beat both the derived pattern and the own factors on the thin layer, and
without the max_influence cap a small k gave
very large errors on the sparse layer.
6. A Bornhuetter-Ferguson prior from the layer share
The a-priori layer ultimate of origin i is its exposure
times a ground-up expected loss ratio times the layer share
s, the expected share of ground-up loss in the layer. For a
severity, s = (LEV(b) - LEV(a)) / mean on the ultimate
basis (layer_share()); for an exposure curve, use
exposure_layer_share(curve, limit, attachment, mpl).
layer_exposure() copies the triangle with the exposure
column times the share (one share, or one per origin), and each
expected-loss method accepts the copy as its exposure. Cape Cod, unlike
the BF of section 4, estimates the layer’s loss ratio from the layer’s
own used-up exposure, through the same derived pattern:
cc <- do.call(cape_cod, c(list(layered, "high", "high_premium", tail = p@tail), excess_selected(p)))
true_ratio <- sum(truth$high) / (length(years) * premium * share)
methods <- data.frame(
method = c("BF (the ground-up ELR)", "Cape Cod", "True"),
loss_ratio = c(elr, cc@apriori[1], true_ratio),
total_ultimate = c(sum(bf@ultimate), sum(cc@ultimate), sum(truth$high)))
gt(methods, rowname_col = "method") |>
tab_header("Loss ratio and total ultimate of the high layer",
"Loss ratio to the layer premium; currency units") |>
cols_label(loss_ratio = "loss ratio", total_ultimate = "total ultimate") |>
fmt_number(columns = loss_ratio, decimals = 4) |>
fmt_integer(columns = total_ultimate)| Loss ratio and total ultimate of the high layer | ||
| Loss ratio to the layer premium; currency units | ||
| loss ratio | total ultimate | |
|---|---|---|
| BF (the ground-up ELR) | 0.6618 | 3,888,113 |
| Cape Cod | 0.3702 | 3,264,359 |
| True | 0.4544 | 4,006,410 |
This book is light: its layer losses are about two thirds of what the prior expects. Cape Cod follows the experience down, below the true ratio; the BF keeps the prior’s weight on the immature years.
The share is an estimate, and its error belongs in the distribution
of the reserve. layer_share_prior() with
bayes_bf_layer() puts it there through the normalised
Bayesian BF (bayes_bf_normalised()): the layer’s expected
ultimate gets a gamma prior with mean
ELR x share x exposure and, for a product of independent
variables, cv^2 = (1 + cv_elr^2)(1 + cv_share^2) - 1. The
model estimates its pattern from the layer’s own triangle under a vague
prior, so the derived excess pattern does not enter and an own factor is
needed at every age. The high layer has none at its oldest age, so this
part uses the working layer:
working_share <- layer_share(sev, book_layers$working)
prior <- layer_share_prior(elr, working_share, apriori_cv = 0.1, share_cv = 0.3)
cat(sprintf("working layer share %.4f; prior cv %.4f = sqrt(1.01 x 1.09 - 1) = %.4f\n",
working_share, prior@cv, sqrt(1.01 * 1.09 - 1)))## working layer share 0.2590; prior cv 0.3176 = sqrt(1.01 x 1.09 - 1) = 0.3176
fit <- bayes_bf_layer(book, "working", "premium", prior, seed = 1, n_sims = 2000)
cat(sprintf("prior ultimate a year %s = %.4f x %.4f x %s\n", comma(fit@prior_ultimate[1]), elr,
working_share, comma(premium)))## prior ultimate a year 942,605 = 0.6618 x 0.2590 x 5,500,000
The posterior is a Monte Carlo result whose last digits differ
between platforms (see reserving-meyers.qmd), so
the guide prints only the exact prior. fit@reserves is the
predictive distribution of the reserve.
The layer has one share, so its error is common to every origin.
layer_share_prior() models it so by default
(share_dependence = "common", #518): one gamma multiplier
with mean 1 and cv share_cv applies to every origin’s prior
and is drawn with the other parameters, so all origins update the share
together. "per_origin" draws an independent error at each
origin. Each origin’s prior is the same under both, the prior of the
total is not; layer_prior_total() gives it in closed
form:
exposure_values <- rep(premium, length(years))
for (dependence in c("common", "per_origin")) {
p <- layer_share_prior(elr, working_share, apriori_cv = 0.1, share_cv = 0.3,
share_dependence = dependence)
total <- layer_prior_total(p, exposure_values)
cat(sprintf("%-10s prior total mean %s sd %s\n", dependence, comma(total[["mean"]]),
comma(total[["sd"]])))
}## common prior total mean 9,426,049 sd 2,844,887
## per_origin prior total mean 9,426,049 sd 946,837
Independent errors understate the prior sd of the total by a factor of three. The posterior moves the other way: when the ten origins identify the share, each origin stays near its prior with the loss ratio’s own cv, so the common share gives the narrower fitted interval.
On a validation layer (a quarter of GenIns’s paid triangle, in
knowledge/findings/excess-bayes-prior.md), the mean
total-reserve sd over seeds 1 to 20 (common share) or 10 (independent
errors) was about 497,000 at a share cv of 0.3 under the common share,
and rose only about 2% as the cv went to 1.5. Under independent errors
it rose from 514,000 to 730,000 (about 42%). One fit’s sd moves by about
1.5% between seeds, so compare runs over several seeds. Where the data
cannot identify the share (few origins, or all origins immature), the
common model’s total stays wider.
See also
-
reserving-methods.md: which reserving method to use when. -
choosing-a-method.md: the library’s methods by question. -
experience-and-exposure-rating.md(Python guide): claim-level development (IBNER) withDevelopmentPattern. -
docs/design/reserving-excess.md: the method, the API and the validation targets as designed, with the simulation study’s results. -
R/prospicio/tests/test-reserving-excess.RandR/prospicio/tests/test-reserving-bayes-excess-prior.R: the bindings’ tests.