Property catastrophe 6: a price for Alder's first layer
cat-6-pricing.RmdRendered from docs/guides/cat-6-pricing.qmd.
The code runs each time the site is built, so the output below is
current.
This page prices the ceded losses of one contract. The story, the
files and the notation are on the
overview. The contract is alder_cat_1, the 30% line of
Larkspur on the first cat layer of Alder Mutual: 40 xs 30 with one
reinstatement at 100%. Its terms come from
examples/data/cat_book_contracts.csv.
This is the R twin of the Python guide cat-6-pricing.md,
with the same sections and numbers. The text under each R chunk is what
the chunk prints or shows as a table.
R/prospicio/tests/test-guides.R checks it.
A price has three parts: the expected loss, a risk load (risk loads and distortions) for the capital behind the bad years, and expenses with brokerage.
1. The contract’s ceded losses
The helper cedent_events() is the same on every page of
the track. It reads the YELT for one cedent and keeps the time in the
year and the peril of each loss. The upfront premium of Larkspur is the
rate on line times the limit times its share. find_data()
looks for examples/data/ upwards from the working
directory, because the tests run from the repository root and Quarto
from docs/guides/.
library(prospicio)
# The data files, found from the repository root (CI) or from docs/guides (Quarto).
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 <- utils::read.csv(find_data("cat_book_yelt.csv"), stringsAsFactors = FALSE)
CONTRACTS <- split(read_book("cat_book_contracts.csv"), ~contract)
N_YEARS <- 2000
cedent_events <- function(cedent, perils = "all") {
rows <- YELT[YELT$cedent == cedent, ]
if (perils != "all") rows <- rows[rows$peril %in% strsplit(perils, "+", fixed = TRUE)[[1]], ]
year <- factor(rows$year, levels = seq_len(N_YEARS))
time <- ((rows$day - 1) * 24 + rows$hour) / 8760
ev <- events_from_years(unname(split(rows$loss, year)), times = unname(split(time, year)))
with_labels(ev, list(peril = unlist(split(rows$peril, year), use.names = FALSE)))
}
# An occurrence excess of loss layer from a row of the contracts file.
xl_layer <- function(c, pro_rata_time = FALSE) {
limit <- as.numeric(c$limit); share <- as.numeric(c$share)
xol_layer(c$contract, limit, as.numeric(c$attachment), share = share,
premium = as.numeric(c$rate_on_line) * limit * share,
reinstatement_rates = rep(as.numeric(c$reinstatement_rate), as.integer(c$reinstatements)),
pro_rata_time = pro_rata_time)
}
# The layer's annual ceded loss and reinstatement premium, one draw a year.
ceded_and_rip <- function(layer, events) {
res <- aggregate(apply_tower(reinsurance_tower(list(layer)), events), keep = c("kind", "layer"))
list(loss = marginal(res, list(kind = "ceded", layer = layer@name)),
rip = marginal(res, list(kind = "reinstatement_premium", layer = layer@name)))
}
c1 <- CONTRACTS[["alder_cat_1"]]
raw <- cedent_events("alder")
grouped <- hours_clause(raw, as.numeric(c1$hours))
lay <- xl_layer(c1)
cr <- ceded_and_rip(lay, grouped)
loss <- cr$loss; rip <- cr$rip
X <- sampled(loss@draws)
cat(sprintf("limit at Larkspur's share %.1f, upfront premium %.4f\n", lay@limit * lay@share, lay@premium))## limit at Larkspur's share 12.0, upfront premium 1.8000
## expected ceded loss 0.8230, loss ratio 0.457
## years with a ceded loss 230 of 2000
The loss ratio matches page 3, section 6. Most years cost the layer nothing, and a few cost it the whole line. Thus the risk load matters more than the expected loss.
2. Cost of capital
Larkspur holds assets A against the bad years. The
premium P is part of the assets, and the capital is
K = A - P (a first
course, what a reinsurance
price is, a Python guide). With a cost of capital r,
the margin P - EL must equal r K. Solve for
P:
P = (EL + r A) / (1 + r), K = A - P
The assets are the TVaR at 99% of the ceded loss: the mean of the
worst 1% of years. A common shortcut is EL + r (TVaR - EL).
It charges for capital as if the premium does not help pay the tail.
risk_loaded_price() counts the premium as part of the
assets, so the capital and the price are both a little lower.
library(gt)
p <- risk_loaded_price(X, distortion("tvar", 0.99), cost_of_capital = 0.10)
cost <- data.frame(
item = c("expected loss", "assets (TVaR 99)", "premium", "capital", "margin",
"return on capital", "premium by the formula",
"shortcut EL + r (TVaR - EL)"),
value = c(p$expected_loss, p$assets, p$premium, p$capital, p$margin,
p$return_on_capital, (p$expected_loss + 0.10 * p$assets) / 1.10,
p$expected_loss + 0.10 * (p$assets - p$expected_loss))
)
gt(cost, rowname_col = "item") |>
tab_header("Alder 40 xs 30: the cost of capital price at r = 10%",
"At Larkspur's share") |>
fmt_number(columns = value, decimals = 4)| Alder 40 xs 30: the cost of capital price at r = 10% | |
| At Larkspur's share | |
| value | |
|---|---|
| expected loss | 0.8230 |
| assets (TVaR 99) | 13.8428 |
| premium | 2.0066 |
| capital | 11.8362 |
| margin | 1.1836 |
| return on capital | 0.1000 |
| premium by the formula | 2.0066 |
| shortcut EL + r (TVaR - EL) | 2.1250 |
3. A distortion price
A pricing distortion gives more weight to the years in the tail. The premium is the expected loss under the new weights. Risk loads and distortions compares the families, and portfolio pricing gives the theory. Here the distortion is the Wang transform with a parameter of 0.3.
pw <- risk_loaded_price(X, distortion("tvar", 0.99), distortion = distortion("wang", 0.3))
rules <- data.frame(
rule = c("cost of capital, TVaR 99", "Wang 0.3"),
premium = c(p$premium, pw$premium),
capital = c(p$capital, pw$capital),
`return on capital` = c(p$return_on_capital, pw$return_on_capital),
check.names = FALSE
)
gt(rules, rowname_col = "rule") |>
tab_header("Alder 40 xs 30: two pricing rules", "At Larkspur's share") |>
fmt_number(columns = c("premium", "capital", "return on capital"), decimals = 4)| Alder 40 xs 30: two pricing rules | |||
| At Larkspur's share | |||
| premium | capital | return on capital | |
|---|---|---|---|
| cost of capital, TVaR 99 | 2.0066 | 11.8362 | 0.1000 |
| Wang 0.3 | 1.4225 | 12.4204 | 0.0483 |
The Wang price is lower and implies under 5% on the TVaR capital. The two rules answer different questions: use the one that matches your capital model, and the other as a check.
The figure shows the years with a ceded loss, and where each price falls.
library(ggplot2, exclude = "layer")
prices <- data.frame(
price = c("expected loss", "Wang 0.3 premium", "cost of capital premium"),
value = c(p$expected_loss, pw$premium, p$premium)
)
ggplot() +
geom_histogram(aes(x, fill = "years with a ceded loss"), data = data.frame(x = loss@draws[loss@draws > 0]),
bins = 24) +
geom_vline(aes(xintercept = value, colour = price), data = prices) +
scale_fill_manual(values = c("years with a ceded loss" = "grey75")) +
labs(x = "annual ceded loss at Larkspur's share", y = "years of 2,000", fill = NULL, colour = NULL,
title = "Alder 40 xs 30: the 230 years with a loss, and three prices") +
theme(legend.position = "top")4. From risk premium to a quote
The premium above is the risk premium. With expenses e
and brokerage b as fractions of the quoted premium
Q, Q = P / (1 - e - b) (what a reinsurance
price is, “The technical premium”). technical_quote()
does this and reports the rate on line at the share of Larkspur.
q <- technical_quote(p, expenses = 0.05, brokerage = 0.10, limit = lay@limit * lay@share)
cat(sprintf("technical premium %.4f, rate on line %.4f\n", q$premium, q$rate_on_line))## technical premium 2.3607, rate on line 0.1967
The technical rate on line is above the 15% in the contract. Section 7 compares it with the market price.
5. The reinstatement premium inside the price
When the layer pays a loss, the cedent buys the limit back: with one reinstatement at 100%, it pays the upfront premium again in proportion to the limit used. Thus the reinsurer collects more exactly when it pays claims.
Expected value. The reinstatement premium of a year
is the upfront premium times a factor that depends only on the losses
(the share of the limit used, times the rate). Its expected value is
f P for a fixed f. If the risk premium
R must come from the upfront premium and the expected
reinstatement premium together, then P (1 + f) = R, so
P = R / (1 + f).
f <- mean(rip) / lay@premium
cat(sprintf("expected reinstatement premium %.4f, f = %.5f\n", mean(rip), f))## expected reinstatement premium 0.1207, f = 0.06705
## upfront premium for a risk premium of 2.0066: 1.8805
In the tail. Under TVaR, the expected value is not
sufficient. The reinstatement premium of year t is
P g_t, where g_t depends only on that year’s
losses. It comes in the years with losses, so it lowers the tail of the
net outcome X_t - P g_t. The assets then depend on
P, and the upfront premium solves
P = price(X - P g), one equation in one unknown (Sundt
1991, Mata 2000).
price_with_reinstatements finds the root (#587). The
price of the net outcome falls as P increases, so
price(X - P g) - P changes sign once between 0 and the
price without reinstatement premium. The call finds that root by
bisection.
g <- rip@draws / lay@premium # reinstatement premium per unit of upfront premium
ri <- price_with_reinstatements(loss@draws, g, distortion("tvar", 0.99), cost_of_capital = 0.10)
cat(sprintf("upfront premium %.4f, assets of the net outcome %.4f\n", ri$upfront, ri$net$assets))## upfront premium 1.7421, assets of the net outcome 12.1008
## quoted with 5% expenses and 10% brokerage 2.0495
Counting the reinstatement premium in the tail lowers the upfront premium more than the expected value alone does: it saves capital in the worst years.
6. Sensitivity
This section varies three inputs: the cost of capital, the hours clause and the timing of the season.
Cost of capital. The assets do not change with
r, but the premium is concave in r:
P = (EL + r A) / (1 + r) increases by less with each
step.
rates <- c(0.05, 0.10, 0.15, 0.20)
by_rate <- data.frame(
r = sprintf("%.2f", rates),
premium = sapply(rates, function(r) {
risk_loaded_price(X, distortion("tvar", 0.99), cost_of_capital = r)$premium
})
)
gt(by_rate, rowname_col = "r") |>
tab_header("Alder 40 xs 30: the premium by cost of capital", "At Larkspur's share") |>
fmt_number(columns = premium, decimals = 4)| Alder 40 xs 30: the premium by cost of capital | |
| At Larkspur's share | |
| premium | |
|---|---|
| 0.05 | 1.4430 |
| 0.10 | 2.0066 |
| 0.15 | 2.5212 |
| 0.20 | 2.9930 |
rs <- (2:25) / 100
by_r <- rbind(
data.frame(r = rs, premium = (p$expected_loss + rs * p$assets) / (1 + rs),
rule = "price (premium helps pay the tail)"),
data.frame(r = rs, premium = p$expected_loss + rs * (p$assets - p$expected_loss),
rule = "shortcut EL + r (TVaR - EL)")
)
ggplot(by_r, aes(r, premium, colour = rule)) +
geom_line(linewidth = 0.8) +
geom_hline(aes(yintercept = lay@premium, linetype = "contract premium"), colour = "grey75") +
scale_linetype_manual(values = c("contract premium" = "dotted")) +
labs(x = "cost of capital r", y = "premium at Larkspur's share", colour = NULL, linetype = NULL,
title = "The premium rises with r, and less than the shortcut says") +
theme(legend.position = "top")Hours clause. Without the 72 hour clause, the pieces of a split windstorm or convective storm are separate occurrences, each with its own retention.
loss_raw <- ceded_and_rip(lay, raw)$loss
prices <- lapply(list(`72 hours` = loss, `no clause` = loss_raw), function(ls) {
risk_loaded_price(sampled(ls@draws), distortion("tvar", 0.99), cost_of_capital = 0.10)
})
clause <- data.frame(
clause = names(prices),
`expected loss` = sapply(prices, function(x) x$expected_loss),
assets = sapply(prices, function(x) x$assets),
premium = sapply(prices, function(x) x$premium),
check.names = FALSE, row.names = NULL
)
gt(clause, rowname_col = "clause") |>
tab_header("Alder 40 xs 30: with and without the hours clause", "At Larkspur's share") |>
fmt_number(columns = c("expected loss", "assets", "premium"), decimals = 4)| Alder 40 xs 30: with and without the hours clause | |||
| At Larkspur's share | |||
| expected loss | assets | premium | |
|---|---|---|---|
| 72 hours | 0.8230 | 13.8428 | 2.0066 |
| no clause | 0.7778 | 15.4227 | 2.1092 |
The clause raises the expected loss, because the pieces of a storm add up before the retention applies. It lowers the tail: without it, a storm in two large pieces can take the limit twice in one year (limit and reinstatement), and grouped it takes one limit. On this book the tail effect is larger, so the price without the clause is higher.
Season. A reinstatement pro rata as to time charges
only for the part of the year left. Most windstorms of Alder (nine in
ten in the generator) arrive between day 213 and day 305, so the cedent
pays much less to reinstate and f falls.
rip_time <- ceded_and_rip(xl_layer(c1, pro_rata_time = TRUE), grouped)$rip
f_time <- mean(rip_time) / lay@premium
season <- data.frame(
reinstatement = c("pro rata as to amount", "pro rata as to time"),
f = c(f, f_time),
`upfront premium` = c(p$premium / (1 + f), p$premium / (1 + f_time)),
check.names = FALSE
)
gt(season, rowname_col = "reinstatement") |>
tab_header("Alder 40 xs 30: the reinstatement terms",
"Upfront premium by expected value, at Larkspur's share") |>
fmt_number(columns = f, decimals = 5) |>
fmt_number(columns = "upfront premium", decimals = 4)| Alder 40 xs 30: the reinstatement terms | ||
| Upfront premium by expected value, at Larkspur's share | ||
| f | upfront premium | |
|---|---|---|
| pro rata as to amount | 0.06705 | 1.8805 |
| pro rata as to time | 0.02484 | 1.9580 |
7. Is the market price adequate?
The rate on line of the contract is 15%, a premium of 1.8 at the
share of Larkspur. implied_quote() reads a quoted premium
backwards: it takes off expenses and brokerage, and reports the margin
and the return on the same capital.
m <- implied_quote(q, lay@premium)
build_up <- data.frame(
item = c("risk premium", "expenses", "brokerage", "quoted premium", "rate on line"),
technical = c(q$risk_premium, q$expenses, q$brokerage, q$premium, q$rate_on_line),
market = c(m$risk_premium, m$expenses, m$brokerage, m$premium, m$rate_on_line)
)
gt(build_up, rowname_col = "item") |>
tab_header("Alder 40 xs 30: the technical quote and the market quote",
"Premium at Larkspur's share; the rate on line is premium over limit") |>
tab_spanner("quote", columns = c(technical, market)) |>
fmt_number(columns = c(technical, market), decimals = 4)| Alder 40 xs 30: the technical quote and the market quote | ||
| Premium at Larkspur's share; the rate on line is premium over limit | ||
|
quote
|
||
|---|---|---|
| technical | market | |
| risk premium | 2.0066 | 1.5300 |
| expenses | 0.1180 | 0.0900 |
| brokerage | 0.2361 | 0.1800 |
| quoted premium | 2.3607 | 1.8000 |
| rate on line | 0.1967 | 0.1500 |
## loss ratio 0.457, margin 0.7070
## return on capital 0.0574 against a target of 0.10
At the market price, alder_cat_1 earns much less than
the 10% target on its stand-alone capital. The reinstatement premium
does not close the gap: for the same risk premium, the upfront premium
of section 5 is 1.7421, and 2.0495 with expenses and brokerage, still
above the 1.8 charged. What remains is the diversification in the book
of Larkspur, which page 7 measures.
In Python
The Python guide, cat-6-pricing.md,
prices the layer with price, Distortion,
Quote.technical and Quote.at.
Further reading
- Sundt, B. (1991), “On excess of loss reinsurance with reinstatements”, Bulletin of the Swiss Association of Actuaries, 51-65.
- Mata, A. J. (2000), “Pricing excess of loss reinsurance with reinstatements”, ASTIN Bulletin 30(2), 349-368.
- Risk loads and distortions and What a reinsurance price is explain the pricing rules in general.
- reinsurance.dev by Oliver Baltzer is another introduction to property catastrophe reinsurance.