π Reinsurance Β· π The Cash-Flow Cube Β· π‘οΈ Ceding Through an Acceptance
Reinsurance transforms cash flows: an excess-of-loss acceptance takes the part of the loss above its attachment point, up to its cover, in exchange for a premium. The acceptance is a node β Property Cat 40 xs 60 β UWY 2023 β of the live-compiled type Acceptance:
public record Acceptance
{
[MeshNode("namespace:Reinsurance scope:descendants nodeType:Reinsurance/LineOfBusiness")] public string LineOfBusiness { get; init; }
[MeshNode("namespace:Reinsurance scope:descendants nodeType:Reinsurance/UnderwritingYear")] public string UnderwritingYear { get; init; }
[MeshNode("namespace:Reinsurance scope:descendants nodeType:Reinsurance/Currency")] public string Currency { get; init; }
public double AttachmentPoint { get; init; } // 60
public double Cover { get; init; } // 40
public double PremiumRate { get; init; } // 25% rate on line
}
The cession rule
One formula does all the work, applied to cumulative losses at each development point:
CededCumulative = min(Cover, max(0, GrossCumulative β AttachmentPoint))
and the ceded cash flow of a period is the difference of consecutive ceded cumulatives. In the business-rules framework (the BusinessRules plugin) this is a scope β evaluated lazily, cached per identity, chaining to other scopes. This exact interface ships compiled live on this mesh in Acceptance/Source/Cession, and the numbers below are pinned by its in-node tests:
public interface CededCashflows : IScope<int, CashflowStorage> // identity: the development year
{
double GrossCumulative =>
GetStorage().GrossPaidByDevYear.Where(kv => kv.Key <= Identity).Sum(kv => kv.Value);
double CededCumulative =>
Math.Min(GetStorage().Acceptance.Cover,
Math.Max(0, GrossCumulative - GetStorage().Acceptance.AttachmentPoint));
double CededFlow =>
CededCumulative
- GetScope<CededCashflows>(Identity - 1).CededCumulative; // scopes chain (first year: 0)
}
The full section-cession engine the Basic Risk Transfer course cites β quota share, per-claim excess of loss, the AAD/AAL aggregate layer and program aggregation with inuring order β ships beside this scope in Acceptance/Source/CededCashflows and Acceptance/Source/CessionOperations, pinned by the same Tests area.
The cells below evaluate the same rule step by step, so the numbers emerge in front of you.
Does the loss reach the acceptance?
Property / US, underwriting year 2023 β a cat year. The cell below reads the acceptance parameters and the paid-loss facts live from their nodes (Mesh.GetQuery) β nothing on this page re-types a number the mesh already holds. Cumulative paid loss climbs through the attachment during 2024 and eats into the cover in 2025:
Subscribers see this result live; below is the same worked example as a static table.
using System.Reactive.Linq;
using System.Text.Json;
using MeshWeaver.Graph;
using MeshWeaver.Layout.Chart;
record Pt(string Series, int Dev, double Value);
// The acceptance node β attachment, cover and rate come from the node, not this page.
var acceptances = (await Mesh
.GetQuery("reinsurance-cession-acceptance", "path:Reinsurance/Acceptance scope:children nodeType:Reinsurance/Acceptance")
.FirstAsync()).ToArray();
var acceptance = acceptances.FirstOrDefault(n => n.Path == "Reinsurance/Acceptance/PropertyCat2023")
?? throw new InvalidOperationException(
$"Reinsurance/Acceptance/PropertyCat2023 not found ({acceptances.Length} acceptance nodes visible).");
// Content may arrive raw (JsonElement) or β if the type ever gets registered on this
// hub β materialized typed; serialize typed back to JSON so the shape read below holds.
var a = acceptance.Content switch
{
JsonElement je => je,
null => throw new InvalidOperationException("PropertyCat2023 carried no readable content."),
var typed => JsonSerializer.SerializeToElement(typed)
};
// Foreign type β read the JSON shape (the kernel has no Acceptance/Cashflow type loaded).
JsonElement Prop(JsonElement e, string name) =>
e.TryGetProperty(name, out var v) ? v
: e.TryGetProperty(char.ToUpperInvariant(name[0]) + name[1..], out var u) ? u
: throw new InvalidOperationException($"Content has no '{name}' property.");
var attachment = Prop(a, "attachmentPoint").GetDouble(); // 60 on the committed node
var cover = Prop(a, "cover").GetDouble(); // 40
var rateOnLine = Prop(a, "premiumRate").GetDouble(); // 0.25
// The Property/US/2023 paid-loss facts β the same nodes the cube page pivots.
var facts = (await Mesh
.GetQuery("reinsurance-cession-facts", "namespace:Reinsurance/Cashflow scope:children nodeType:Reinsurance/Cashflow")
.FirstAsync()).ToArray();
var lossFacts = facts
.Select(n => n.Content)
.Where(x => x is not null)
.Select(x => x is JsonElement je ? je : JsonSerializer.SerializeToElement(x))
.Where(e => Prop(e, "lineOfBusiness").GetString()!.EndsWith("/Property")
&& Prop(e, "country").GetString()!.EndsWith("/US")
&& Prop(e, "underwritingYear").GetString()!.EndsWith("/2023")
&& Prop(e, "cashflowType").GetString()!.EndsWith("/PaidLoss"))
.OrderBy(e => Prop(e, "developmentDate").GetString())
.ToArray();
if (lossFacts.Length == 0)
throw new InvalidOperationException(
$"No Property/US/2023 PaidLoss facts found among {facts.Length} Reinsurance/Cashflow nodes.");
// Fact nodes store outflows NEGATIVE (PaidLoss dev 2024 = β50); the cession walkthrough
// works in positive magnitudes, hence the negation.
var devYears = lossFacts.Select(e => DateOnly.Parse(Prop(e, "developmentDate").GetString()!).Year).ToArray();
var grossPaid = lossFacts.Select(e => -Prop(e, "value").GetDouble()).ToArray();
var grossCum = new double[grossPaid.Length];
var running = 0.0;
for (var i = 0; i < grossPaid.Length; i++) { running += grossPaid[i]; grossCum[i] = running; }
var pts = new List<Pt>();
for (var i = 0; i < devYears.Length; i++)
{
pts.Add(new Pt("Cumulative gross loss", devYears[i], grossCum[i]));
pts.Add(new Pt($"Attachment ({attachment:N0})", devYears[i], attachment));
pts.Add(new Pt($"Exhaustion ({attachment + cover:N0})", devYears[i], attachment + cover));
}
pts
.SliceBy(p => p.Dev)
.SliceBy(p => p.Series)
.ToLineChart(g => g.Sum(p => p.Value))
.WithTitle($"Cumulative gross loss vs the {cover:N0} xs {attachment:N0} acceptance (m)")
| Dev year | Cumulative gross loss | Attachment | Exhaustion |
|---|---|---|---|
| 2023 | 20 | 60 | 100 |
| 2024 | 70 | 60 | 100 |
| 2025 | 90 | 60 | 100 |
Gross β ceded β net
The cession rule turns gross paid losses into ceded recoveries; the net is what the cedent still carries. Note 2025: the recovery fully offsets the gross payment β the acceptance is doing its job:
Subscribers see this result live; below is the same worked example as a static table.
using MeshWeaver.Layout.Chart;
record Bar(string Series, int Dev, double Value);
var bars = new List<Bar>();
var prevCeded = 0.0;
for (var i = 0; i < devYears.Length; i++)
{
// The cession rule, inlined: min(Cover, max(0, GrossCum β Attachment)). A local FUNCTION
// capturing the previous cell's locals is the one chaining construct the kernel trips on
// (the sibling Model page chains only expressions) β inline expressions are safe.
var cededCum = Math.Min(cover, Math.Max(0, grossCum[i] - attachment));
var cededFlow = cededCum - prevCeded;
prevCeded = cededCum;
bars.Add(new Bar("Gross paid loss", devYears[i], -grossPaid[i]));
bars.Add(new Bar("Ceded recovery", devYears[i], cededFlow));
bars.Add(new Bar("Net", devYears[i], -grossPaid[i] + cededFlow));
}
bars
.SliceBy(b => b.Dev)
.SliceBy(b => b.Series)
.ToColumnChart(g => g.Sum(b => b.Value))
.WithTitle("Gross β ceded β net paid-loss cash flows (m)")
| Dev year | Gross paid loss | Ceded recovery | Net |
|---|---|---|---|
| 2023 | β20 | 0 | β20 |
| 2024 | β50 | +10 | β40 |
| 2025 | β20 | +20 | 0 |
The numbers
Subscribers see this result live; below is the same worked example as a static table.
var rows = new List<string>();
var cumRun = 0.0;
var prev = 0.0;
var totalCeded = 0.0;
for (var i = 0; i < devYears.Length; i++)
{
cumRun += grossPaid[i];
var cededCum = Math.Min(cover, Math.Max(0, cumRun - attachment));
var cededFlow = cededCum - prev;
prev = cededCum;
totalCeded += cededFlow;
rows.Add($"| {devYears[i]} | {grossPaid[i]:N0} | {cumRun:N0} | {cededCum:N0} | {cededFlow:N0} | {grossPaid[i] - cededFlow:N0} |");
}
var acceptancePremium = rateOnLine * cover;
Controls.Markdown($"""
| Dev year | Gross paid | Gross cum | Ceded cum | Ceded flow | Net paid |
|---|---:|---:|---:|---:|---:|
{string.Join("\n", rows)}
**Totals** β gross **{cumRun:N0}**, ceded **{totalCeded:N0}**, net **{cumRun - totalCeded:N0}**.
The acceptance collected **{acceptancePremium:N0}** of premium ({rateOnLine:P0} rate on line Γ {cover:N0} of cover) and paid **{totalCeded:N0}** of recoveries β a **{totalCeded / acceptancePremium:P0} loss ratio**. A bad year for the reinsurer; exactly what the cedent bought the cover for.
""")
| Dev year | Gross paid | Gross cum | Ceded cum | Ceded flow | Net paid |
|---|---|---|---|---|---|
| 2023 | 20 | 20 | 0 | 0 | 20 |
| 2024 | 50 | 70 | 10 | 10 | 40 |
| 2025 | 20 | 90 | 30 | 20 | 0 |
Totals: gross 90, ceded 30, net 60. The acceptance collected 10 of premium (25 % rate on line Γ 40 of cover) and paid 30 of recoveries, a 300 % loss ratio.
Every number above came out of the kernel, which took every input from the nodes β no prose total is hand-maintained on this page. And Casualty GB 2023? Its cumulative loss never gets near an attachment point β not every segment cedes.