Property catastrophe 5: the money around the loss
cat-5-beyond-loss.RmdRendered from docs/guides/cat-5-beyond-loss.qmd.
The code runs each time the site is built, so the output below is
current.
A treaty moves more money than its claims: premium, reinstatement premium, commission, brokerage and interest on collateral. Some of these flows depend on the losses, so they change the shape of the result, not only its mean.
This page prices each flow on the same 2,000 simulated years of the Larkspur Re book.
This is the R twin of the Python guide cat-5-beyond-loss.md,
with the same sections, files and numbers.
R/prospicio/tests/test-guides.R checks that each chunk
prints the text under it.
Money is in millions of Varland crowns. The story, the files and the notation are on the overview.
1. Words
What a reinsurance price is (a Python guide) explains these terms for any layer. This page adds the cat-specific part: the season and the loss shape.
- Reinstatement premium: what the cedent pays to restore a used limit, so the layer can pay again in the same year. The contract sets it as a rate of the upfront premium for each full limit restored.
- Pro rata as to amount: the cedent pays for the share of the limit restored. Pro rata as to time also scales each restoration by the share of the year still to run at the time of the loss.
- Ceding commission: a share of the premium paid back to the cedent for its costs. A sliding scale makes that share depend on the loss ratio.
- Profit commission: a share of the treaty’s profit paid back to the cedent, after an allowance for the reinsurer’s costs and margin.
- Brokerage: the broker’s fee, a share of the premium.
- Deal ratios: each amount over the premium, year by year.
2. The book
The helper rebuilds one cedent’s years from the YELT, with times and
peril labels, and applies the hours clause (hours_clause())
where the contract has one. It is the helper of the other pages, except
that contract_layer() passes extra settings (here
pro_rata_time) to the layer.
The tests run from the repository root and Quarto from
docs/guides/, so find_data() looks for
examples/data/ upwards from the working directory. The code
reads every column as text, as Python’s csv module
does.
library(prospicio)
find_data <- function(name, dir = getwd()) {
repeat {
path <- file.path(dir, "examples", "data", name)
if (file.exists(path)) return(path)
parent <- dirname(dir)
if (identical(parent, dir)) stop("examples/data/", name, " not found", call. = FALSE)
dir <- parent
}
}
read_book <- function(name) {
utils::read.csv(find_data(name), colClasses = "character", na.strings = character())
}
YELT <- read_book("cat_book_yelt.csv")
CONTRACTS <- split(read_book("cat_book_contracts.csv"), ~contract)
CEDENTS <- split(read_book("cat_book_cedents.csv"), ~cedent)
N_YEARS <- 2000
cedent_events <- function(cedent, perils = "all") {
r <- YELT[YELT$cedent == cedent, ]
if (perils != "all") r <- r[r$peril %in% strsplit(perils, "+", fixed = TRUE)[[1]], ]
r <- r[order(as.integer(r$year)), ]
year <- factor(as.integer(r$year), levels = seq_len(N_YEARS))
time <- ((as.integer(r$day) - 1) * 24 + as.integer(r$hour)) / 8760
years <- unname(split(as.numeric(r$loss), year))
times <- unname(split(time, year))
with_labels(events_from_years(years, times = times), list(peril = r$peril))
}
num <- function(x) if (nzchar(x)) as.numeric(x) else NULL
contract_layer <- function(c, ...) {
sh <- num(c$share)
if (c$kind == "occurrence_xl") {
lim <- num(c$limit)
return(xol_layer(c$contract, lim, num(c$attachment), share = sh,
premium = num(c$rate_on_line) * lim * sh,
reinstatement_rates = rep(num(c$reinstatement_rate), as.integer(c$reinstatements)),
...))
}
if (c$kind == "aggregate_xl") {
al <- num(c$aggregate_limit)
return(xol_layer(c$contract, Inf, 0, share = sh,
aggregate_deductible = num(c$aggregate_deductible), aggregate_limit = al,
premium = num(c$rate_on_line) * al * sh, ...))
}
l <- xol_layer(c$contract, num(c$limit), 0, share = sh, aggregate_limit = num(c$aggregate_limit),
premium = sh * as.numeric(CEDENTS[[c$cedent]]$cat_premium), ...)
with_ceding_commission(l, num(c$ceding_commission))
}
subject <- function(c) {
e <- cedent_events(c$cedent, c$perils)
if (nzchar(c$hours)) hours_clause(e, as.numeric(c$hours)) else e
}
mean_of <- function(res, kind, name) {
mean(marginal(aggregate(res, keep = c("kind", "layer")), c(kind, name)))
}
# Python's print of a rounded number: no trailing zeros.
py <- function(x, digits) {
s <- format(round(x, digits), digits = 15)
if (grepl("^-?[0-9]+$", s)) paste0(s, ".0") else s
}
say <- function(...) cat(paste(...), "\n", sep = "")
for (name in c("alder_cat_1", "corran_qs", "bracken_agg")) {
say(name, CONTRACTS[[name]]$kind, "premium", py(contract_layer(CONTRACTS[[name]])@premium, 4))
}## alder_cat_1 occurrence_xl premium 1.8
## corran_qs quota_share premium 3.0
## bracken_agg aggregate_xl premium 0.45
Premium is Larkspur’s share: rate on line times limit times share for the excess covers, the ceded share of Corran’s catastrophe premium for the quota share.
3. Reinstatement premium
Intuition. alder_cat_1 is 40 xs 30 with
one reinstatement at 100%. The cedent pays the same share of the upfront
premium as the share of the limit restored. The layer pays at most 80 a
year at 100%.
Formula. With P the upfront premium,
l the limit, r_j the rate of reinstatement
j and Y the layer loss of the year at
100%:
RIP = P * sum over j of r_j * min(max(Y - (j - 1) * l, 0), l) / l
over the contract’s reinstatements. As to time, each restored piece
is also multiplied by 1 - t, where t is the
share of the year gone at its loss.
By hand. Two losses of 45 and 65 put 15 and then 35
into the layer. The contract restores all of the first but only 25 of
the second (one limit of 40): 40/40 of the premium, 1.8, as to amount.
If the losses fall a quarter and three quarters of the way through the
year, as to time gives (15 x 0.75 + 25 x 0.25) / 40 x 1.8 = 0.7875,
which reinstatement_premium() computes for the losses of
one year.
alder_c <- CONTRACTS[["alder_cat_1"]]
by_amount <- contract_layer(alder_c)
by_time <- contract_layer(alder_c, pro_rata_time = TRUE)
say("as to amount:", py(reinstatement_premium(by_amount, c(45, 65)), 4))## as to amount: 1.8
say("as to time: ", py(reinstatement_premium(by_time, c(45, 65), times = c(0.25, 0.75)), 4))## as to time: 0.7875
On the book. The tower’s result carries a
reinstatement_premium component next to the ceded loss.
library(gt)
alder <- subject(alder_c)
basis <- list("as to amount" = by_amount, "as to time" = by_time)
res <- lapply(basis, function(layer) apply_tower(reinsurance_tower(list(layer)), alder))
rip <- sapply(res, mean_of, "reinstatement_premium", "alder_cat_1")
book <- data.frame(
basis = names(basis),
ceded = sapply(res, mean_of, "ceded", "alder_cat_1"),
rip = rip,
ratio = rip / by_amount@premium,
change = c(NA, rip[["as to time"]] / rip[["as to amount"]] - 1)
)
gt(book, rowname_col = "basis") |>
tab_header("alder_cat_1: expected flows per year over 2,000 years",
"Millions of crowns; the ratio is over the upfront premium") |>
cols_label(ceded = "ceded loss", rip = "reinstatement premium", ratio = "premium ratio",
change = "change vs amount") |>
fmt_number(columns = c(ceded, rip), decimals = 4) |>
fmt_number(columns = ratio, decimals = 5) |>
fmt_number(columns = change, decimals = 3) |>
sub_missing(missing_text = "")| alder_cat_1: expected flows per year over 2,000 years | ||||
| Millions of crowns; the ratio is over the upfront premium | ||||
| ceded loss | reinstatement premium | premium ratio | change vs amount | |
|---|---|---|---|---|
| as to amount | 0.8230 | 0.1207 | 0.06705 | |
| as to time | 0.8230 | 0.0447 | 0.02484 | −0.629 |
As to time collects 63% less because of the season. By quarter
(events() and event_times() read the
occurrences of one year):
hits <- unlist(lapply(seq_len(N_YEARS), function(i) {
event_times(alder, i)[events(alder, i) > 30]
}))
quarters <- do.call(rbind, lapply(0:3, function(k) {
left <- 1 - hits[hits >= k / 4 & hits < (k + 1) / 4]
data.frame(quarter = paste0("Q", k + 1L), n = length(left), left = mean(left))
}))
quarters <- rbind(quarters, data.frame(quarter = "All", n = length(hits), left = mean(1 - hits)))
gt(quarters, rowname_col = "quarter") |>
tab_header(paste(length(hits), "occurrences reach alder_cat_1, by quarter of the year")) |>
cols_label(n = "occurrences", left = "mean share of the year left") |>
fmt_integer(columns = n) |>
fmt_number(columns = left, decimals = 3)| 241 occurrences reach alder_cat_1, by quarter of the year | ||
| occurrences | mean share of the year left | |
|---|---|---|
| Q1 | 22 | 0.843 |
| Q2 | 37 | 0.622 |
| Q3 | 114 | 0.340 |
| Q4 | 68 | 0.190 |
| All | 241 | 0.387 |
182 of the 241 occurrences come in the second half of the year. Alder’s large losses are mostly windstorms, and nine in ten fall between day 213 and day 305. A late loss restores limit for only a few months, so as to time the cedent pays only for those months. A peril spread evenly over the year would show a smaller gap. Use the basis of the treaty wording: for a seasonal peril the difference is material.
The reinstatement premium is proportional to the upfront premium, so the expected ratio (0.06705 as to amount) does not depend on the premium charged. Page 6 uses this to price a layer. Reinstatement premiums carry no ceding commission.
4. Commissions and brokerage on the quota share
corran_qs cedes 10% of each Corran occurrence up to an
event limit of 150 and an annual limit of 300, for 10% of Corran’s
catastrophe premium. The contract pays a flat ceding commission of
25%.
Formulas, all as shares of the premium
P with ceded loss C:
- ceding commission
CC = c - profit commission
PC = s * max(P * (1 - E) - C, 0) / P, whereEis the allowance: the reinsurer’s ceding commission, expenses and margin - brokerage
BK = b - combined ratio
C/P + CC + PC + BK, margin1 - combined ratio
Both sets of terms pay 2% brokerage (the excess cover in section 6 pays 10%).
- Flat commission plus profit commission. The profit commission returns 20% of the profit after an allowance of 35%: the 25% ceding commission plus 10% for the costs of Larkspur.
-
Sliding scale. The commission is 30% at a loss
ratio of 30% or less, 20% at 50% or more, and a straight line between.
with_sliding_scale()takes the commissions and the loss ratios as two vectors and replaces the flat commission.
deal_ratios() gives every ratio in every year. The table
shows the means.
q <- CONTRACTS[["corran_qs"]]
corran <- subject(q)
ratio_values <- function(layer) {
tower <- reinsurance_tower(list(layer))
ratios <- deal_ratios(tower, apply_tower(tower, corran), layer@name)
keys <- ratios@keys$ratio
setNames(sapply(keys, function(k) mean(marginal(ratios, k))), keys)
}
qs_terms <- with_brokerage(with_profit_commission(contract_layer(q), 0.2, 0.35), 0.02)
qs_slide <- with_brokerage(with_sliding_scale(contract_layer(q), c(0.30, 0.20), c(0.30, 0.50)), 0.02)
qs_means <- data.frame(ratio = names(ratio_values(qs_terms)))
qs_means$`flat + profit commission` <- ratio_values(qs_terms)[qs_means$ratio]
qs_means$`sliding scale` <- ratio_values(qs_slide)[qs_means$ratio]
gt(qs_means, rowname_col = "ratio") |>
tab_header("Corran quota share: mean ratios under two commission terms",
"Shares of premium; brokerage 2%") |>
fmt_number(columns = c(`flat + profit commission`, `sliding scale`), decimals = 4) |>
sub_missing(missing_text = "")| Corran quota share: mean ratios under two commission terms | ||
| Shares of premium; brokerage 2% | ||
| flat + profit commission | sliding scale | |
|---|---|---|
| loss_ratio | 0.4008 | 0.4008 |
| ceding_commission | 0.2500 | 0.2748 |
| profit_commission | 0.0838 | |
| brokerage | 0.0200 | 0.0200 |
| total_deductions | 0.3538 | 0.2948 |
| combined_ratio | 0.7547 | 0.6957 |
| nmbf | 0.2453 | 0.3043 |
| margin | 0.2453 | 0.3043 |
The expected loss ratio is 40%, but the profit commission is worth
8.4% of premium, not 20% of (65% - 40%) = 5%: the commission is large in
a quiet year and zero, never negative, in a bad one. The reinsurer gives
away part of the good years and keeps all of the bad ones. Likewise the
scale reads 25% at a loss ratio of 40%, yet its mean commission is
27.5%, because most years are below the mean and earn the top of the
scale. A margin from the expected loss ratio alone misses this.
nmbf (net margin before fees) equals the margin here: no
deduction is outside it.
Commission by loss ratio, and the loss ratio of Corran over the 2,000 years (up to 150%; 6% of the years are above):
library(ggplot2, exclude = "layer")
lr <- seq(0, 1, by = 0.01)
terms <- rbind(
data.frame(lr = lr, commission = 0.25, term = "flat 25%"),
data.frame(lr = lr, commission = 0.25 + 0.2 * pmax(0.65 - lr, 0),
term = "flat 25% + profit commission"),
data.frame(lr = lr, commission = approx(c(0.30, 0.50), c(0.30, 0.20), lr, rule = 2)$y,
term = "sliding scale")
)
tower_qs <- reinsurance_tower(list(qs_terms))
qs_lr <- marginal(deal_ratios(tower_qs, apply_tower(tower_qs, corran), "corran_qs"), "loss_ratio")@draws
ggplot(terms, aes(100 * lr, 100 * commission, colour = term)) +
geom_line(linewidth = 0.8) +
labs(x = "loss ratio (% of premium)", y = "commission (% of premium)", colour = NULL,
title = "Commission by loss ratio") +
theme(legend.position = "top")
ggplot(data.frame(lr = 100 * qs_lr), aes(lr)) +
geom_histogram(binwidth = 5, boundary = 0, fill = "grey75") +
coord_cartesian(xlim = c(0, 150)) +
labs(x = "loss ratio (% of premium)", y = "simulated years",
title = "Loss ratio of Corran (up to 150%)")A layer with paid reinstatements cannot take a profit commission or a sliding scale, so here they go on the quota share and the aggregate cover.
5. A no-claims bonus
A no-claims bonus returns a share of the premium when the cover pays
nothing in the year.
with_no_claims_bonus(layer, share, years, threshold) sets
the share returned, the years it looks back over, and the most ceded
loss that still earns it (default 0). Here it is 10% on
bracken_agg, the aggregate cover on Bracken’s convective
storm and flood losses:
b <- CONTRACTS[["bracken_agg"]]
bracken_cs_fl <- cedent_events("bracken", "CS+FL")
ncb <- with_no_claims_bonus(contract_layer(b), 0.10)
tower <- reinsurance_tower(list(ncb))
res <- apply_tower(tower, bracken_cs_fl)
ratios <- deal_ratios(tower, res, "bracken_agg")
ceded <- marginal(aggregate(res, keep = c("kind", "layer")), c("ceded", "bracken_agg"))@draws
p_clean <- sum(ceded == 0) / N_YEARS
say("chance of a year with no claim:", py(p_clean, 4))## chance of a year with no claim: 0.9675
say("10% times that chance: ", py(0.10 * p_clean, 4))## 10% times that chance: 0.0968
## mean no-claims bonus: 0.0967
The mean bonus is 10% times that chance, 0.09675 (the figures differ only in rounding). The bonus reads the ceded loss alone, so a layer can carry it beside a sliding scale or a profit commission. Deal ratios count it as a deduction inside NMBF.
A bonus can look back over several contract years: it is paid only if
the last years years together ceded at most the threshold.
That needs the paths of a term, so apply_tower_term()
applies the tower year by year (apply_tower() refuses it).
Here a term is two of the 2,000 simulated years, and the bonus looks
back two years:
full <- no_claims_bonus_for(ncb, 0)
two_years <- reinsurance_tower(list(with_no_claims_bonus(contract_layer(b), 0.10, years = 2)))
term <- apply_tower_term(two_years, term_years(bracken_cs_fl, 2))
for (year in 1:2) {
bonus <- select_components(select_components(term, "year", year), "kind", "no_claims_bonus")
cat(sprintf("year %d: bonus paid on %.4f of the paths\n", year, mean(bonus) / full))
}## year 1: bonus paid on 0.9710 of the paths
## year 2: bonus paid on 0.9360 of the paths
Year 1 looks back only to the start of the term, so it pays about as often as a one-year bonus (0.9675 above). Year 2 needs two clean years: about the square of that chance, since the years are independent.
6. The reinsurer’s ledger of the aggregate cover
A P&L ledger shows each flow as a row, signed from the
reinsurer’s side, with the distribution of each row.
deal_ledger() builds it for one layer over a distribution
of annual gross losses: here Bracken’s 2,000 annual totals of convective
storm and flood, each equally likely. The cover pays 10% brokerage.
ledger_sheet() names the rows and ledger_row()
gives the distribution of each one.
totals <- total(total(bracken_cs_fl))@draws
agg_cover <- with_brokerage(contract_layer(b), 0.10)
ledger <- deal_ledger(reinsurance_tower(list(agg_cover)),
list(totals, rep(1, length(totals))), "bracken_agg")
rows <- ledger_sheet(ledger)$row
gt(data.frame(row = rows, mean = sapply(rows, function(r) mean(ledger_row(ledger, r)))),
rowname_col = "row") |>
tab_header("Bracken aggregate cover: mean of each ledger row",
"Millions of crowns per year, signed from the reinsurer's side") |>
fmt_number(columns = mean, decimals = 4)| Bracken aggregate cover: mean of each ledger row | |
| Millions of crowns per year, signed from the reinsurer's side | |
| mean | |
|---|---|
| Premium | 0.4500 |
| Loss | −0.1621 |
| Brokerage | −0.0450 |
| total obligation | −0.2071 |
| result | 0.2429 |
Only the premium is fixed. ledger_sheet() shows each row
in the scenario columns, from the bad year to the good one;
ledger_card() gives the standard deviation and percentiles
of each side.
The ledger applies the tower to an annual loss, so it suits quota shares and aggregate excess layers. It refuses a layer with paid reinstatements: for occurrence layers, read the flows from the tower’s result, as in section 3.
Collateral
A collateralised reinsurer holds the limit in a trust. This changes
the return on a deal, not its expected loss. The monthly cash-flow
engine (cashflow_terms(), cashflow_run(), and
deal_run() with its cashflows and
terms arguments) models it.
In Python
The Python guide, cat-5-beyond-loss.md,
runs the same steps with Layer(pro_rata_time=),
Layer.reinstatement_premium,
with_profit_commission, with_sliding_scale,
with_no_claims_bonus, Tower.apply_term,
with_brokerage, Tower.deal_ratios and
Tower.deal_ledger.
Further reading
Within this track, page 3 sets the terms of these flows, and page 6 prices them. What a reinsurance price is covers commissions and the quote for a single layer. reinsurance.dev by Oliver Baltzer is another introduction to property catastrophe reinsurance.