Evaluating a reinsurance submission with prospicio
A broker sends a reinsurance submission. A cedant (the insurer that buys reinsurance) asks for quotes on its 2026 per-risk excess of loss program for commercial property. This notebook follows the work of a reinsurer’s pricing actuary on that pack. It starts from the raw files and ends with a decision for each layer: quote, counter, decline or refer.
The notebook is for an actuary who prices primary insurance and has not priced a treaty. It defines each term where it first occurs. The guide What a reinsurance price is explains the pricing concepts in more detail (layers, rate on line, capital, technical premium). reinsurance_pricing.ipynb checks the layer calculations against another package.
The case. The cedant is a synthetic commercial property insurer. It asks for three layers of cover on each risk (a risk is one insured location). The treaty is on a losses occurring basis for 2026: it covers losses that occur during 2026. The layers are 5m xs 5m, 10m xs 10m and 20m xs 20m. “5m xs 5m” means 5 million excess of 5 million: the layer pays the part of a loss between 5m and 10m. Each layer has paid reinstatements and a rate on line (premium divided by limit) that the broker quotes. The submission has the files that a broker sends, in examples/data/submission/:
| File | What it holds |
|---|---|
subject_premium.csv, rate_changes.csv |
Subject premium (the premium the treaty applies to) by year, and the cedant’s rate changes |
cost_index.csv |
A published building cost index, the source for claims inflation |
large_losses.csv |
Every claim over 500,000 incurred, valued at each year end: paid and incurred amounts, policy limit, dates |
triangle.csv |
The whole book’s paid and incurred loss triangle |
risk_profile.csv |
The 2026 portfolio by band of sum insured: number of risks, sum insured, premium |
treaty_terms.csv, treaty_program.csv |
The proposed layers and quoted rates, and the treaty period, basis and brokerage |
The data is synthetic. examples/data/make_submission.py made it from known parameters (a Pareto tail, a claim frequency, trends). Thus at the end we can compare the estimates with the truth. The answer key, examples/data/answer_key.json, is outside the submission’s folder, and the notebook reads it only in section 14.
What a real submission adds. A real pack has these items, and each needs its own step:
- a split of catastrophe claims from per-risk claims (a per-risk treaty excludes them or models them separately).
- the treatment of loss adjustment expenses (included in the loss, pro rata, or in addition).
- the definition of a risk, and of a loss when one event damages several risks.
- the currency and any index clause on the attachment (
LargeLossExperience(fx=)and IndexClause). This case has neither. - a tail factor after the oldest age of the triangle.
- premium that increases with insured values. Here the on-level premium increases only with the number of risks, while sums insured and claims increase with the cost index (section 2).
| Section | Step |
|---|---|
| 1 | Load the files and reconcile them with each other |
| 2 | On-level premium and trend |
| 3 | Develop the book’s triangle to ultimate |
| 4 | Prepare the large losses: development, trend, completeness |
| 5 | Fit the severity and the frequency of large losses |
| 6 | Experience rating: the cost of each layer from the cedant’s own claims |
| 7 | Exposure rating: the cost of each layer from the cedant’s portfolio |
| 8 | Blend the two by credibility, layer by layer |
| 9 | Build the loss model and apply the treaty terms |
| 10 | Risk metrics for each layer |
| 11 | Technical premium, and the broker’s quotes against it |
| 12 | Sensitivity and parameter uncertainty |
| 13 | The decision |
| 14 | How close the estimates were to the truth |
To run the notebook, clone the repository and start Jupyter with prospicio built from source, which needs Rust. From the repository root, run uv run --project python --group examples jupyter lab (see examples/README.md), then open this notebook. Set PROSPICIO_EXAMPLE_SIMS to run fewer simulations. The docs site shows the results. The repository keeps only the code.
import csv
import json
import math
import os
from collections import defaultdict
from pathlib import Path
try:
from prospicio.credibility import LimitedFluctuation
from prospicio.distributions import Grid, Pareto, PolicyLimits, claim_count
from prospicio.models import Glm, Terms
from prospicio.pricing import (CollectiveModel, DevelopmentPattern, LargeLossExperience, Mbbefd, Period, Quote,
RateHistory, RiskProfile, TrendFit, credibility_weighted, fit_references, layer_cv,
price, trend_factor, year_fraction)
from prospicio.reinsurance import Layer, Tower, occurrence_layer_statistics
from prospicio.reserving import CapeCod, ChainLadder, Triangle
from prospicio.risk import Distortion, calibrate
except ImportError as error:
raise ImportError("this notebook needs prospicio 0.1.0 or later (`pip install -U prospicio`), or a build from "
"source, `uv run --project python --group examples jupyter lab` from the repository root") from error
N_SIMS = int(os.environ.get("PROSPICIO_EXAMPLE_SIMS", "20000"))
# The submission's folder, from wherever the notebook runs inside the repository.
DATA = next((p / sub for p in [Path.cwd(), *Path.cwd().parents]
for sub in ("examples/data/submission", "data/submission") if (p / sub).is_dir()), None)
if DATA is None:
raise FileNotFoundError(
f"examples/data/submission not found in {Path.cwd()} or above it: open this notebook from inside a clone "
"of the repository (examples/data/make_submission.py writes the files)")
def read_csv(name):
with open(DATA / name) as f:
return list(csv.DictReader(f))
def when(text):
"""A date 'YYYY-MM-DD' as a year fraction (the library's half-month grid)."""
y, m, d = map(int, text.split("-"))
return year_fraction(y, m, d)
def money(x):
return f"{x / 1e6:,.2f}m"
print(f"submission files in {DATA.parent.name}/{DATA.name}: {', '.join(sorted(p.name for p in DATA.glob('*.csv')))}")submission files in data/submission: cost_index.csv, large_losses.csv, rate_changes.csv, risk_profile.csv, subject_premium.csv, treaty_program.csv, treaty_terms.csv, triangle.csv
1. The submission
First, read the files and print the treaty terms. Money is in US dollars. The cedant lists each claim whose incurred loss is over 500,000 at the valuation date, 31 December 2025. The incurred loss is paid plus the case reserve that the cedant’s claims department sets. Each claim has a row for each year-end valuation since its report. This history lets us measure how claims develop.
program = {r["item"]: r["value"] for r in read_csv("treaty_program.csv")}
for item, value in program.items():
print(f"{item:36s} {value}")
terms = [{"name": r["layer"], "limit": float(r["limit"]), "attachment": float(r["attachment"]),
"reinstatements": int(r["reinstatements"]), "reinstatement_rate": float(r["reinstatement_rate"]),
"quoted_rol": float(r["quoted_rate_on_line"])} for r in read_csv("treaty_terms.csv")]
print()
for t in terms:
print(f"{t['name']:>11s}: {t['reinstatements']} paid reinstatement(s) at {t['reinstatement_rate']:.0%}, "
f"broker's quote {t['quoted_rol']:.1%} rate on line, deposit {money(t['quoted_rol'] * t['limit'])}")
LISTING_THRESHOLD = float(program["listing_threshold"])
BROKERAGE = float(program["brokerage"])
GNPI = float(program["estimated_subject_premium_income"])
premium_rows = read_csv("subject_premium.csv")
YEARS = [int(r["calendar_year"]) for r in premium_rows]
SUBJECT_PREMIUM = {int(r["calendar_year"]): float(r["subject_premium"]) for r in premium_rows}
# The listing: one row per claim and valuation date.
claims = {}
for r in read_csv("large_losses.csv"):
c = claims.setdefault(r["claim_id"], {"year": int(r["accident_date"][:4]), "accident": when(r["accident_date"]),
"report": int(r["report_date"][:4]), "limit": float(r["policy_limit"]),
"report_date": r["report_date"], "accident_date": r["accident_date"],
"values": {}})
c["values"][int(r["valuation_date"][:4])] = (float(r["paid"]), float(r["incurred"]))
triangle_rows = read_csv("triangle.csv")
profile_rows = read_csv("risk_profile.csv")cedant Northgate Mutual (synthetic)
line_of_business commercial property, per risk excess of loss
currency USD
period_start 2026-01-01
period_end 2026-12-31
basis losses occurring during the period
estimated_subject_premium_income 179900000.0
brokerage 0.1
listing_threshold 500000.0
valuation_date 2025-12-31
5m xs 5m: 2 paid reinstatement(s) at 100%, broker's quote 43.0% rate on line, deposit 2.15m
10m xs 10m: 1 paid reinstatement(s) at 100%, broker's quote 15.0% rate on line, deposit 1.50m
20m xs 20m: 1 paid reinstatement(s) at 100%, broker's quote 6.0% rate on line, deposit 1.20m
Reconcile first. People make a submission from several systems, and its files rarely agree at first. Before you model, do these checks:
- The claim listing agrees with itself.
- The listing fits inside the triangle. The triangle includes all claims, so its latest diagonal must be at least the listed claims.
- The triangle’s paid is never more than its incurred.
- The premium in the risk profile is near the premium that the cedant expects for 2026.
A failed check is a question for the broker. Do not correct it without telling the broker. The table shows the share of each year’s incurred loss that is in the listing. This is the part of the loss that the large-loss model carries.
checks = []
def check(name, ok, detail=""):
checks.append((name, bool(ok)))
print(f"{'ok ' if ok else 'FAIL'} {name}" + (f": {detail}" if detail else ""))
last = {cid: max(c["values"]) for cid, c in claims.items()}
check("every claim has a valuation at each year end from its report year to 2025",
all(sorted(c["values"]) == list(range(c["report"], 2026)) for c in claims.values()))
check("incurred is at least paid, and at most the policy limit",
all(p <= i + 1e-6 and i <= c["limit"] + 1 for c in claims.values() for p, i in c["values"].values()))
check("the last valuation of every claim is over the listing threshold",
all(c["values"][last[cid]][1] >= LISTING_THRESHOLD for cid, c in claims.items()),
f"smallest {money(min(c['values'][last[cid]][1] for cid, c in claims.items()))}")
check("no claim is reported before it happens", all(c["report_date"] >= c["accident_date"] for c in claims.values()))
# The triangle holds the listed claims too: its latest diagonal must be at least their incurred.
latest_triangle = {}
for r in triangle_rows:
y, age = int(r["accident_year"]), int(r["development_months"])
if age == 12 * (2026 - y):
latest_triangle[y] = float(r["incurred"])
large_incurred = defaultdict(float)
for cid, c in claims.items():
large_incurred[c["year"]] += c["values"][last[cid]][1]
check("the triangle's latest diagonal covers the listed claims",
all(latest_triangle[y] >= large_incurred[y] for y in YEARS))
cells = {(int(r["accident_year"]), int(r["development_months"])): (float(r["paid"]), float(r["incurred"]))
for r in triangle_rows}
check("the triangle's paid is at most its incurred in every cell", all(p <= i for p, i in cells.values()))
# Incurred that falls with age is possible (case reserves revised down) but worth a question to the broker.
falls = [(y, age) for (y, age), (_, i) in cells.items() if (y, age - 12) in cells and i < cells[y, age - 12][1]]
print(" incurred falls from one age to the next in " + (", ".join(
f"{y} at {age} months ({money(cells[y, age][1] - cells[y, age - 12][1])})" for y, age in falls) or "no cell"))
profile_premium = sum(float(r["premium"]) for r in profile_rows)
check("the risk profile's premium is near the estimated 2026 subject premium",
abs(profile_premium / GNPI - 1) < 0.05, f"profile {money(profile_premium)}, estimate {money(GNPI)}")
check("the bands of the profile are contiguous",
all(profile_rows[i]["upper_sum_insured"] == profile_rows[i + 1]["lower_sum_insured"] for i in range(len(profile_rows) - 1)))
print(f"\n{len(claims)} claims in the listing, {len(read_csv('large_losses.csv'))} valuation rows; "
f"{sum(ok for _, ok in checks)} of {len(checks)} checks pass")
print(f"\n{'year':>6s} {'subject premium':>16s} {'incurred (latest)':>18s} {'listed claims':>14s} {'share':>7s}")
for y in YEARS:
print(f"{y:>6d} {money(SUBJECT_PREMIUM[y]):>16s} {money(latest_triangle[y]):>18s} "
f"{money(large_incurred[y]):>14s} {large_incurred[y] / latest_triangle[y]:7.1%}")ok every claim has a valuation at each year end from its report year to 2025
ok incurred is at least paid, and at most the policy limit
ok the last valuation of every claim is over the listing threshold: smallest 0.50m
ok no claim is reported before it happens
ok the triangle's latest diagonal covers the listed claims
ok the triangle's paid is at most its incurred in every cell
incurred falls from one age to the next in 2016 at 120 months (-0.01m), 2017 at 96 months (-0.03m), 2018 at 96 months (-0.01m)
ok the risk profile's premium is near the estimated 2026 subject premium: profile 180.00m, estimate 179.90m
ok the bands of the profile are contiguous
168 claims in the listing, 842 valuation rows; 8 of 8 checks pass
year subject premium incurred (latest) listed claims share
2016 95.44m 41.48m 7.63m 18.4%
2017 99.14m 51.99m 16.59m 31.9%
2018 104.86m 57.92m 17.83m 30.8%
2019 113.28m 62.15m 17.42m 28.0%
2020 125.77m 70.76m 26.59m 37.6%
2021 139.71m 79.78m 27.98m 35.1%
2022 150.99m 80.51m 29.95m 37.2%
2023 157.98m 67.68m 16.77m 24.8%
2024 165.11m 83.67m 27.48m 32.8%
2025 173.10m 56.21m 10.01m 17.8%
3. Develop the book triangle
The triangle holds the cumulative paid and incurred loss of the whole book by accident year and age in months. Recent years are not complete, so we develop each year to ultimate (its final cost). ChainLadder multiplies the latest value of each year by the factor to ultimate from the older years. Cape Cod is a Bornhuetter-Ferguson method that estimates its prior loss ratio from the triangle, with on-level premium as the exposure. Its trend argument moves the loss ratio of each year to a common price level.
This step gives the ground-up expected loss ratio at 2026 prices and rates: the expected cost of all claims, of all sizes, as a share of premium. The exposure rating in section 7 spreads that loss across the sums insured of the portfolio. It is not the cost of a layer, which is a share of it.
Paid and incurred chain ladders give a cross-check. But they use the same triangle as Cape Cod, so their agreement shows little about how firm the selection is. The scatter of the trended loss ratios of the ten years shows more. Section 12 moves the loss ratio by about two standard errors of its ten-year average.
triangle = Triangle.from_long(
[int(r["accident_year"]) for r in triangle_rows],
[int(r["development_months"]) for r in triangle_rows],
{"incurred": [float(r["incurred"]) for r in triangle_rows],
"paid": [float(r["paid"]) for r in triangle_rows],
"onlevel": [onlevel[int(r["accident_year"])] for r in triangle_rows]},
)
chain = ChainLadder().fit(triangle, "incurred")
paid_chain = ChainLadder().fit(triangle, "paid")
print("age-to-age factors (incurred):", ", ".join(f"{f:.3f}" for f in chain.ldf[:5]), "...")
print(" (paid):", ", ".join(f"{f:.3f}" for f in paid_chain.ldf[:5]), "...")
cape_cod = CapeCod(trend=SEVERITY_TREND).fit(triangle, "incurred", "onlevel")
def loss_ratio(ultimates, trend=SEVERITY_TREND):
"""Ultimates trended to the middle of the treaty year over on-level premium, pooled across the years."""
return (sum(u * trend_factor(trend, TREATY_MIDDLE - (y + 0.5)) for u, y in zip(ultimates, YEARS))
/ sum(onlevel[y] for y in YEARS))
latest = dict(zip(YEARS, chain.latest))
ult_chain = {y: l + r for y, l, r in zip(YEARS, chain.latest, chain.reserve)}
ult_paid = {y: l + r for y, l, r in zip(YEARS, paid_chain.latest, paid_chain.reserve)}
ult_cc = dict(zip(YEARS, cape_cod.ultimate))
yearly = {y: ult_cc[y] * trend_to_treaty(y) / onlevel[y] for y in YEARS}
print(f"\n{'year':>6s} {'incurred':>10s} {'chain ladder':>13s} {'paid CL':>9s} {'Cape Cod':>9s} "
f"{'loss ratio, CC, trended':>24s}")
for y in YEARS:
print(f"{y:>6d} {money(latest[y]):>10s} {money(ult_chain[y]):>13s} {money(ult_paid[y]):>9s} "
f"{money(ult_cc[y]):>9s} {yearly[y]:>24.1%}")
# The selected loss ratio: the Cape Cod ultimates pooled, which is Cape Cod's own estimate across the years
# moved to the treaty year's prices (its `trended_apriori` is at the valuation date's prices, a year earlier).
ELR = loss_ratio(cape_cod.ultimate)
spread = math.sqrt(sum((v - ELR) ** 2 for v in yearly.values()) / (len(YEARS) - 1))
print(f"\nselected ground-up loss ratio at 2026 prices and rates: {ELR:.1%} "
f"(chain ladder {loss_ratio(ult_chain.values()):.1%}, paid chain ladder {loss_ratio(ult_paid.values()):.1%})")
print(f"the years run from {min(yearly.values()):.1%} to {max(yearly.values()):.1%}: a standard deviation of "
f"{spread:.1%}, so about {spread / math.sqrt(len(YEARS)):.1%} on the ten-year average")age-to-age factors (incurred): 1.279, 1.068, 1.032, 1.009, 1.003 ...
(paid): 1.854, 1.222, 1.082, 1.028, 1.009 ...
year incurred chain ladder paid CL Cape Cod loss ratio, CC, trended
2016 41.48m 41.48m 41.48m 41.48m 48.1%
2017 51.99m 51.99m 51.98m 51.99m 56.0%
2018 57.92m 57.98m 57.97m 57.98m 58.0%
2019 62.15m 62.21m 62.21m 62.21m 57.8%
2020 70.76m 71.02m 70.97m 71.00m 61.3%
2021 79.78m 80.34m 80.27m 80.27m 64.4%
2022 80.51m 81.78m 81.83m 81.69m 60.9%
2023 67.68m 70.94m 71.15m 71.44m 49.5%
2024 83.67m 93.67m 93.19m 93.08m 59.9%
2025 56.21m 80.49m 82.37m 84.81m 50.7%
selected ground-up loss ratio at 2026 prices and rates: 56.7% (chain ladder 56.4%, paid chain ladder 56.5%)
the years run from 48.1% to 64.4%: a standard deviation of 5.5%, so about 1.7% on the ten-year average
4. Prepare the large losses
An excess of loss layer pays only for large claims. Its price thus comes from the cedant’s large-loss listing, and that listing needs more care than any other file.
- Development. A claim’s incurred amount usually changes after its first report. This movement is IBNER (incurred but not enough reported). The helper
incurred_developmentmeasures it from the listing. For each development year, it divides the sum of the incurred amounts one year later by the sum now, for the claims valued at both ages. LargeLossExperience.prepare then develops and trends each claim with its own factor to ultimate, capped so that the claim does not go above its policy limit. The listing holds the claims whose latest incurred is over 500,000. A claim that was large at an early valuation and later went below the listing threshold is not in it. Factors measured on all listed claims thus have an upward bias. DevelopmentPattern.from_history uses all claims valued at both ages. The helper uses only the claims whose incurred at the earlier valuation was already over the analysis threshold below. That threshold is far above the listing threshold, so few of these claims can have left the listing. The cell prints both sets of factors. In this listing they differ by less than one point. - Completeness. The listing includes claims over 500,000 at the latest valuation. But a claim just over that amount now can end well above it. A claim just under it can be missing although it will end over it. Only claims over an analysis threshold above the listing threshold (750,000 here) are complete. The margin is not perfect. A claim that occurred in the last weeks of 2025 can have a reserve at two thirds of its ultimate. Thus a claim that will end at 760,000 can still be under 500,000 and missing. Section 12 moves the analysis threshold to 1m to show the effect.
- Trend and the reporting threshold. The threshold is in the money of each accident year. A claim of 750,000 in the first accident year is worth much more at 2026 prices. Thus, after the trend, the cut for the older years is higher than the cut for recent years (the table below shows the cut of each year). Each claim carries its own cut in treaty-year prices. The Pareto fit in section 5 uses these cuts as left truncation points. The policy limit is trended with the claim, on the assumption that sums insured follow the same index.
- Past structures. We assume that the cedant’s structure did not change during the experience period, because the submission gives only the current one. When a submission gives past structures,
PreparedLosses.as_if(historical, years, proposed)gives the recoveries of each year under the program in force then, next to the proposed tower. Use it to reconcile with the recoveries that the cedant reports.
ANALYSIS_THRESHOLD = 750_000.0 # complete from here, at the prices of each accident year
def incurred_development(claims, min_incurred, max_year=4):
"""HELPER (`DevelopmentPattern.from_history` has no threshold on the earlier valuation). Age-to-age
incurred factors from the listing itself: for each development year d (valuation year minus accident year),
the sum of the incurred at d + 1 over the sum at d, over the claims valued at both whose incurred at d is at
least `min_incurred` (the listing is selected on the latest incurred; a claim large enough at d is in it
whatever its later development).
Returns the factors and the cumulative factors to ultimate, by development year, with no development after
`max_year`."""
num, den = defaultdict(float), defaultdict(float)
for c in claims.values():
for v, (_, inc) in c["values"].items():
if v + 1 in c["values"] and inc >= min_incurred:
num[v - c["year"]] += c["values"][v + 1][1]
den[v - c["year"]] += inc
link = {d: num[d] / den[d] for d in sorted(num) if d <= max_year}
to_ultimate, run = {}, 1.0
for d in range(max(YEARS) - min(YEARS) + 1, -1, -1):
to_ultimate[d] = run
run *= link.get(d - 1, 1.0)
return link, to_ultimate
link, to_ultimate = incurred_development(claims, ANALYSIS_THRESHOLD)
print(f"age-to-age incurred factors of the claims over {money(ANALYSIS_THRESHOLD)} at the earlier valuation:",
", ".join(f"{d}: {f:.3f}" for d, f in link.items()))
# The library's factors: every claim valued at both ages, by development year (the listing's selection stays in).
valuations = [(cid, v - c["year"], inc) for cid, c in claims.items() for v, (_, inc) in c["values"].items()]
every_claim = DevelopmentPattern.from_history([cid for cid, _, _ in valuations],
[float(d) for _, d, _ in valuations], [inc for _, _, inc in valuations],
ages=[float(d) for d in range(len(YEARS))])
print(" measured on every listed claim, they would be:",
", ".join(f"{d}: {f:.3f}" for d, f in enumerate(every_claim.age_to_age[:len(link)])))
# Every claim at its latest incurred (valued 31 December 2025), developed to ultimate and trended to the treaty
# year. A claim cannot develop past its policy limit, so its factor to ultimate carries the cap.
ids = list(claims)
reported = [claims[cid]["values"][last[cid]][1] for cid in ids]
to_limit = [min(r * to_ultimate[last[cid] - claims[cid]["year"]], claims[cid]["limit"]) / r
for cid, r in zip(ids, reported)]
record = LargeLossExperience(ids, [claims[cid]["accident"] for cid in ids], reported,
valuation=year_fraction(2025, 12, 31))
prepared = record.prepare(rate=SEVERITY_TREND, to=TREATY_MIDDLE, development=to_limit)
table = prepared.to_dict() # one row per claim, in the record's order: ultimate, trend factor, trended loss
large = [{"id": cid, "year": claims[cid]["year"], "reported": r, "ultimate": u, "limit": claims[cid]["limit"],
"trend": f, "loss": loss, "at_limit": u >= 0.999 * claims[cid]["limit"]}
for cid, r, u, f, loss in zip(table["id"], reported, table["ultimate"], table["factor"], table["trended"])]
# Complete claims: developed ultimate over the analysis threshold at the prices of the accident date.
eligible = [x for x in large if x["ultimate"] >= ANALYSIS_THRESHOLD]
for x in eligible:
# x["loss"] is at the treaty year's prices, and the policy limit is trended with it.
x["threshold"] = ANALYSIS_THRESHOLD * x["trend"] # the same cut, in treaty-year prices: it differs by year
x["censored"] = x["at_limit"]
print(f"\n{len(large)} listed claims, {len(eligible)} over {money(ANALYSIS_THRESHOLD)} once developed; "
f"{sum(x['censored'] for x in eligible)} of them at their policy limit")
print(f"{'year':>6s} {'listed':>7s} {'complete':>9s} {'trend':>7s} {'cut in 2026 prices':>19s} {'largest, 2026 prices':>21s}")
for y in YEARS:
ys = [x for x in eligible if x["year"] == y]
print(f"{y:>6d} {sum(x['year'] == y for x in large):>7d} {len(ys):>9d} {trend_to_treaty(y):>7.3f} "
f"{money(ANALYSIS_THRESHOLD * trend_to_treaty(y)):>19s} {money(max((x['loss'] for x in ys), default=0)):>21s}")age-to-age incurred factors of the claims over 0.75m at the earlier valuation: 0: 1.193, 1: 1.035, 2: 1.020, 3: 1.008, 4: 0.999
measured on every listed claim, they would be: 0: 1.193, 1: 1.044, 2: 1.024, 3: 1.005, 4: 1.000
168 listed claims, 100 over 0.75m once developed; 1 of them at their policy limit
year listed complete trend cut in 2026 prices largest, 2026 prices
2016 9 3 1.554 1.17m 2.96m
2017 16 8 1.487 1.11m 4.85m
2018 16 11 1.423 1.07m 3.64m
2019 16 11 1.361 1.02m 2.23m
2020 16 12 1.303 0.98m 7.01m
2021 22 12 1.246 0.93m 4.16m
2022 23 10 1.193 0.89m 14.33m
2023 19 8 1.141 0.86m 3.29m
2024 18 14 1.092 0.82m 7.08m
2025 13 11 1.045 0.78m 2.79m
Claims not yet reported. Some large claims occurred but are not yet in the listing. A triangle of claim counts by accident year and year of report, developed with the same chain ladder, gives a factor on the count of each year. The factor is large only for the most recent year. burning_cost in section 6 reads the same factors as a DevelopmentPattern by age, at the average age of each year.
# Late-reported claims: a triangle of claim counts by report year, developed with the same chain ladder.
reported_in = defaultdict(int)
for c in claims.values():
reported_in[(c["year"], c["report"])] += 1
rows = [(y, 12 * (v - y + 1), float(sum(reported_in[(y, w)] for w in range(y, v + 1))))
for y in YEARS for v in range(y, 2026)]
counts = Triangle.from_long([r[0] for r in rows], [r[1] for r in rows], {"claims": [r[2] for r in rows]})
count_fit = ChainLadder().fit(counts, "claims")
count_factor = {y: (count_fit.latest[i] + count_fit.reserve[i]) / count_fit.latest[i] for i, y in enumerate(YEARS)}
# The same factors by age, for the burning cost: an accident year is on average half a year old at its year end.
count_pattern = DevelopmentPattern([0.5 + k for k in range(len(count_fit.cdf))], list(count_fit.cdf))
print("claims still to be reported, as a factor on the count:",
", ".join(f"{y}: {count_factor[y]:.3f}" for y in YEARS[-3:]))claims still to be reported, as a factor on the count: 2023: 1.017, 2024: 1.040, 2025: 1.239
5. Severity and frequency of the large losses
Severity. A Pareto distribution often describes large losses above a threshold well. The probability of a loss above x is (T / x) ** alpha for x over the threshold T. A lower alpha gives a heavier tail. Pareto.fit finds the maximum likelihood alpha and includes the two data features of the listing:
- truncation: a claim is in the data only if it was over the cut of its year (the
reporting_thresholds). - censoring: a claim at its policy limit is known only to be at least that large (the censored flags).
The three values below show the effect of each feature. If you ignore the thresholds, the fit assumes that the older years show all claims over T. But those years show only claims over their higher cut, so the fitted tail is much heavier. Pareto.fit_with_standard_error also returns the standard error of the alpha, from the observed information. Without truncation, it is alpha over the square root of the number of uncensored claims. The thresholds increase it a little.
T = ANALYSIS_THRESHOLD
losses = [x["loss"] for x in eligible]
thresholds = [x["threshold"] for x in eligible]
censored = [x["censored"] for x in eligible]
severity_fit, ALPHA_SE = Pareto.fit_with_standard_error(losses, T, reporting_thresholds=thresholds, censored=censored)
ALPHA = severity_fit.alpha
n_uncensored = sum(not c for c in censored)
print(f"Pareto alpha with truncation and censoring: {ALPHA:.3f} (standard error {ALPHA_SE:.2f}; "
f"alpha / sqrt(uncensored claims) is {ALPHA / math.sqrt(n_uncensored):.2f})")
print(f" ignoring the reporting thresholds: {Pareto.fit(losses, T, censored=censored).alpha:.3f}")
print(f" ignoring the policy limits as well: {Pareto.fit(losses, T).alpha:.3f}")Pareto alpha with truncation and censoring: 1.720 (standard error 0.17; alpha / sqrt(uncensored claims) is 0.17)
ignoring the reporting thresholds: 1.242
ignoring the policy limits as well: 1.255
Frequency. The number of claims over T per year must be on a common basis. The calculation has three steps:
- Gross up the counts for claims not yet reported.
- Move each count from the cut of its year to
T, with the fitted alpha. - Divide by the exposure of the year relative to 2026.
A Poisson GLM with that adjustment as an offset does the calculation. It also tests for a trend that remains in the counts after the exposure and the cut. Its Pearson dispersion measures over-dispersion. A value over 1 shows that the counts change more from year to year than a Poisson count, and we then use a negative binomial. With ten years of counts that estimate is weak, so section 12 tests a more dispersed count.
by_year = defaultdict(int)
for x in eligible:
by_year[x["year"]] += 1
# Expected number of complete claims each year if the book were at 2026's size and prices and the cut were T:
# the count, grossed up for late reports, moved from the year's own cut to T with the fitted alpha, and scaled by exposure.
cut_factor = {y: trend_to_treaty(y) ** ALPHA for y in YEARS}
exposure_ratio = {y: onlevel[y] / ONLEVEL_2026 for y in YEARS}
adjusted = {y: by_year[y] * count_factor[y] * cut_factor[y] / exposure_ratio[y] for y in YEARS}
print(f"{'year':>6s} {'claims':>7s} {'late reports':>13s} {'to cut T':>9s} {'exposure':>9s} {'claims a year at 2026 size':>27s}")
for y in YEARS:
print(f"{y:>6d} {by_year[y]:>7d} {count_factor[y]:>13.3f} {cut_factor[y]:>9.3f} {exposure_ratio[y]:>9.3f} {adjusted[y]:>27.1f}")
# A Poisson GLM on the counts: the offset is the expected count if nothing but exposure, cut and late reports varied.
offset = [math.log(exposure_ratio[y] / (count_factor[y] * cut_factor[y])) for y in YEARS]
data = {"year": [float(y - 2020) for y in YEARS]}
level_fit = Glm("poisson", "log", dispersion="pearson").fit(
Terms().intercept().fit(data).design(data, offset=offset), [float(by_year[y]) for y in YEARS])
trend_fit = Glm("poisson", "log", dispersion="pearson").fit(
Terms().intercept().numeric("year").fit(data).design(data, offset=offset), [float(by_year[y]) for y in YEARS])
LAMBDA = math.exp(level_fit.coefficients[0])
DISPERSION = max(1.0, level_fit.dispersion)
print(f"\nclaims a year over {money(T)} at 2026 size and prices: {LAMBDA:.1f}; Pearson dispersion {level_fit.dispersion:.2f}")
print(f"residual trend in the counts: {math.exp(trend_fit.coefficients[1]) - 1:+.1%} a year "
f"(standard error {trend_fit.std_errors[1]:.3f} on the log scale, p-value {trend_fit.p_values[1]:.2f})")
frequency = claim_count(LAMBDA, DISPERSION)
print(f"count model: {frequency}")
first = YEARS[0]
expected_first = LAMBDA * exposure_ratio[first] / (count_factor[first] * cut_factor[first])
p_low = sum(math.exp(-expected_first) * expected_first**k / math.factorial(k) for k in range(by_year[first] + 1))
print(f"{first}: {expected_first:.1f} complete claims expected at the fitted level, {by_year[first]} seen "
f"(a Poisson count is that low or lower with probability {p_low:.0%})") year claims late reports to cut T exposure claims a year at 2026 size
2016 3 1.000 2.133 0.744 8.6
2017 8 1.000 1.978 0.766 20.6
2018 11 1.000 1.833 0.789 25.5
2019 11 1.000 1.700 0.813 23.0
2020 12 1.000 1.576 0.838 22.6
2021 12 1.000 1.461 0.863 20.3
2022 10 1.000 1.354 0.889 15.2
2023 8 1.017 1.255 0.915 11.2
2024 14 1.040 1.164 0.943 18.0
2025 11 1.239 1.079 0.971 15.1
claims a year over 0.75m at 2026 size and prices: 17.7; Pearson dispersion 0.80
residual trend in the counts: -3.1% a year (standard error 0.031 on the log scale, p-value 0.34)
count model: Poisson(lam=17.71230224747555)
2016: 6.2 complete claims expected at the fitted level, 3 seen (a Poisson count is that low or lower with probability 14%)
Three remarks on the counts:
- The residual trend is small and far from significant (a p-value over 0.3), so we do not apply it.
- 2016 has the lowest adjusted count. The fitted level expects about 6 complete claims in that year, and there were 3. A Poisson count gives this result about one year in seven, so the year stays in.
- The move from the cut of a year to
Tassumes that each risk can produce a claim above that cut. A risk insured for less than the cut cannot. The adjustment is thus a little too small for the oldest years. By the generator’s mix of sums insured, it is about 3% too small on the 2016 count, and less than 1% from 2023. We do not change it.
6. Experience rating
Experience rating prices a layer from the cedant’s own claims. There are two estimates:
- The as-if burning cost. Put the trended, developed large claims of each year through the current layer, scale to 2026 exposure, and average the years. It makes no assumption about the tail, and it has a lot of noise for high layers. A year with no claim over the attachment shows nothing, whatever the risk of the layer. PreparedLosses.burning_cost does this calculation. It puts the trended claims of each year through the layers. It grosses up the layer total of each year by the count factor for late reports (section 4) and divides it by the on-level premium of the year. That ratio times the 2026 on-level premium is the cost of the year at 2026 size.
- A model. The fitted Pareto for severity and the count for frequency go into a CollectiveModel. This gives the expected loss of the layer in closed form from all the claims together. The policy limit of its risk caps each claim, so the severity is a mixture of Pareto distributions capped at different limits.
PolicyLimitsis that mixture, with the as-if limits of the claims in the data.limited_severityputs it on a grid with Grid.rounding, which keeps the mass at each limit (the claims that the limit caps) on the limit.
occurrence_layer_statistics adds the shape: how often a claim reaches the layer or uses all of it.
STEP = 25_000.0
LAYERS = [(t["limit"], t["attachment"]) for t in terms]
NAMES = [t["name"] for t in terms]
MAX_LOSS = float(profile_rows[-1]["upper_sum_insured"]) # the largest sum insured in the book
def limited_severity(alpha, policy_limits, threshold=T, step=STEP):
"""The severity of a claim over the threshold on a grid: Pareto(threshold, alpha) cut at the policy limit of the
risk, with the limits taken as the claims' own as-if limits, each with equal weight."""
capped = PolicyLimits(Pareto(threshold, alpha), policy_limits, [1.0] * len(policy_limits))
grid, _ = Grid.rounding(capped, step, int(max(policy_limits) / step) + 2)
return grid
policy_limits = [x["limit"] * x["trend"] for x in eligible]
severity = limited_severity(ALPHA, policy_limits)
experience = CollectiveModel(frequency, severity)
experience_loss = [experience.layer_mean(limit, att) for limit, att in LAYERS]
# As-if burning cost: each year's trended claims through the layers (per claim, no annual terms), grossed up for
# late reports by the count pattern at the year's average age, over the year's on-level premium. The claims under
# the analysis threshold stay in the record: they are far below the lowest attachment and add nothing.
layers_only = Tower([Layer(t["name"], t["limit"], t["attachment"]) for t in terms])
costs = prepared.burning_cost(layers_only, YEARS, premium=[onlevel[y] for y in YEARS], development=count_pattern)
by_layer = costs.to_dict()
# A loss cost times the 2026 on-level premium is the cost at 2026 size; the mean weights the years equally.
burning = {n: {y: c[j] * ONLEVEL_2026 for y, c in zip(by_layer["year"], by_layer["loss_cost"])}
for j, n in enumerate(NAMES)}
reaching = {name: sum(x["loss"] > att for x in eligible) for name, (limit, att) in zip(NAMES, LAYERS)}
print(f"{'year':>6s} " + " ".join(f"{n:>11s}" for n in NAMES))
for y in YEARS:
print(f"{y:>6d} " + " ".join(f"{money(burning[n][y]):>11s}" for n in NAMES))
burning_cost = [m * ONLEVEL_2026 for m in costs.mean_loss_cost]
print(f"{'mean':>6s} " + " ".join(f"{money(b):>11s}" for b in burning_cost))
print(f"{'model':>6s} " + " ".join(f"{money(m):>11s}" for m in experience_loss))
print(f"claims reaching the layer in ten years: " + ", ".join(f"{n} {reaching[n]}" for n in NAMES))
for name, (limit, att) in zip(NAMES, LAYERS):
s = occurrence_layer_statistics(frequency, severity, 1.0, limit, att)
print(f"{name:>11s}: of the claims over {money(T)}, {s.pr_attach:.1%} reach the layer and {s.pr_detach:.1%} "
f"use all of its limit; {s.count.mean:.2f} losses to the layer a year") year 5m xs 5m 10m xs 10m 20m xs 20m
2016 0.00m 0.00m 0.00m
2017 0.00m 0.00m 0.00m
2018 0.00m 0.00m 0.00m
2019 0.00m 0.00m 0.00m
2020 2.40m 0.00m 0.00m
2021 0.00m 0.00m 0.00m
2022 5.63m 4.87m 0.00m
2023 0.00m 0.00m 0.00m
2024 3.84m 0.00m 0.00m
2025 0.00m 0.00m 0.00m
mean 1.19m 0.49m 0.00m
model 1.09m 0.45m 0.17m
claims reaching the layer in ten years: 5m xs 5m 4, 10m xs 10m 1, 20m xs 20m 0
5m xs 5m: of the claims over 0.75m, 2.7% reach the layer and 0.6% use all of its limit; 0.49 losses to the layer a year
10m xs 10m: of the claims over 0.75m, 0.6% reach the layer and 0.1% use all of its limit; 0.10 losses to the layer a year
20m xs 20m: of the claims over 0.75m, 0.1% reach the layer and 0.0% use all of its limit; 0.02 losses to the layer a year
7. Exposure rating
Exposure rating prices a layer from the cedant’s portfolio, not from its claims. The risk profile lists bands of sum insured with their premium. An exposure curve gives the share of the expected loss of a risk below a given fraction of its sum insured. The part above the attachment of the layer, within its limit, is the share of the layer. Apply the curve to the ground-up expected loss of each band (premium times the loss ratio from section 3). The result is the expected loss of the layer. It uses the claim history only through that one loss ratio.
RiskProfile does this with an MBBEFD exposure curve. The Swiss Re curves are the one-parameter family Mbbefd.swiss_re(c). A lower c puts more of the loss in the large claims. The choice of curve is the main judgement of this method. Mbbefd.swiss_re_for_mean_rate and Mbbefd.swiss_re_for_layer_share find c from a mean destruction rate or from the share of one layer in the loss of a risk. The submission gives neither, so the table shows three curves, and we choose one.
lower = [float(r["lower_sum_insured"]) for r in profile_rows]
upper = [float(r["upper_sum_insured"]) for r in profile_rows]
risks = [float(r["risks"]) for r in profile_rows]
mean_si = [float(r["total_sum_insured"]) / float(r["risks"]) for r in profile_rows]
band_premium = [float(r["premium"]) for r in profile_rows]
def exposure_rated(c, loss_ratio=ELR):
profile = RiskProfile(mean_si, risks, Mbbefd.swiss_re(c), premiums=band_premium, loss_ratio=loss_ratio,
lower=lower, upper=upper, spread="tilted")
return [profile.expected_layer_loss(limit, att) for limit, att in LAYERS]
print(f"ground-up expected loss {money(ELR * profile_premium)} = {ELR:.1%} of the profile's premium {money(profile_premium)}")
print(f"{'curve':>14s} " + " ".join(f"{n:>11s}" for n in NAMES))
for c in (2.0, 3.0, 4.0):
print(f"{'Swiss Re c=' + format(c, 'g'):>14s} " + " ".join(f"{money(m):>11s}" for m in exposure_rated(c)))
CURVE = 3.0 # industrial and commercial property
exposure_loss = exposure_rated(CURVE)
print(f"\nselected c={CURVE:g}: " + ", ".join(f"{n} {money(m)}" for n, m in zip(NAMES, exposure_loss)))ground-up expected loss 102.05m = 56.7% of the profile's premium 180.00m
curve 5m xs 5m 10m xs 10m 20m xs 20m
Swiss Re c=2 1.96m 0.80m 0.32m
Swiss Re c=3 1.45m 0.59m 0.23m
Swiss Re c=4 0.97m 0.39m 0.15m
selected c=3: 5m xs 5m 1.45m, 10m xs 10m 0.59m, 20m xs 20m 0.23m
8. Blend experience and exposure by credibility
Do not use either estimate alone. Experience shows the cedant’s own history, but it is thin for high layers. Exposure rating is stable, but it depends on a curve chosen by judgement. Credibility weights them: Z times experience plus (1 - Z) times exposure.
LimitedFluctuation (classical credibility) gives the number of claims that the experience needs for its estimate to be within k of the truth with probability p. For the pure premium of a layer (frequency times severity), that number increases with 1 + cv**2. Here cv is the coefficient of variation of the loss of the layer per claim over T. Few claims reach a layer, so its cv is large, and the standard is far above the number of claims that we have. Z is the square root of the ratio. Layer losses are volatile, so we use a tolerance k of 20%, not the 5% of primary ratemaking. Z is lower for higher layers.
This standard comes from primary ratemaking. The cv here is of the loss of the layer per claim over T, zeros included, to go with the count of claims over T. layer_cv(severity, limit, attachment) gives the cv per claim that reaches the layer, to go with the count of those claims. The last line below shows it.
The standard measures the volatility of an empirical estimate: the burning cost, from the few claims that reach the layer. But the experience estimate in this blend is the fitted model of section 6. That model learns the tail from all the claims over T, so it is more stable than a burning cost. Its uncertainty is that of its parameters, which section 12 draws. Thus the Z below is a conservative weight for the model. Section 12 shows the effect on the price when Z is three times larger.
CRED_P, CRED_K = 0.90, 0.20 # within 20% of the mean with probability 90%
lf = LimitedFluctuation(p=CRED_P, k=CRED_K)
def blend_layers(sev, experience_loss, exposure_loss, n_claims, scale=1.0):
"""Credibility-weight experience and exposure layer by layer. The standard is for the layer's pure premium
(frequency and severity both vary), in claims over T; the cv is that of the layer's loss per claim over T.
`scale` multiplies the credibility (capped at 1), for the sensitivity of section 12."""
blend, credibility, cvs = [], [], []
for (limit, att), e, x in zip(LAYERS, experience_loss, exposure_loss):
per_claim, _ = sev.map(lambda v: min(max(v - att, 0.0), limit))
cv = math.sqrt(per_claim.variance()) / per_claim.mean()
z = min(1.0, scale * lf.credibility(n_claims, lf.pure_premium_standard(cv)))
blend.append(credibility_weighted(e, z, x))
credibility.append(z)
cvs.append(cv)
return blend, credibility, cvs
blended, weights, cvs = blend_layers(severity, experience_loss, exposure_loss, len(eligible))
print(f"full-credibility standard for a frequency within {CRED_K:.0%} with probability {CRED_P:.0%}: "
f"{lf.frequency_standard():.0f} claims; for a layer's pure premium it is that times (1 + cv squared)")
print(f"{'layer':>11s} {'cv of layer loss':>17s} {'claims':>7s} {'credibility':>12s} {'experience':>11s} {'exposure':>9s} {'blend':>9s}")
for name, cv, z, e, x, b in zip(NAMES, cvs, weights, experience_loss, exposure_loss, blended):
print(f"{name:>11s} {cv:>17.2f} {len(eligible):>7d} {z:>12.2f} {money(e):>11s} {money(x):>9s} {money(b):>9s}")
print("cv per claim reaching the layer (layer_cv): "
+ ", ".join(f"{n} {layer_cv(severity, limit, att):.2f}" for n, (limit, att) in zip(NAMES, LAYERS)))full-credibility standard for a frequency within 20% with probability 90%: 68 claims; for a layer's pure premium it is that times (1 + cv squared)
layer cv of layer loss claims credibility experience exposure blend
5m xs 5m 7.70 100 0.16 1.09m 1.45m 1.39m
10m xs 10m 17.11 100 0.07 0.45m 0.59m 0.58m
20m xs 20m 37.01 100 0.03 0.17m 0.23m 0.23m
cv per claim reaching the layer (layer_cv): 5m xs 5m 0.81, 10m xs 10m 0.80, 20m xs 20m 0.83
This standard gives the experience a small credibility, and the credibility decreases with the layer. The claims data still matters: it sets the loss ratio of section 3 and the size of the book in section 5. Section 12 shows what moves the price. But with these weights, the choice of exposure curve has more effect than the tail fitted from a hundred claims. The weights are conservative for a fitted model, so section 12 also multiplies them by three.
9. The loss model and the treaty terms
To get the distribution of the annual payment of each layer, and not only its mean, we need one model for the whole program. fit_references fits a piecewise Pareto severity that gives the three blended layer losses. This also sets the number of claims over the lowest attachment.
Be careful with the matching. It returns a model for all inputs that permit one, and the pieces between the attachments can have very large or very small alphas. diagnostics() lists each alpha below 1 and each change by more than a factor of 2 between adjacent pieces. fit_references(..., alpha_bounds=(lo, hi)) keeps the alphas in a range. The loss to each layer is exact. The shape between the attachments is not data. Read the alphas and the warnings.
Then Tower.on_grid applies the terms: the limit and attachment of each layer, the paid reinstatements, and the annual limit that the reinstatements give. The reinstatements are charged at the rate in the terms, pro rata as to amount. The gross loss cannot be more than the largest sum insured. The result is an exact annual distribution for each layer, with no simulation error.
# The blended layer losses fix a piecewise Pareto above the lowest attachment, and with it the number of claims
# over that attachment (exposure rating has no claim count, so the matching derives one).
EXCESS_FREQUENCY = experience.excess_frequency(LAYERS[0][1])
model = fit_references([(limit, att, el) for (limit, att), el in zip(LAYERS, blended)], default_alpha=ALPHA)
alphas = model.severity.alpha
print(f"matched model: {model.frequency:.3f} claims a year over {money(LAYERS[0][1])} (the experience model has "
f"{EXCESS_FREQUENCY:.3f}); alphas of its pieces {', '.join(f'{a:.2f}' for a in alphas)}")
diagnostics = model.diagnostics()
print(f"diagnostics: alphas from {diagnostics['min_alpha']:.2f} to {diagnostics['max_alpha']:.2f}, "
f"{len(diagnostics['warnings'])} warnings (alphas below 1, jumps of more than a factor of 2 between pieces)")
print("(a piece with a very large or very small alpha is where the three layer losses and the frequency "
"disagree; the loss to each layer is exact, the shape between attachments is not)")
print(f"{'layer':>11s} {'blended':>9s} {'model':>9s}")
for name, (limit, att), el in zip(NAMES, LAYERS, blended):
print(f"{name:>11s} {money(el):>9s} {money(model.layer_loss(limit, att)):>9s}")
POINTS = 2**15
# No claim can exceed the largest sum insured: Grid.rounding puts the mass beyond it on the last point.
loss_grid, _ = Grid.rounding(model.severity, STEP, int(MAX_LOSS / STEP) + 1)
loss_frequency = claim_count(model.frequency, 1.0)
def program(deposits):
"""The proposed layers with their reinstatements; `deposits` are the premiums the reinstatements are charged on."""
return Tower([Layer(t["name"], t["limit"], t["attachment"], premium=d,
reinstatement_rates=[t["reinstatement_rate"]] * t["reinstatements"])
for t, d in zip(terms, deposits)])
# One unit of deposit premium on every layer: the expected reinstatement premium is then per unit of deposit.
unit_grids = program([1.0] * len(terms)).on_grid(loss_frequency, loss_grid, POINTS)
grids = unit_grids
reinstatement_load = list(unit_grids.expected_reinstatement_premium)
print(f"\non the grid: {grids.on_points=}, annual expected loss "
+ ", ".join(f"{n} {money(g.mean())}" for n, g in zip(NAMES, grids.ceded)))
print("expected reinstatement premium per unit of deposit: " + ", ".join(f"{n} {r:.3f}" for n, r in zip(NAMES, reinstatement_load)))matched model: 0.604 claims a year over 5.00m (the experience model has 0.486); alphas of its pieces 2.83, 1.25, 5.21, 1.12, 6.62, 0.83, 1.72
diagnostics: alphas from 0.83 to 6.62, 7 warnings (alphas below 1, jumps of more than a factor of 2 between pieces)
(a piece with a very large or very small alpha is where the three layer losses and the frequency disagree; the loss to each layer is exact, the shape between attachments is not)
layer blended model
5m xs 5m 1.39m 1.39m
10m xs 10m 0.58m 0.58m
20m xs 20m 0.23m 0.23m
on the grid: grids.on_points=True, annual expected loss 5m xs 5m 1.39m, 10m xs 10m 0.58m, 20m xs 20m 0.23m
expected reinstatement premium per unit of deposit: 5m xs 5m 0.276, 10m xs 10m 0.057, 20m xs 20m 0.011
Terms that depend on the time in the year (a reinstatement pro rata as to time, an event limit) need simulated events. simulate_events and Tower.apply apply the same program to simulated years. Here they only confirm the grid. The means agree within the simulation error, which is larger for the top layer, because few simulated years pay anything.
from prospicio.aggregate import simulate_events
# The same program by simulation: terms that are not on the grid (a reinstatement pro rata as to time, an event
# limit) need events. Here the check is that the two agree.
events = simulate_events(loss_frequency, loss_grid, N_SIMS, 11)
simulated = program([1e6] * len(terms)).apply(events)
print(f"{'layer':>11s} {'grid':>9s} {'simulated':>10s} {'difference':>11s}")
for name, g in zip(NAMES, grids.ceded):
s = simulated.marginal(["ceded", name]).mean()
print(f"{name:>11s} {money(g.mean()):>9s} {money(s):>10s} {s / g.mean() - 1:>+11.1%}") layer grid simulated difference
5m xs 5m 1.39m 1.40m +0.2%
10m xs 10m 0.58m 0.58m -0.4%
20m xs 20m 0.23m 0.22m -3.6%
10. Risk metrics for each layer
The expected loss of a layer is not sufficient. How often losses reach it and how bad a bad year is set the capital behind it. The annual distribution of each layer gives these values:
- the probability that it pays anything in the year (attachment probability).
- the probability that a single loss uses all its limit (exhaustion).
- the probability that the year uses the whole annual limit.
- the standard deviation.
- the 99% value at risk (VaR, the loss exceeded once in a hundred years).
- the 99% tail value at risk (TVaR, the average of the worst 1% of years).
The largest single loss of a year, from the simulated events, is the occurrence exceedance that a cat modeller quotes as a return period.
The blended layer losses set only the mean of each layer. All other figures in this table (the probabilities, the standard deviation, VaR and TVaR) also depend on the shape of the matched severity between the attachments. Section 9 says that this shape is not data. Section 12 compares it with a smooth shape.
TAIL = Distortion.tvar(0.99)
metrics = {}
print(f"{'layer':>11s} {'P(any loss)':>12s} {'P(limit used)':>14s} {'P(annual limit)':>16s} {'sd':>8s} {'VaR 99%':>9s} {'TVaR 99%':>9s}")
for t, g in zip(terms, grids.ceded):
annual_limit = t["limit"] * (1 + t["reinstatements"])
m = {"any": 1 - g.cdf(0.0), "limit": 1 - g.cdf(t["limit"] - STEP / 2), "annual": 1 - g.cdf(annual_limit - STEP / 2),
"sd": math.sqrt(g.variance()), "var": g.quantile(0.99), "tvar": TAIL.measure(g)}
metrics[t["name"]] = m
print(f"{t['name']:>11s} {m['any']:>12.1%} {m['limit']:>14.1%} {m['annual']:>16.2%} {money(m['sd']):>8s} "
f"{money(m['var']):>9s} {money(m['tvar']):>9s}")
# The largest single loss of a year (occurrence exceedance), from the simulated events, against the layers.
largest = events.maxima()
print("\nlargest claim of the year, return periods: " + ", ".join(
f"1 in {rp}: {money(largest.quantile(1 - 1 / rp))}" for rp in (5, 10, 25, 50, 100))) layer P(any loss) P(limit used) P(annual limit) sd VaR 99% TVaR 99%
5m xs 5m 45.1% 16.3% 0.08% 2.35m 10.00m 11.17m
10m xs 10m 15.4% 3.5% 0.06% 2.11m 10.00m 11.44m
20m xs 20m 3.4% 0.8% 0.00% 1.92m 8.80m 18.66m
largest claim of the year, return periods: 1 in 5: 8.03m, 1 in 10: 10.93m, 1 in 25: 16.88m, 1 in 50: 21.70m, 1 in 100: 27.15m
import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(7.5, 3.8))
xs = [i * 0.05e6 for i in range(0, 501)]
for name, g in zip(NAMES, grids.ceded):
ax.plot([x / 1e6 for x in xs], [1.0 - g.cdf(x) for x in xs], label=name)
ax.set_yscale("log")
ax.set_ylim(1e-3, 1.0)
ax.set_xlim(0, 25)
ax.set_xlabel("annual loss to the layer (millions)")
ax.set_ylabel("probability of exceeding")
ax.set_title("Annual loss to each layer, on the grid")
ax.legend()
fig.tight_layout()
plt.show()
12. Sensitivity and parameter uncertainty
Each figure so far comes from estimates. evaluate does sections 3 to 11 as one function, so we can change inputs and calculate the premiums again from the listing. The first table changes one input at a time, from the loss ratio of section 3 to the credibility of section 8. The second table draws the Pareto alpha and the claim frequency from their sampling distributions, and the exposure curve parameter between 2 and 4. It runs the whole calculation for each draw. The curve range is wide on purpose: it represents the judgement that no data in the submission can settle.
def evaluate(trend=SEVERITY_TREND, alpha=None, frequency_scale=1.0, dispersion=1.0, curve=CURVE,
threshold=ANALYSIS_THRESHOLD, elr_shift=0.0, credibility_scale=1.0):
"""Steps 3 to 11 as one function, so an input can be moved and the technical premiums recomputed:
the Cape Cod loss ratio (moved by `elr_shift`) and the large losses at `trend`, the complete claims over
`threshold`, the Pareto fit (or `alpha` given), the claim count scaled by `frequency_scale`, experience and
exposure layer losses, their credibility blend (credibility times `credibility_scale`), the matched model,
the program on the grid and the technical premium of each layer."""
def factor(date): # the same trend as `LargeLossExperience.prepare` in section 4, at `trend`
return trend_factor(trend, TREATY_MIDDLE - date)
elr = loss_ratio(CapeCod(trend=trend).fit(triangle, "incurred", "onlevel").ultimate, trend) + elr_shift
complete = [x for x in large if x["ultimate"] >= threshold]
fit = Pareto.fit([x["ultimate"] * factor(claims[x["id"]]["accident"]) for x in complete], threshold,
reporting_thresholds=[threshold * factor(claims[x["id"]]["accident"]) for x in complete],
censored=[x["at_limit"] for x in complete]).alpha if alpha is None else alpha
# The Poisson maximum likelihood level of the adjusted counts: total claims over total expected-per-unit.
per_unit = sum(exposure_ratio[y] / (count_factor[y] * factor(y + 0.5) ** fit) for y in YEARS)
lam = frequency_scale * len(complete) / per_unit
sev = limited_severity(fit, [x["limit"] * factor(claims[x["id"]]["accident"]) for x in complete], threshold)
exp_model = CollectiveModel(claim_count(lam, dispersion), sev)
experience_ = [exp_model.layer_mean(limit, att) for limit, att in LAYERS]
blend, credibility, _ = blend_layers(sev, experience_, exposure_rated(curve, elr), len(complete),
credibility_scale)
matched = fit_references([(limit, att, el) for (limit, att), el in zip(LAYERS, blend)], default_alpha=fit)
grid, _ = Grid.rounding(matched.severity, STEP, int(MAX_LOSS / STEP) + 1)
annual = program([1.0] * len(terms)).on_grid(claim_count(matched.frequency, dispersion), grid, POINTS)
rows = price_layers(annual, list(annual.expected_reinstatement_premium))
for row, t, load in zip(rows, terms, annual.expected_reinstatement_premium):
row["quoted_total"], row["quoted_return"] = at_quote(row, t, load)
return {"alpha": fit, "lambda": lam, "elr": elr, "experience": experience_, "blend": blend, "rows": rows}
base = evaluate()
print("the function reproduces the step-by-step result: "
+ ", ".join(f"{r['name']} {r['technical']:,.0f} against {p['technical']:,.0f}" for r, p in zip(base["rows"], priced)))the function reproduces the step-by-step result: 5m xs 5m 2,623,357 against 2,623,357, 10m xs 10m 1,802,119 against 1,802,119, 20m xs 20m 2,188,904 against 2,188,904
ELR_SE = spread / math.sqrt(len(YEARS)) # standard error of the ten-year loss ratio, section 3
scenarios = [("base case", {}),
(f"loss ratio {2 * ELR_SE:.1%} lower", {"elr_shift": -2 * ELR_SE}),
(f"loss ratio {2 * ELR_SE:.1%} higher", {"elr_shift": 2 * ELR_SE}),
("analysis threshold 1m", {"threshold": 1e6}),
("experience credibility x3", {"credibility_scale": 3.0}),
("tail alpha 0.25 lower (heavier)", {"alpha": ALPHA - 0.25}),
("tail alpha 0.25 higher (lighter)", {"alpha": ALPHA + 0.25}),
("cost trend 1.5 points lower", {"trend": SEVERITY_TREND - 0.015}),
("cost trend 1.5 points higher", {"trend": SEVERITY_TREND + 0.015}),
("claim frequency 20% lower", {"frequency_scale": 0.8}),
("claim frequency 20% higher", {"frequency_scale": 1.2}),
("claims cluster (count dispersion 3)", {"dispersion": 3.0}),
("exposure curve c=2 (heavier)", {"curve": 2.0}),
("exposure curve c=4 (lighter)", {"curve": 4.0})]
results = {label: (base if not kw else evaluate(**kw)) for label, kw in scenarios}
print(f"{'technical rate on line':>38s} " + " ".join(f"{n:>11s}" for n in NAMES) + " " + " ".join(f"{'return ' + n.split()[0]:>10s}" for n in NAMES))
for label, res in results.items():
print(f"{label:>38s} " + " ".join(f"{r['rol']:>11.1%}" for r in res["rows"]) + " "
+ " ".join(f"{r['quoted_return']:>10.1%}" for r in res["rows"])) technical rate on line 5m xs 5m 10m xs 10m 20m xs 20m return 5m return 10m return 20m
base case 41.1% 17.1% 10.8% 11.3% 7.9% 4.7%
loss ratio 3.5% lower 40.1% 16.6% 10.4% 12.1% 8.4% 5.0%
loss ratio 3.5% higher 42.2% 17.5% 11.2% 10.6% 7.5% 4.5%
analysis threshold 1m 41.0% 17.0% 10.8% 11.4% 8.0% 4.7%
experience credibility x3 39.6% 16.8% 10.7% 12.4% 8.2% 4.8%
tail alpha 0.25 lower (heavier) 42.9% 17.6% 11.1% 10.1% 7.5% 4.5%
tail alpha 0.25 higher (lighter) 40.6% 16.9% 10.8% 11.7% 8.0% 4.7%
cost trend 1.5 points lower 39.5% 16.5% 10.3% 12.5% 8.5% 5.0%
cost trend 1.5 points higher 42.9% 17.7% 11.3% 10.1% 7.3% 4.4%
claim frequency 20% lower 40.6% 17.0% 10.8% 11.6% 8.0% 4.7%
claim frequency 20% higher 41.6% 17.1% 10.9% 11.0% 7.9% 4.7%
claims cluster (count dispersion 3) 47.5% 20.6% 11.0% 7.9% 5.9% 4.6%
exposure curve c=2 (heavier) 47.1% 19.8% 12.0% 7.3% 5.6% 3.9%
exposure curve c=4 (lighter) 35.1% 14.7% 7.7% 15.7% 10.3% 7.3%
Read the table down a column. An input that changes the technical rate on line by a small amount needs no more work. The inputs that change it most are where to question the submission.
In this case, two inputs change the rate on line of the working layer by about six points:
- The exposure curve: c=2 and c=4 give 47.1% and 35.1%, against 41.1%.
- The clustering of claims: a count dispersion of 3 gives 47.5%, and decreases the return at the quote from 11.3% to 7.9%.
The dispersion is the more difficult of the two to settle. The Pearson estimate from ten yearly counts is 0.80, with a floor at 1. Ten counts cannot show the difference between a dispersion of 1 and one of 2 or 3, so it is a judgement, as the curve is. Each of the other inputs changes the rate on line by less than two points. These inputs are the tail alpha, the frequency, the cost trend, the loss ratio (moved by two standard errors), the analysis threshold, and credibility three times larger. This result follows from the low credibility in section 8.
The top layer changes very little with any input except the curve. Its premium is mostly the capital charge on a 99% TVaR near its whole limit. Thus its price comes more from the choice of capital standard than from the loss model.
The shape of the matched model. The matching of section 9 sets the mean of each layer but not the shape between the attachments. The probabilities, VaR, TVaR and thus the capital of sections 10 and 11 depend on that shape. To measure this effect, price each layer again with a smooth shape. This is the severity of the experience model: one Pareto alpha over T, capped at the policy limits. For each layer, its claim frequency is scaled so that the expected loss of the layer is still the blended one.
# Each layer on its own grid: the experience severity with the frequency that gives the blended layer loss.
smooth = []
for i, (t, el, e) in enumerate(zip(terms, blended, experience_loss)):
layer_grids = program([1.0] * len(terms)).on_grid(claim_count(LAMBDA * el / e, 1.0), severity, POINTS)
smooth.append((layer_grids.ceded[i], layer_grids.expected_reinstatement_premium[i]))
smooth_rows = price_layers(type("SmoothGrids", (), {"ceded": [g for g, _ in smooth]}),
[load for _, load in smooth])
print(f"{'':11s} {'P(any loss)':>23s} {'TVaR 99%':>21s} {'technical ROL':>21s}")
print(f"{'layer':>11s} {'matched':>11s} {'smooth':>11s} {'matched':>10s} {'smooth':>10s} {'matched':>10s} {'smooth':>10s}")
for t, g, (sg, _), row, srow in zip(terms, grids.ceded, smooth, priced, smooth_rows):
print(f"{t['name']:>11s} {1 - g.cdf(0.0):>11.1%} {1 - sg.cdf(0.0):>11.1%} {money(TAIL.measure(g)):>10s} "
f"{money(TAIL.measure(sg)):>10s} {row['rol']:>10.1%} {srow['rol']:>10.1%}") P(any loss) TVaR 99% technical ROL
layer matched smooth matched smooth matched smooth
5m xs 5m 45.1% 46.2% 11.17m 11.00m 41.1% 40.8%
10m xs 10m 15.4% 11.9% 11.44m 11.37m 17.1% 17.0%
20m xs 20m 3.4% 2.9% 18.66m 15.86m 10.8% 9.4%
The smooth shape changes the technical rates on line of the two lower layers by less than half a point. But losses reach the middle layer in fewer years (11.9% against 15.4%). The top layer changes most. Its TVaR decreases from 18.66m to 15.86m, and its rate on line from 10.8% to 9.4%, still well above the broker’s 6%. The matched shape matters for the capital of the top layer, not for the decision.
# Parameter uncertainty: draw the Pareto alpha from its sampling distribution (normal, standard error alpha over
# the square root of the uncensored claims) and the claim frequency from a gamma with as many claims as were
# observed (fewer if the counts are over-dispersed), and the exposure curve parameter c uniformly between 2 and 4,
# re-run the chain, and look at the spread of the premium.
import random
N_DRAWS = 200 if N_SIMS >= 20_000 else 20 # fewer when PROSPICIO_EXAMPLE_SIMS is lowered, as in CI
rng = random.Random(2026)
effective_claims = len(eligible) / max(1.0, level_fit.dispersion)
draws = []
for _ in range(N_DRAWS):
a = max(1.15, rng.gauss(ALPHA, ALPHA / math.sqrt(n_uncensored)))
f = rng.gammavariate(effective_claims, 1 / effective_claims)
draws.append(evaluate(alpha=a, frequency_scale=f, curve=rng.uniform(2.0, 4.0)))
def percentile(values, q):
v = sorted(values)
return v[min(len(v) - 1, int(q * len(v)))]
print(f"{N_DRAWS} draws of alpha (standard error {ALPHA / math.sqrt(n_uncensored):.2f}), of the claim frequency "
f"({1 / math.sqrt(effective_claims):.0%} sampling error) and of the exposure curve")
print(f"{'layer':>11s} {'technical ROL, 5% / 50% / 95%':>32s} {'return at quote, 5% / 50% / 95%':>34s} {'P(quote covers technical)':>26s}")
cover, return_band, rol_band = [], [], []
for i, (t, row) in enumerate(zip(terms, priced)):
rol = [d["rows"][i]["rol"] for d in draws]
ret = [d["rows"][i]["quoted_return"] for d in draws]
cover.append(sum(t["quoted_rol"] >= r for r in rol) / len(rol))
return_band.append((percentile(ret, 0.05), percentile(ret, 0.95)))
rol_band.append((percentile(rol, 0.05), percentile(rol, 0.95)))
print(f"{t['name']:>11s} {percentile(rol, 0.05):>10.1%} {percentile(rol, 0.5):>9.1%} {percentile(rol, 0.95):>9.1%} "
f"{percentile(ret, 0.05):>13.1%} {percentile(ret, 0.5):>9.1%} {percentile(ret, 0.95):>9.1%} {cover[-1]:>22.0%}")200 draws of alpha (standard error 0.17), of the claim frequency (10% sampling error) and of the exposure curve
layer technical ROL, 5% / 50% / 95% return at quote, 5% / 50% / 95% P(quote covers technical)
5m xs 5m 36.0% 41.4% 46.6% 7.6% 11.1% 15.0% 62%
10m xs 10m 15.0% 17.2% 19.5% 5.8% 7.8% 10.0% 6%
20m xs 20m 8.1% 10.9% 12.0% 3.9% 4.6% 6.9% 0%
The last column gives the share of draws in which the broker’s rate on line is at least our technical rate on line. Read it with three cautions:
- The 5% and 95% points of a few hundred draws are approximate.
- The loss ratio, the cost trend, the credibility weights and the capital standard stay at their selected values. Thus the band is narrower than the whole uncertainty. The first table changes those inputs one at a time.
- The exposure curve is drawn uniformly between c=2 and c=4 around the selected c=3. This range is a judgement. A narrower range moves the probability towards 0 or 1.
In evaluate, the frequency of each draw is fitted again with the alpha of that draw. Thus the two are not independent in their effect on the layers.
import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(7.5, 3.8))
for i, (t, row) in enumerate(zip(terms, priced)):
rol = [d["rows"][i]["rol"] for d in draws]
ax.plot([i, i], [percentile(rol, 0.05), percentile(rol, 0.95)], color="C0", lw=6, alpha=0.4,
label="technical, 5% to 95% of the draws" if i == 0 else None)
ax.plot(i, row["rol"], "o", color="C0", label="technical, central" if i == 0 else None)
ax.plot(i, t["quoted_rol"], "D", color="C3", label="broker's quote" if i == 0 else None)
ax.set_xticks(range(len(NAMES)), NAMES)
ax.set_yscale("log")
ax.set_yticks([0.05, 0.1, 0.2, 0.4], ["5%", "10%", "20%", "40%"])
ax.minorticks_off()
ax.set_ylabel("rate on line (deposit)")
ax.set_title("Technical rate on line against the broker's quote")
ax.legend()
fig.tight_layout()
plt.show()
13. The decision
The rule uses the return at the quote. The one-price cross-check of section 11 is a second opinion.
- At or above the target (10%): quote the line that we want at the broker’s rate.
- Between the floor (6%) and the target: counter at our technical rate on line. If the broker’s quote is clearly above the one-price premium (by more than the 5% tolerance), also offer a smaller line at the quote.
- Below the floor: decline on the stand-alone view. But if the quote is clearly above the one-price premium, the shortfall comes from the stand-alone capital standard, not from the price of the risk. Then refer the layer to the portfolio view, and do not decline it.
The rule uses the central estimate. Each verdict prints the 5% to 95% range of the return at the quote across the draws of section 12. It also prints the probability that the quote covers our technical premium. Where that range includes the target or the floor, the verdict is nearer to a coin flip than its words suggest.
LINE = 0.25 # the share of each layer we would sign if the price is right
SMALL_LINE = 0.10 # the share we would sign at a price that is short of our technical premium but consistent
closing = []
for row in priced:
above_one_price = row["quoted_total"] >= row["consistent"] * (1 + TOLERANCE)
if row["quoted_return"] >= RETURN:
verdict = f"quote {LINE:.0%} at the broker's rate"
elif row["quoted_return"] >= FLOOR_RETURN:
verdict = f"counter at {row['rol']:.1%} rate on line"
if above_one_price:
verdict += f", or quote {SMALL_LINE:.0%} at the broker's rate"
elif above_one_price:
verdict = "refer to the portfolio view (declined on stand-alone capital, priced above one price of risk)"
else:
verdict = "decline"
closing.append(verdict)
print(f"{'layer':>11s} {'burning':>8s} {'experience':>11s} {'exposure':>9s} {'blend':>7s} {'technical':>10s} {'multiple':>9s} "
f"{'tech. ROL':>10s} {'quoted ROL':>11s} {'return':>7s} {'P(covers)':>10s}")
for row, t, p_cover, b, e, x, bl in zip(priced, terms, cover, burning_cost, experience_loss, exposure_loss, blended):
print(f"{row['name']:>11s} {money(b):>8s} {money(e):>11s} {money(x):>9s} {money(bl):>7s} {money(row['technical']):>10s} "
f"{row['technical'] / row['loss']:>9.2f} {row['rol']:>10.1%} {t['quoted_rol']:>11.1%} "
f"{row['quoted_return']:>7.1%} {p_cover:>10.0%}")
print()
for row, verdict, (low, high), p_cover in zip(priced, closing, return_band, cover):
print(f"{row['name']:>11s}: {verdict}\n{'':13s}return at the quote {row['quoted_return']:.1%}, {low:.1%} to {high:.1%} "
f"across the draws; the quote covers our technical premium in {p_cover:.0%} of them")
print()
for row, verdict in zip(priced, closing):
if verdict.startswith("quote"):
margin = row["quote"].at(row["quoted_total"]).margin * LINE
print(f"{row['name']}: a {LINE:.0%} line earns an expected {money(margin)} a year after expenses and brokerage, "
f"on {money(row['capital'] * LINE)} of capital ({row['quoted_return']:.1%}); "
f"its 99% TVaR loss is {money(metrics[row['name']]['tvar'] * LINE)}.") layer burning experience exposure blend technical multiple tech. ROL quoted ROL return P(covers)
5m xs 5m 1.19m 1.09m 1.45m 1.39m 2.62m 1.88 41.1% 43.0% 11.3% 62%
10m xs 10m 0.49m 0.45m 0.59m 0.58m 1.80m 3.10 17.1% 15.0% 7.9% 6%
20m xs 20m 0.00m 0.17m 0.23m 0.23m 2.19m 9.55 10.8% 6.0% 4.7% 0%
5m xs 5m: quote 25% at the broker's rate
return at the quote 11.3%, 7.6% to 15.0% across the draws; the quote covers our technical premium in 62% of them
10m xs 10m: counter at 17.1% rate on line
return at the quote 7.9%, 5.8% to 10.0% across the draws; the quote covers our technical premium in 6% of them
20m xs 20m: refer to the portfolio view (declined on stand-alone capital, priced above one price of risk)
return at the quote 4.7%, 3.9% to 6.9% across the draws; the quote covers our technical premium in 0% of them
5m xs 5m: a 25% line earns an expected 0.25m a year after expenses and brokerage, on 2.22m of capital (11.3%); its 99% TVaR loss is 2.79m.
Read the verdicts with their ranges. The working layer is a quote on the central estimate. But its return at the quote is between 7.6% and 15.0% across the draws, and the quote covers our technical premium in 62% of them. This is nearer to a coin flip than the verdict suggests, and supports a moderate line. The range of the middle layer is from just under the floor to about the target. The top layer goes to the portfolio view and is not declined, because its quote is well above the one-price premium. Without the one-price check, the rule declines it.
This is a decision on price. Other items also count. These are the sizes of the lines, the other business of the reinsurer, and the relationship with the cedant. Another item is the accumulation with its other risks: a loss to this program can occur with a loss elsewhere. For the portfolio view, use Portfolio, capital and the allocation functions of prospicio.risk and prospicio.pricing, as in one_year_view.ipynb.
14. How close were the estimates to the truth?
A generator with known parameters made the data (examples/data/answer_key.json), so we can check the estimates. In the answer key, the count of claims “over T” is for claims on risks insured for more than T, as in the listing. The generator mixes the Poisson count of each year with a gamma of coefficient of variation 0.25. Thus the true dispersion of the yearly count is 1 + lambda * 0.25**2. The layer expected losses are the exact values of the generator under occurrence terms, with no reinstatement or annual limit.
with open(DATA.parent / "answer_key.json") as f: # outside the submission's folder
key = json.load(f)
exposed = sum(w * max(0.0, min(1.0, (hi - T) / (hi - lo)))
for w, lo, hi in zip(key["limit_band_weights"], lower, upper)) # share of claims on risks insured for more than T
true_lambda = key["lambda_reference"] * (T / key["pareto_reference"]) ** (-key["alpha"]) * exposed
true_dispersion = 1 + true_lambda * key["frequency_mixing_cv"] ** 2
true_layers = [key["layer_expected_loss_2026_occurrence"][n] for n in NAMES]
print(f"{'':32s} {'truth':>10s} {'estimate':>10s} {'error':>8s}")
for label, true_value, estimate in [
("Pareto alpha", key["alpha"], ALPHA),
(f"claims a year over {money(T)}", true_lambda, LAMBDA),
("count dispersion (Pearson)", true_dispersion, level_fit.dispersion),
("cost trend", key["severity_trend"], SEVERITY_TREND),
("exposure growth", key["exposure_growth"], exposure_trend.annual_change),
("on-level premium 2025", key["onlevel_premium"]["2025"], onlevel[2025])]:
fmt = (lambda v: f"{v:,.3f}") if true_value < 100 else (lambda v: money(v))
print(f"{label:32s} {fmt(true_value):>10s} {fmt(estimate):>10s} {estimate / true_value - 1:>+8.1%}")
print()
print(f"{'expected loss to the layer':32s} " + " ".join(f"{n:>11s}" for n in NAMES))
for label, values in [("truth (occurrence terms)", true_layers), ("burning cost", burning_cost),
("experience model", experience_loss), ("exposure rating", exposure_loss),
("credibility blend", blended)]:
print(f"{label:32s} " + " ".join(f"{money(v):>11s}" for v in values)
+ ("" if values is true_layers else " error " + ", ".join(f"{v / t - 1:+.0%}" for v, t in zip(values, true_layers)))) truth estimate error
Pareto alpha 1.600 1.720 +7.5%
claims a year over 0.75m 15.569 17.712 +13.8%
count dispersion (Pearson) 1.973 0.804 -59.2%
cost trend 0.045 0.045 +0.1%
exposure growth 0.030 0.030 -0.0%
on-level premium 2025 174.76m 174.77m +0.0%
expected loss to the layer 5m xs 5m 10m xs 10m 20m xs 20m
truth (occurrence terms) 1.37m 0.68m 0.28m
burning cost 1.19m 0.49m 0.00m error -14%, -28%, -100%
experience model 1.09m 0.45m 0.17m error -21%, -33%, -39%
exposure rating 1.45m 0.59m 0.23m error +6%, -13%, -17%
credibility blend 1.39m 0.58m 0.23m error +1%, -14%, -17%
Reading the comparison. The premium, exposure and trend inputs are within 0.1% of the truth. Alpha is 7.5% high, inside one standard error (0.17). The frequency is 14% high, which is also about one standard error. A count of 100 claims has a sampling error near 10%, and near 14% when the true dispersion is 2. The frequency also depends on alpha, which sets how far the count of each year moves to T. The dispersion is the clear miss: ten yearly counts gave 0.80, and the truth is about 2. For this reason, section 12 tests a clustered count.
At the layers, the experience model is low by 21%, 33% and 39%, more for higher layers. A tail fitted a little too light gives this result. The burning cost has no claim in the top layer. Exposure rating at c=3 is near the truth for the working layer and 13% to 17% low above it, and the blend follows it. All of this is one draw of the generator, and another seed gives other errors. Thus a single run shows the size of the error to expect, not whether a method has a bias. To find a bias, run the calculation over many seeds.
The last step is the most important for pricing. It compares the premium from the true layer losses with the premium from the estimates, with the quotes. The difference is the estimation error from the data and the judgements, as premium. The last lines check the draws of section 12. If the draws describe our uncertainty well, the rate on line from the true losses is usually inside their range.
# What the same pipeline gives from the true layer losses : the premium we would
# have found with no estimation error in the layer losses.
true_model = fit_references([(limit, att, el) for (limit, att), el in zip(LAYERS, true_layers)], default_alpha=ALPHA)
true_grid, _ = Grid.rounding(true_model.severity, STEP, int(MAX_LOSS / STEP) + 1)
true_annual = program([1.0] * len(terms)).on_grid(claim_count(true_model.frequency, 1.0), true_grid, POINTS)
true_rows = price_layers(true_annual, list(true_annual.expected_reinstatement_premium))
print(f"{'':11s} {'our technical':>14s} {'from true losses':>17s} {'difference':>11s} {'quoted (total)':>14s}")
for row, tr, t in zip(priced, true_rows, terms):
print(f"{row['name']:>11s} {money(row['technical']):>14s} {money(tr['technical']):>17s} "
f"{row['technical'] / tr['technical'] - 1:>+11.1%} {money(row['quoted_total']):>14s}")
# Did the draws of section 12 cover the rate on line the true layer losses give?
print()
for tr, (low, high) in zip(true_rows, rol_band):
inside = "inside" if low <= tr["rol"] <= high else "outside"
print(f"{tr['name']:>11s}: technical rate on line from the true losses {tr['rol']:.1%}, {inside} the draws' "
f"5% to 95% range of {low:.1%} to {high:.1%}") our technical from true losses difference quoted (total)
5m xs 5m 2.62m 2.60m +0.9% 2.74m
10m xs 10m 1.80m 1.96m -7.9% 1.58m
20m xs 20m 2.19m 2.38m -8.1% 1.21m
5m xs 5m: technical rate on line from the true losses 40.9%, inside the draws' 5% to 95% range of 36.0% to 46.6%
10m xs 10m: technical rate on line from the true losses 18.4%, inside the draws' 5% to 95% range of 15.0% to 19.5%
20m xs 20m: technical rate on line from the true losses 11.8%, inside the draws' 5% to 95% range of 8.1% to 12.0%
With the true layer losses, the same calculation charges 0.9% less for the working layer and about 8% more for each layer above it. In each layer, the broker’s quote is on the same side of both premiums. The quote for the working layer covers both. The quotes for the two layers above are below both. The rates on line from the true losses are inside the 5% to 95% ranges of the draws for all three layers, the top one near the upper end. Thus the draws of section 12 described the uncertainty of this run fairly. Three layers of one run are a weak test of that, for the reason above.
import matplotlib.pyplot as plt
fig, ax = plt.subplots(figsize=(7.5, 3.8))
for (label, values), marker in zip([("burning cost", burning_cost), ("experience model", experience_loss),
("exposure rating", exposure_loss), ("credibility blend", blended)], "osv^"):
ax.plot(range(len(NAMES)), [max(v, 1e-3) / 1e6 for v in values], marker, ms=8, label=label)
ax.plot(range(len(NAMES)), [v / 1e6 for v in true_layers], "kD", ms=10, mfc="none", label="truth (the generator)")
ax.set_xticks(range(len(NAMES)), NAMES)
ax.set_yscale("log")
ax.set_ylim(0.1, 3.0)
ax.set_ylabel("expected annual loss to the layer (millions)")
ax.set_title("Expected loss by layer and method (a burning cost of zero is off the chart)")
ax.legend()
fig.tight_layout()
plt.show()
What to take away
- Check a submission before you model it. The reconciliation is part of the work.
- The large-loss listing needs development, trend and a completeness cut before the fit. The fit must include truncation and censoring: if you ignore them, the tail changes a lot.
- Experience and exposure rating answer the same question from different data. With few claims for the high layers, credibility gives the exposure curve most of the weight. Thus examine the curve and the clustering of claims first. Classical credibility is a conservative weight for a fitted model, so test it.
- A technical premium has a loss, a capital charge, and costs. Compare a broker’s quote with it as rate on line, multiple and return at the quote. Show how much the central answer can change.
- A stand-alone capital standard makes high layers expensive. Compare the quote with one price of risk across the program. This separates a layer that does not give a sufficient stand-alone return from a layer that is underpriced as a risk.
- Against the truth, the premium and trend inputs were almost exact. The tail and the frequency were within about one standard error. The layer losses were within 1% to 17%. The estimate missed the dispersion of the counts. One synthetic run shows the size of the errors, not whether a method has a bias.