From e07ad91ab563d3fa91b64fadba3cc4b94f4f9c2f Mon Sep 17 00:00:00 2001
From: priyam0k <87162535+priyam0k@users.noreply.github.com>
Date: Tue, 21 Jul 2026 14:58:32 +0530
Subject: [PATCH 1/6] docs(friedland): recreate Chapter 10 Cape Cod technique
Recreate the full Friedland Chapter 10 (Cape Cod / Stanard-Buhlmann) exhibits using cl.CapeCod, following the Chapter 9 notebook pattern (load_sample -> Development/TailConstant -> estimator -> display tables -> hidden reconciliation asserts):
- Exhibit I (U.S. Industry Auto): Sheets 1-3 - used-up premium, derived expected claim ratio (69.5%), ultimate projection, unpaid estimate.
- Exhibit II (XYZ Insurer Auto BI): Sheets 1-5 - on-level premium, trend and tort-reform adjustments, apriori via CapeCod on an adjusted triangle (70.8%), unpaid estimate, and the cross-method summary of ultimates and IBNR.
- Exhibit III (U.S. PP Auto, 4 scenarios): derived claim ratios (0.700/0.807/0.717/0.831) and IBNR reconciliation.
- Exhibit IV (U.S. Auto product mix, 2 scenarios): steady-state and changing product mix, 75.0% claim ratio.
Reuses the persisted Chapter 7 XYZ development estimators (read_json). Registers the notebook in docs/_toc.yml.
Also fixes a data bug in friedland_us_auto_steady_state.csv: one row was mislabeled accident year 2008 instead of 2007, which dropped AY2007's latest diagonal and duplicated AY2008. Corrected against the text (AY2007 latest 1,852,729; AY2008 latest 1,568,393).
---
.../data/friedland_us_auto_steady_state.csv | 2 +-
docs/_toc.yml | 1 +
docs/friedland/chapter_10.ipynb | 5612 +++++++++++++++++
3 files changed, 5614 insertions(+), 1 deletion(-)
create mode 100644 docs/friedland/chapter_10.ipynb
diff --git a/chainladder/utils/data/friedland_us_auto_steady_state.csv b/chainladder/utils/data/friedland_us_auto_steady_state.csv
index f66c84c1c..b7730076f 100644
--- a/chainladder/utils/data/friedland_us_auto_steady_state.csv
+++ b/chainladder/utils/data/friedland_us_auto_steady_state.csv
@@ -52,5 +52,5 @@ Accident Year,Calendar Year,Paid Claims,Reported Claims
2006,2007,1217142,1764504
2006,2008,1581581,1937577
2007,2007,694404,1493707
-2008,2008,1277999,1852729
+2007,2008,1277999,1852729
2008,2008,729124,1568393
diff --git a/docs/_toc.yml b/docs/_toc.yml
index b7e069eb6..3cf0a5b9a 100644
--- a/docs/_toc.yml
+++ b/docs/_toc.yml
@@ -36,6 +36,7 @@ parts:
- file: friedland/chapter_6.rst
- file: friedland/chapter_7.rst
- file: friedland/chapter_9.ipynb
+ - file: friedland/chapter_10.ipynb
- chapters:
- file: gallery/index.md
- chapters:
diff --git a/docs/friedland/chapter_10.ipynb b/docs/friedland/chapter_10.ipynb
new file mode 100644
index 000000000..0d6892e27
--- /dev/null
+++ b/docs/friedland/chapter_10.ipynb
@@ -0,0 +1,5612 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "id": "d54320ed",
+ "metadata": {},
+ "source": [
+ "# Chapter 10 - Cape Cod Technique\n",
+ "\n",
+ "> The key innovation of the Stanard-Buhlmann (Cape Cod) method is that the\n",
+ "> ultimate expected loss ratio for all years combined is estimated from the\n",
+ "> overall reported claims experience, instead of being selected judgmentally, as\n",
+ "> in the Bornhuetter-Ferguson method.\n",
+ ">\n",
+ "> -- Friedland, Chapter 10\n",
+ "\n",
+ "The Cape Cod (Stanard-Buhlmann) method is a close cousin of the\n",
+ "Bornhuetter-Ferguson technique. It splits ultimate claims into the claims already\n",
+ "reported (or paid) plus the *expected* unreported (or unpaid) claims:\n",
+ "\n",
+ "$$\\text{Ultimate} = \\text{Actual} + \\text{Expected Claims} \\times \\left(1 - \\frac{1}{\\text{CDF}}\\right)$$\n",
+ "\n",
+ "The only difference from Bornhuetter-Ferguson is the source of the expected\n",
+ "claims. Rather than selecting an a priori claim ratio judgmentally, Cape Cod\n",
+ "*derives* it from the reported experience. The all-years-combined expected claim\n",
+ "ratio is the reported claims divided by the **used-up premium** - the earned\n",
+ "premium scaled by the percentage of claims expected to be reported to date:\n",
+ "\n",
+ "$$\\text{Expected Claim Ratio} = \\frac{\\sum \\text{Reported Claims}}{\\sum \\text{Earned Premium} \\times \\left(\\tfrac{1}{\\text{CDF}}\\right)}$$\n",
+ "\n",
+ "In the chainladder package the method is implemented by `CapeCod`, which takes\n",
+ "the exposure (earned premium) through `sample_weight` and returns the derived\n",
+ "claim ratio in `apriori_`. This chapter recreates the Friedland Chapter 10\n",
+ "exhibits, reusing the development patterns selected in Chapter 7:\n",
+ "\n",
+ "- **Exhibit I** - U.S. Industry Auto\n",
+ "- **Exhibit II** - XYZ Insurer (Auto BI), with on-level premium and adjusted claims\n",
+ "- **Exhibit III** - U.S. PP Auto (impact of changing conditions)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "id": "00f94f0d",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import numpy as np\n",
+ "import pandas as pd\n",
+ "import chainladder as cl\n",
+ "import os\n",
+ "from IPython.display import display\n",
+ "\n",
+ "pd.set_option(\"display.max_columns\", None)\n",
+ "pd.set_option(\"display.width\", 1000)\n",
+ "\n",
+ "# Pull the single-column latest diagonal (or any 1x1xNx1 triangle) as a vector.\n",
+ "col = lambda t: t.to_frame(origin_as_datetime=False).iloc[:, 0].values"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "35687145",
+ "metadata": {},
+ "source": [
+ "## Exhibit I - U.S. Industry Auto\n",
+ "\n",
+ "The text works the Cape Cod method first for **U.S. Industry Auto** (Exhibit I),\n",
+ "valued at 12/31/2007 over accident years 1998-2007. The reporting pattern is the\n",
+ "Chapter 7 selection (three-year simple average with a 1.000 reported tail)."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "6602d8d3",
+ "metadata": {},
+ "source": [
+ "### Development of expected claim ratio\n",
+ "\n",
+ "This recreates *Exhibit I, Sheet 1*. The **used-up premium** is the earned\n",
+ "premium multiplied by the percentage reported (the inverse of the cumulative\n",
+ "development factor). Dividing reported claims by used-up premium gives each\n",
+ "year's estimated claim ratio; the all-years-combined ratio is the `CapeCod`\n",
+ "apriori that drives the projection."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "id": "b4e993a5",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.microsoft.datawrangler.viewer.v0+json": {
+ "columns": [
+ {
+ "name": "index",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Earned Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Age",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Reported Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "CDF to Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "% Reported",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Used-Up Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Estimated Claim Ratio",
+ "rawType": "float64",
+ "type": "float"
+ }
+ ],
+ "ref": "31ec5da6-208f-452e-9292-68ddec23feca",
+ "rows": [
+ [
+ "1998",
+ "68574209.0",
+ "120",
+ "47742304.0",
+ "1.0",
+ "1.0",
+ "68574209.0",
+ "0.696"
+ ],
+ [
+ "1999",
+ "68544981.0",
+ "108",
+ "51185767.0",
+ "1.0",
+ "1.0",
+ "68544981.0",
+ "0.747"
+ ],
+ [
+ "2000",
+ "68907977.0",
+ "96",
+ "54837929.0",
+ "1.001",
+ "0.999",
+ "68839138.0",
+ "0.797"
+ ],
+ [
+ "2001",
+ "72544955.0",
+ "84",
+ "56299562.0",
+ "1.003",
+ "0.997",
+ "72327827.0",
+ "0.778"
+ ],
+ [
+ "2002",
+ "79228887.0",
+ "72",
+ "58592712.0",
+ "1.006",
+ "0.994",
+ "78755487.0",
+ "0.744"
+ ],
+ [
+ "2003",
+ "86643542.0",
+ "60",
+ "57565344.0",
+ "1.011",
+ "0.989",
+ "85697352.0",
+ "0.672"
+ ],
+ [
+ "2004",
+ "91763523.0",
+ "48",
+ "56976657.0",
+ "1.023",
+ "0.977",
+ "89685198.0",
+ "0.635"
+ ],
+ [
+ "2005",
+ "94115312.0",
+ "36",
+ "56786410.0",
+ "1.051",
+ "0.952",
+ "89565455.0",
+ "0.634"
+ ],
+ [
+ "2006",
+ "95272279.0",
+ "24",
+ "54641339.0",
+ "1.11",
+ "0.901",
+ "85858419.0",
+ "0.636"
+ ],
+ [
+ "2007",
+ "95176240.0",
+ "12",
+ "48853563.0",
+ "1.292",
+ "0.774",
+ "73687173.0",
+ "0.663"
+ ]
+ ],
+ "shape": {
+ "columns": 7,
+ "rows": 10
+ }
+ },
+ "text/html": [
+ "
\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Earned Premium | \n",
+ " Age | \n",
+ " Reported Claims | \n",
+ " CDF to Ultimate | \n",
+ " % Reported | \n",
+ " Used-Up Premium | \n",
+ " Estimated Claim Ratio | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 1998 | \n",
+ " 68574209.0 | \n",
+ " 120 | \n",
+ " 47742304.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 68574209.0 | \n",
+ " 0.696 | \n",
+ "
\n",
+ " \n",
+ " | 1999 | \n",
+ " 68544981.0 | \n",
+ " 108 | \n",
+ " 51185767.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 68544981.0 | \n",
+ " 0.747 | \n",
+ "
\n",
+ " \n",
+ " | 2000 | \n",
+ " 68907977.0 | \n",
+ " 96 | \n",
+ " 54837929.0 | \n",
+ " 1.001 | \n",
+ " 0.999 | \n",
+ " 68839138.0 | \n",
+ " 0.797 | \n",
+ "
\n",
+ " \n",
+ " | 2001 | \n",
+ " 72544955.0 | \n",
+ " 84 | \n",
+ " 56299562.0 | \n",
+ " 1.003 | \n",
+ " 0.997 | \n",
+ " 72327827.0 | \n",
+ " 0.778 | \n",
+ "
\n",
+ " \n",
+ " | 2002 | \n",
+ " 79228887.0 | \n",
+ " 72 | \n",
+ " 58592712.0 | \n",
+ " 1.006 | \n",
+ " 0.994 | \n",
+ " 78755487.0 | \n",
+ " 0.744 | \n",
+ "
\n",
+ " \n",
+ " | 2003 | \n",
+ " 86643542.0 | \n",
+ " 60 | \n",
+ " 57565344.0 | \n",
+ " 1.011 | \n",
+ " 0.989 | \n",
+ " 85697352.0 | \n",
+ " 0.672 | \n",
+ "
\n",
+ " \n",
+ " | 2004 | \n",
+ " 91763523.0 | \n",
+ " 48 | \n",
+ " 56976657.0 | \n",
+ " 1.023 | \n",
+ " 0.977 | \n",
+ " 89685198.0 | \n",
+ " 0.635 | \n",
+ "
\n",
+ " \n",
+ " | 2005 | \n",
+ " 94115312.0 | \n",
+ " 36 | \n",
+ " 56786410.0 | \n",
+ " 1.051 | \n",
+ " 0.952 | \n",
+ " 89565455.0 | \n",
+ " 0.634 | \n",
+ "
\n",
+ " \n",
+ " | 2006 | \n",
+ " 95272279.0 | \n",
+ " 24 | \n",
+ " 54641339.0 | \n",
+ " 1.110 | \n",
+ " 0.901 | \n",
+ " 85858419.0 | \n",
+ " 0.636 | \n",
+ "
\n",
+ " \n",
+ " | 2007 | \n",
+ " 95176240.0 | \n",
+ " 12 | \n",
+ " 48853563.0 | \n",
+ " 1.292 | \n",
+ " 0.774 | \n",
+ " 73687173.0 | \n",
+ " 0.663 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Earned Premium Age Reported Claims CDF to Ultimate % Reported Used-Up Premium Estimated Claim Ratio\n",
+ "1998 68574209.0 120 47742304.0 1.000 1.000 68574209.0 0.696\n",
+ "1999 68544981.0 108 51185767.0 1.000 1.000 68544981.0 0.747\n",
+ "2000 68907977.0 96 54837929.0 1.001 0.999 68839138.0 0.797\n",
+ "2001 72544955.0 84 56299562.0 1.003 0.997 72327827.0 0.778\n",
+ "2002 79228887.0 72 58592712.0 1.006 0.994 78755487.0 0.744\n",
+ "2003 86643542.0 60 57565344.0 1.011 0.989 85697352.0 0.672\n",
+ "2004 91763523.0 48 56976657.0 1.023 0.977 89685198.0 0.635\n",
+ "2005 94115312.0 36 56786410.0 1.051 0.952 89565455.0 0.634\n",
+ "2006 95272279.0 24 54641339.0 1.110 0.901 85858419.0 0.636\n",
+ "2007 95176240.0 12 48853563.0 1.292 0.774 73687173.0 0.663"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "All-years estimated claim ratio (apriori): 0.695\n"
+ ]
+ }
+ ],
+ "source": [
+ "ia = cl.load_sample(\"friedland_us_industry_auto\")\n",
+ "ia_reported = ia[\"Reported Claims\"]\n",
+ "ia_paid = ia[\"Paid Claims\"]\n",
+ "ia_premium = ia[\"Earned Premium\"].latest_diagonal\n",
+ "ia_years = list(ia_reported.origin.year)\n",
+ "\n",
+ "# Chapter 7 selection: three-year simple average reported development, 1.000 tail.\n",
+ "# Friedland cumulates the age-to-age factors rounded to three decimals.\n",
+ "ia_reported_dev = cl.TailConstant(tail=1.000, projection_period=0).fit_transform(\n",
+ " cl.Development(n_periods=3, average=\"simple\").fit_transform(ia_reported))\n",
+ "ia_reported_dev.ldf_ = ia_reported_dev.ldf_.round(3)\n",
+ "\n",
+ "# CapeCod derives the expected claim ratio (apriori) from the reported claims and\n",
+ "# the earned-premium exposure. With the default decay=1 and trend=0, every origin\n",
+ "# receives the same used-up-premium-weighted claim ratio.\n",
+ "ia_cc = cl.CapeCod().fit(ia_reported_dev, sample_weight=ia_premium)\n",
+ "ia_apriori = float(ia_cc.apriori_.to_frame().iloc[0, 0])\n",
+ "\n",
+ "ia_cdf = ia_reported_dev.cdf_.to_frame(origin_as_datetime=False).values.flatten()[::-1]\n",
+ "ia_pct_reported = 1 / ia_cdf\n",
+ "ia_reported_latest = col(ia_reported.latest_diagonal)\n",
+ "ia_used_up = col(ia_premium) * ia_pct_reported\n",
+ "\n",
+ "sheet1 = pd.DataFrame(index=ia_years)\n",
+ "sheet1[\"Earned Premium\"] = col(ia_premium)\n",
+ "sheet1[\"Age\"] = [(2007 - y) * 12 + 12 for y in ia_years]\n",
+ "sheet1[\"Reported Claims\"] = ia_reported_latest\n",
+ "sheet1[\"CDF to Ultimate\"] = ia_cdf.round(3)\n",
+ "sheet1[\"% Reported\"] = ia_pct_reported.round(3)\n",
+ "sheet1[\"Used-Up Premium\"] = ia_used_up.round(0)\n",
+ "sheet1[\"Estimated Claim Ratio\"] = (ia_reported_latest / ia_used_up).round(3)\n",
+ "display(sheet1)\n",
+ "print(f\"All-years estimated claim ratio (apriori): {ia_apriori:.3f}\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "7d58d37c",
+ "metadata": {},
+ "source": [
+ "### Projection of ultimate claims\n",
+ "\n",
+ "This recreates *Exhibit I, Sheet 2*. Expected claims are the earned premium times\n",
+ "the derived claim ratio. The expected unreported claims (`CapeCod.ibnr_`) are the\n",
+ "expected claims scaled by the percentage still to emerge, and the projected\n",
+ "ultimate is reported claims plus expected unreported."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "id": "f8e7b835",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.microsoft.datawrangler.viewer.v0+json": {
+ "columns": [
+ {
+ "name": "index",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Earned Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Expected Claim Ratio",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Expected Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "CDF to Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "% Unreported",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Expected Unreported",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Reported Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Projected Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ }
+ ],
+ "ref": "84758c07-b7d9-43fd-a1c9-8f6cf348970c",
+ "rows": [
+ [
+ "1998",
+ "68574209.0",
+ "0.695",
+ "47686679.0",
+ "1.0",
+ "0.0",
+ "0.0",
+ "47742304.0",
+ "47742304.0"
+ ],
+ [
+ "1999",
+ "68544981.0",
+ "0.695",
+ "47666354.0",
+ "1.0",
+ "0.0",
+ "0.0",
+ "51185767.0",
+ "51185767.0"
+ ],
+ [
+ "2000",
+ "68907977.0",
+ "0.695",
+ "47918782.0",
+ "1.001",
+ "0.001",
+ "47871.0",
+ "54837929.0",
+ "54885800.0"
+ ],
+ [
+ "2001",
+ "72544955.0",
+ "0.695",
+ "50447946.0",
+ "1.003",
+ "0.003",
+ "150991.0",
+ "56299562.0",
+ "56450553.0"
+ ],
+ [
+ "2002",
+ "79228887.0",
+ "0.695",
+ "55095969.0",
+ "1.006",
+ "0.006",
+ "329203.0",
+ "58592712.0",
+ "58921915.0"
+ ],
+ [
+ "2003",
+ "86643542.0",
+ "0.695",
+ "60252139.0",
+ "1.011",
+ "0.011",
+ "657983.0",
+ "57565344.0",
+ "58223327.0"
+ ],
+ [
+ "2004",
+ "91763523.0",
+ "0.695",
+ "63812587.0",
+ "1.023",
+ "0.023",
+ "1445272.0",
+ "56976657.0",
+ "58421929.0"
+ ],
+ [
+ "2005",
+ "94115312.0",
+ "0.695",
+ "65448027.0",
+ "1.051",
+ "0.048",
+ "3163982.0",
+ "56786410.0",
+ "59950392.0"
+ ],
+ [
+ "2006",
+ "95272279.0",
+ "0.695",
+ "66252584.0",
+ "1.11",
+ "0.099",
+ "6546422.0",
+ "54641339.0",
+ "61187761.0"
+ ],
+ [
+ "2007",
+ "95176240.0",
+ "0.695",
+ "66185799.0",
+ "1.292",
+ "0.226",
+ "14943552.0",
+ "48853563.0",
+ "63797115.0"
+ ]
+ ],
+ "shape": {
+ "columns": 8,
+ "rows": 10
+ }
+ },
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Earned Premium | \n",
+ " Expected Claim Ratio | \n",
+ " Expected Claims | \n",
+ " CDF to Ultimate | \n",
+ " % Unreported | \n",
+ " Expected Unreported | \n",
+ " Reported Claims | \n",
+ " Projected Ultimate | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 1998 | \n",
+ " 68574209.0 | \n",
+ " 0.695 | \n",
+ " 47686679.0 | \n",
+ " 1.000 | \n",
+ " 0.000 | \n",
+ " 0.0 | \n",
+ " 47742304.0 | \n",
+ " 47742304.0 | \n",
+ "
\n",
+ " \n",
+ " | 1999 | \n",
+ " 68544981.0 | \n",
+ " 0.695 | \n",
+ " 47666354.0 | \n",
+ " 1.000 | \n",
+ " 0.000 | \n",
+ " 0.0 | \n",
+ " 51185767.0 | \n",
+ " 51185767.0 | \n",
+ "
\n",
+ " \n",
+ " | 2000 | \n",
+ " 68907977.0 | \n",
+ " 0.695 | \n",
+ " 47918782.0 | \n",
+ " 1.001 | \n",
+ " 0.001 | \n",
+ " 47871.0 | \n",
+ " 54837929.0 | \n",
+ " 54885800.0 | \n",
+ "
\n",
+ " \n",
+ " | 2001 | \n",
+ " 72544955.0 | \n",
+ " 0.695 | \n",
+ " 50447946.0 | \n",
+ " 1.003 | \n",
+ " 0.003 | \n",
+ " 150991.0 | \n",
+ " 56299562.0 | \n",
+ " 56450553.0 | \n",
+ "
\n",
+ " \n",
+ " | 2002 | \n",
+ " 79228887.0 | \n",
+ " 0.695 | \n",
+ " 55095969.0 | \n",
+ " 1.006 | \n",
+ " 0.006 | \n",
+ " 329203.0 | \n",
+ " 58592712.0 | \n",
+ " 58921915.0 | \n",
+ "
\n",
+ " \n",
+ " | 2003 | \n",
+ " 86643542.0 | \n",
+ " 0.695 | \n",
+ " 60252139.0 | \n",
+ " 1.011 | \n",
+ " 0.011 | \n",
+ " 657983.0 | \n",
+ " 57565344.0 | \n",
+ " 58223327.0 | \n",
+ "
\n",
+ " \n",
+ " | 2004 | \n",
+ " 91763523.0 | \n",
+ " 0.695 | \n",
+ " 63812587.0 | \n",
+ " 1.023 | \n",
+ " 0.023 | \n",
+ " 1445272.0 | \n",
+ " 56976657.0 | \n",
+ " 58421929.0 | \n",
+ "
\n",
+ " \n",
+ " | 2005 | \n",
+ " 94115312.0 | \n",
+ " 0.695 | \n",
+ " 65448027.0 | \n",
+ " 1.051 | \n",
+ " 0.048 | \n",
+ " 3163982.0 | \n",
+ " 56786410.0 | \n",
+ " 59950392.0 | \n",
+ "
\n",
+ " \n",
+ " | 2006 | \n",
+ " 95272279.0 | \n",
+ " 0.695 | \n",
+ " 66252584.0 | \n",
+ " 1.110 | \n",
+ " 0.099 | \n",
+ " 6546422.0 | \n",
+ " 54641339.0 | \n",
+ " 61187761.0 | \n",
+ "
\n",
+ " \n",
+ " | 2007 | \n",
+ " 95176240.0 | \n",
+ " 0.695 | \n",
+ " 66185799.0 | \n",
+ " 1.292 | \n",
+ " 0.226 | \n",
+ " 14943552.0 | \n",
+ " 48853563.0 | \n",
+ " 63797115.0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Earned Premium Expected Claim Ratio Expected Claims CDF to Ultimate % Unreported Expected Unreported Reported Claims Projected Ultimate\n",
+ "1998 68574209.0 0.695 47686679.0 1.000 0.000 0.0 47742304.0 47742304.0\n",
+ "1999 68544981.0 0.695 47666354.0 1.000 0.000 0.0 51185767.0 51185767.0\n",
+ "2000 68907977.0 0.695 47918782.0 1.001 0.001 47871.0 54837929.0 54885800.0\n",
+ "2001 72544955.0 0.695 50447946.0 1.003 0.003 150991.0 56299562.0 56450553.0\n",
+ "2002 79228887.0 0.695 55095969.0 1.006 0.006 329203.0 58592712.0 58921915.0\n",
+ "2003 86643542.0 0.695 60252139.0 1.011 0.011 657983.0 57565344.0 58223327.0\n",
+ "2004 91763523.0 0.695 63812587.0 1.023 0.023 1445272.0 56976657.0 58421929.0\n",
+ "2005 94115312.0 0.695 65448027.0 1.051 0.048 3163982.0 56786410.0 59950392.0\n",
+ "2006 95272279.0 0.695 66252584.0 1.110 0.099 6546422.0 54641339.0 61187761.0\n",
+ "2007 95176240.0 0.695 66185799.0 1.292 0.226 14943552.0 48853563.0 63797115.0"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "ia_expected_claims = col(ia_premium) * ia_apriori\n",
+ "ia_pct_unreported = 1 - ia_pct_reported\n",
+ "# CapeCod returns NaN IBNR for fully developed years (CDF = 1.000); the text\n",
+ "# shows these as zero, so coerce NaN to 0.\n",
+ "ia_ibnr = np.nan_to_num(col(ia_cc.ibnr_))\n",
+ "ia_expected_unreported = ia_ibnr\n",
+ "ia_ult = col(ia_cc.ultimate_)\n",
+ "\n",
+ "sheet2 = pd.DataFrame(index=ia_years)\n",
+ "sheet2[\"Earned Premium\"] = col(ia_premium)\n",
+ "sheet2[\"Expected Claim Ratio\"] = round(ia_apriori, 3)\n",
+ "sheet2[\"Expected Claims\"] = ia_expected_claims.round(0)\n",
+ "sheet2[\"CDF to Ultimate\"] = ia_cdf.round(3)\n",
+ "sheet2[\"% Unreported\"] = ia_pct_unreported.round(3)\n",
+ "sheet2[\"Expected Unreported\"] = ia_expected_unreported.round(0)\n",
+ "sheet2[\"Reported Claims\"] = ia_reported_latest\n",
+ "sheet2[\"Projected Ultimate\"] = ia_ult.round(0)\n",
+ "display(sheet2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "b04d1b03",
+ "metadata": {},
+ "source": [
+ "### Development of unpaid claim estimate\n",
+ "\n",
+ "This recreates *Exhibit I, Sheet 3*. Case outstanding is reported minus paid,\n",
+ "estimated IBNR is ultimate minus reported, and the total unpaid estimate is\n",
+ "ultimate minus paid."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "id": "9225675c",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.microsoft.datawrangler.viewer.v0+json": {
+ "columns": [
+ {
+ "name": "index",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Reported Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Paid Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Projected Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Case Outstanding",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "IBNR",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Total Unpaid",
+ "rawType": "float64",
+ "type": "float"
+ }
+ ],
+ "ref": "8ed2506b-e250-4402-ba44-f2d9c0913772",
+ "rows": [
+ [
+ "1998",
+ "47742304.0",
+ "47644187.0",
+ "47742304.0",
+ "98117.0",
+ "0.0",
+ "98117.0"
+ ],
+ [
+ "1999",
+ "51185767.0",
+ "51000534.0",
+ "51185767.0",
+ "185233.0",
+ "0.0",
+ "185233.0"
+ ],
+ [
+ "2000",
+ "54837929.0",
+ "54533225.0",
+ "54885800.0",
+ "304704.0",
+ "47871.0",
+ "352575.0"
+ ],
+ [
+ "2001",
+ "56299562.0",
+ "55878421.0",
+ "56450553.0",
+ "421141.0",
+ "150991.0",
+ "572132.0"
+ ],
+ [
+ "2002",
+ "58592712.0",
+ "57807215.0",
+ "58921915.0",
+ "785497.0",
+ "329203.0",
+ "1114700.0"
+ ],
+ [
+ "2003",
+ "57565344.0",
+ "55930654.0",
+ "58223327.0",
+ "1634690.0",
+ "657983.0",
+ "2292673.0"
+ ],
+ [
+ "2004",
+ "56976657.0",
+ "53774672.0",
+ "58421929.0",
+ "3201985.0",
+ "1445272.0",
+ "4647257.0"
+ ],
+ [
+ "2005",
+ "56786410.0",
+ "50644994.0",
+ "59950392.0",
+ "6141416.0",
+ "3163982.0",
+ "9305398.0"
+ ],
+ [
+ "2006",
+ "54641339.0",
+ "43606497.0",
+ "61187761.0",
+ "11034842.0",
+ "6546422.0",
+ "17581264.0"
+ ],
+ [
+ "2007",
+ "48853563.0",
+ "27229969.0",
+ "63797115.0",
+ "21623594.0",
+ "14943552.0",
+ "36567146.0"
+ ]
+ ],
+ "shape": {
+ "columns": 6,
+ "rows": 10
+ }
+ },
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Reported Claims | \n",
+ " Paid Claims | \n",
+ " Projected Ultimate | \n",
+ " Case Outstanding | \n",
+ " IBNR | \n",
+ " Total Unpaid | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 1998 | \n",
+ " 47742304.0 | \n",
+ " 47644187.0 | \n",
+ " 47742304.0 | \n",
+ " 98117.0 | \n",
+ " 0.0 | \n",
+ " 98117.0 | \n",
+ "
\n",
+ " \n",
+ " | 1999 | \n",
+ " 51185767.0 | \n",
+ " 51000534.0 | \n",
+ " 51185767.0 | \n",
+ " 185233.0 | \n",
+ " 0.0 | \n",
+ " 185233.0 | \n",
+ "
\n",
+ " \n",
+ " | 2000 | \n",
+ " 54837929.0 | \n",
+ " 54533225.0 | \n",
+ " 54885800.0 | \n",
+ " 304704.0 | \n",
+ " 47871.0 | \n",
+ " 352575.0 | \n",
+ "
\n",
+ " \n",
+ " | 2001 | \n",
+ " 56299562.0 | \n",
+ " 55878421.0 | \n",
+ " 56450553.0 | \n",
+ " 421141.0 | \n",
+ " 150991.0 | \n",
+ " 572132.0 | \n",
+ "
\n",
+ " \n",
+ " | 2002 | \n",
+ " 58592712.0 | \n",
+ " 57807215.0 | \n",
+ " 58921915.0 | \n",
+ " 785497.0 | \n",
+ " 329203.0 | \n",
+ " 1114700.0 | \n",
+ "
\n",
+ " \n",
+ " | 2003 | \n",
+ " 57565344.0 | \n",
+ " 55930654.0 | \n",
+ " 58223327.0 | \n",
+ " 1634690.0 | \n",
+ " 657983.0 | \n",
+ " 2292673.0 | \n",
+ "
\n",
+ " \n",
+ " | 2004 | \n",
+ " 56976657.0 | \n",
+ " 53774672.0 | \n",
+ " 58421929.0 | \n",
+ " 3201985.0 | \n",
+ " 1445272.0 | \n",
+ " 4647257.0 | \n",
+ "
\n",
+ " \n",
+ " | 2005 | \n",
+ " 56786410.0 | \n",
+ " 50644994.0 | \n",
+ " 59950392.0 | \n",
+ " 6141416.0 | \n",
+ " 3163982.0 | \n",
+ " 9305398.0 | \n",
+ "
\n",
+ " \n",
+ " | 2006 | \n",
+ " 54641339.0 | \n",
+ " 43606497.0 | \n",
+ " 61187761.0 | \n",
+ " 11034842.0 | \n",
+ " 6546422.0 | \n",
+ " 17581264.0 | \n",
+ "
\n",
+ " \n",
+ " | 2007 | \n",
+ " 48853563.0 | \n",
+ " 27229969.0 | \n",
+ " 63797115.0 | \n",
+ " 21623594.0 | \n",
+ " 14943552.0 | \n",
+ " 36567146.0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Reported Claims Paid Claims Projected Ultimate Case Outstanding IBNR Total Unpaid\n",
+ "1998 47742304.0 47644187.0 47742304.0 98117.0 0.0 98117.0\n",
+ "1999 51185767.0 51000534.0 51185767.0 185233.0 0.0 185233.0\n",
+ "2000 54837929.0 54533225.0 54885800.0 304704.0 47871.0 352575.0\n",
+ "2001 56299562.0 55878421.0 56450553.0 421141.0 150991.0 572132.0\n",
+ "2002 58592712.0 57807215.0 58921915.0 785497.0 329203.0 1114700.0\n",
+ "2003 57565344.0 55930654.0 58223327.0 1634690.0 657983.0 2292673.0\n",
+ "2004 56976657.0 53774672.0 58421929.0 3201985.0 1445272.0 4647257.0\n",
+ "2005 56786410.0 50644994.0 59950392.0 6141416.0 3163982.0 9305398.0\n",
+ "2006 54641339.0 43606497.0 61187761.0 11034842.0 6546422.0 17581264.0\n",
+ "2007 48853563.0 27229969.0 63797115.0 21623594.0 14943552.0 36567146.0"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "ia_paid_latest = col(ia_paid.latest_diagonal)\n",
+ "sheet3 = pd.DataFrame(index=ia_years)\n",
+ "sheet3[\"Reported Claims\"] = ia_reported_latest\n",
+ "sheet3[\"Paid Claims\"] = ia_paid_latest\n",
+ "sheet3[\"Projected Ultimate\"] = ia_ult.round(0)\n",
+ "sheet3[\"Case Outstanding\"] = (ia_reported_latest - ia_paid_latest).round(0)\n",
+ "sheet3[\"IBNR\"] = ia_ibnr.round(0)\n",
+ "sheet3[\"Total Unpaid\"] = (ia_ult - ia_paid_latest).round(0)\n",
+ "display(sheet3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "4a5f9dac",
+ "metadata": {},
+ "source": [
+ "### Reconciliation to Friedland\n",
+ "\n",
+ "The derived claim ratio, the projected ultimate claims, and the estimated IBNR\n",
+ "are reconciled to the printed Exhibit I below. Because the text derives used-up\n",
+ "premium from CDFs rounded to three decimals, the totals reconcile within a small\n",
+ "relative tolerance."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "id": "c535ea88",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# Exhibit I, Sheet 1 - all-years estimated claim ratio\n",
+ "assert np.isclose(ia_apriori, 0.695, atol=1e-3)\n",
+ "# Exhibit I, Sheet 1 - selected CDFs to ultimate\n",
+ "assert np.allclose(ia_cdf.round(3),\n",
+ " [1.000, 1.000, 1.001, 1.003, 1.006, 1.011, 1.023, 1.051, 1.110, 1.292], atol=1e-3)\n",
+ "# Exhibit I, Sheet 2 - projected ultimate claims\n",
+ "assert np.isclose(ia_ult.sum(), 570800677, rtol=5e-3)\n",
+ "# Exhibit I, Sheet 3 - estimated IBNR\n",
+ "assert np.isclose(ia_ibnr.sum(), 27319090, rtol=5e-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "8c992d89",
+ "metadata": {},
+ "source": [
+ "## Exhibit II - XYZ Insurer (Auto BI)\n",
+ "\n",
+ "Exhibit II applies the Cape Cod method to the **XYZ Insurer - Auto BI** data,\n",
+ "valued at 12/31/2008 over accident years 1998-2008. Unlike U.S. Industry Auto,\n",
+ "the text has detailed rate-change and legal-reform information, so it adjusts\n",
+ "both premium and claims before deriving the claim ratio:\n",
+ "\n",
+ "- **On-level premium**: earned premium restated to the 2008 rate level.\n",
+ "- **Adjusted claims**: reported claims trended for pure-premium inflation and\n",
+ " adjusted for tort reform.\n",
+ "\n",
+ "The all-years adjusted claim ratio is then *detrended* back to each accident\n",
+ "year's rate, inflation, and tort environment to give the expected claim ratios\n",
+ "used in the projection."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "01304b5d",
+ "metadata": {},
+ "source": [
+ "### Development of expected claim ratio\n",
+ "\n",
+ "This recreates *Exhibit II, Sheet 1*. The all-years apriori is derived through the\n",
+ "`CapeCod` estimator, fit on an adjusted reported triangle (each origin scaled by\n",
+ "its trend and tort-reform factors, which leaves the age-to-age factors and hence\n",
+ "the development pattern unchanged) with on-level premium as the exposure. The\n",
+ "resulting 70.8% adjusted claim ratio is detrended back per year in Column (15)."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "id": "fb858604",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.microsoft.datawrangler.viewer.v0+json": {
+ "columns": [
+ {
+ "name": "index",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Earned Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "On-Level Factor",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "On-Level Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Reported Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Trend",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Tort Reform",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Adjusted Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "CDF to Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "% Reported",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Used-Up On-Level Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Estimated Adjusted Claim Ratio",
+ "rawType": "float64",
+ "type": "float"
+ }
+ ],
+ "ref": "ea921f1f-836d-4f05-a6d9-a49a74e1aeec",
+ "rows": [
+ [
+ "1998",
+ "20000.0",
+ "0.989",
+ "19780.0",
+ "15822.0",
+ "1.4",
+ "0.67",
+ "14841.0",
+ "1.0",
+ "1.0",
+ "19780.0",
+ "0.75"
+ ],
+ [
+ "1999",
+ "31500.0",
+ "0.97",
+ "30555.0",
+ "25107.0",
+ "1.354",
+ "0.67",
+ "22777.0",
+ "1.0",
+ "1.0",
+ "30555.0",
+ "0.745"
+ ],
+ [
+ "2000",
+ "45000.0",
+ "0.951",
+ "42795.0",
+ "37246.0",
+ "1.309",
+ "0.67",
+ "32666.0",
+ "1.0",
+ "1.0",
+ "42795.0",
+ "0.763"
+ ],
+ [
+ "2001",
+ "50000.0",
+ "0.932",
+ "46600.0",
+ "38798.0",
+ "1.266",
+ "0.67",
+ "32909.0",
+ "1.0",
+ "1.0",
+ "46600.0",
+ "0.706"
+ ],
+ [
+ "2002",
+ "61183.0",
+ "0.914",
+ "55921.0",
+ "48169.0",
+ "1.224",
+ "0.67",
+ "39502.0",
+ "1.003",
+ "0.997",
+ "55754.0",
+ "0.709"
+ ],
+ [
+ "2003",
+ "69175.0",
+ "0.87",
+ "60182.0",
+ "44373.0",
+ "1.183",
+ "0.67",
+ "35170.0",
+ "1.013",
+ "0.987",
+ "59410.0",
+ "0.592"
+ ],
+ [
+ "2004",
+ "99322.0",
+ "0.81",
+ "80451.0",
+ "70288.0",
+ "1.144",
+ "0.67",
+ "53874.0",
+ "1.064",
+ "0.94",
+ "75612.0",
+ "0.713"
+ ],
+ [
+ "2005",
+ "138151.0",
+ "0.704",
+ "97258.0",
+ "70655.0",
+ "1.106",
+ "0.67",
+ "52357.0",
+ "1.085",
+ "0.922",
+ "89639.0",
+ "0.584"
+ ],
+ [
+ "2006",
+ "107578.0",
+ "0.64",
+ "68850.0",
+ "48804.0",
+ "1.07",
+ "0.75",
+ "39165.0",
+ "1.196",
+ "0.836",
+ "57567.0",
+ "0.68"
+ ],
+ [
+ "2007",
+ "62438.0",
+ "0.8",
+ "49950.0",
+ "31732.0",
+ "1.034",
+ "1.0",
+ "32811.0",
+ "1.512",
+ "0.661",
+ "33036.0",
+ "0.993"
+ ],
+ [
+ "2008",
+ "47797.0",
+ "1.0",
+ "47797.0",
+ "18632.0",
+ "1.0",
+ "1.0",
+ "18632.0",
+ "2.551",
+ "0.392",
+ "18737.0",
+ "0.994"
+ ]
+ ],
+ "shape": {
+ "columns": 11,
+ "rows": 11
+ }
+ },
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Earned Premium | \n",
+ " On-Level Factor | \n",
+ " On-Level Premium | \n",
+ " Reported Claims | \n",
+ " Trend | \n",
+ " Tort Reform | \n",
+ " Adjusted Claims | \n",
+ " CDF to Ultimate | \n",
+ " % Reported | \n",
+ " Used-Up On-Level Premium | \n",
+ " Estimated Adjusted Claim Ratio | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 1998 | \n",
+ " 20000.0 | \n",
+ " 0.989 | \n",
+ " 19780.0 | \n",
+ " 15822.0 | \n",
+ " 1.400 | \n",
+ " 0.67 | \n",
+ " 14841.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 19780.0 | \n",
+ " 0.750 | \n",
+ "
\n",
+ " \n",
+ " | 1999 | \n",
+ " 31500.0 | \n",
+ " 0.970 | \n",
+ " 30555.0 | \n",
+ " 25107.0 | \n",
+ " 1.354 | \n",
+ " 0.67 | \n",
+ " 22777.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 30555.0 | \n",
+ " 0.745 | \n",
+ "
\n",
+ " \n",
+ " | 2000 | \n",
+ " 45000.0 | \n",
+ " 0.951 | \n",
+ " 42795.0 | \n",
+ " 37246.0 | \n",
+ " 1.309 | \n",
+ " 0.67 | \n",
+ " 32666.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 42795.0 | \n",
+ " 0.763 | \n",
+ "
\n",
+ " \n",
+ " | 2001 | \n",
+ " 50000.0 | \n",
+ " 0.932 | \n",
+ " 46600.0 | \n",
+ " 38798.0 | \n",
+ " 1.266 | \n",
+ " 0.67 | \n",
+ " 32909.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 46600.0 | \n",
+ " 0.706 | \n",
+ "
\n",
+ " \n",
+ " | 2002 | \n",
+ " 61183.0 | \n",
+ " 0.914 | \n",
+ " 55921.0 | \n",
+ " 48169.0 | \n",
+ " 1.224 | \n",
+ " 0.67 | \n",
+ " 39502.0 | \n",
+ " 1.003 | \n",
+ " 0.997 | \n",
+ " 55754.0 | \n",
+ " 0.709 | \n",
+ "
\n",
+ " \n",
+ " | 2003 | \n",
+ " 69175.0 | \n",
+ " 0.870 | \n",
+ " 60182.0 | \n",
+ " 44373.0 | \n",
+ " 1.183 | \n",
+ " 0.67 | \n",
+ " 35170.0 | \n",
+ " 1.013 | \n",
+ " 0.987 | \n",
+ " 59410.0 | \n",
+ " 0.592 | \n",
+ "
\n",
+ " \n",
+ " | 2004 | \n",
+ " 99322.0 | \n",
+ " 0.810 | \n",
+ " 80451.0 | \n",
+ " 70288.0 | \n",
+ " 1.144 | \n",
+ " 0.67 | \n",
+ " 53874.0 | \n",
+ " 1.064 | \n",
+ " 0.940 | \n",
+ " 75612.0 | \n",
+ " 0.713 | \n",
+ "
\n",
+ " \n",
+ " | 2005 | \n",
+ " 138151.0 | \n",
+ " 0.704 | \n",
+ " 97258.0 | \n",
+ " 70655.0 | \n",
+ " 1.106 | \n",
+ " 0.67 | \n",
+ " 52357.0 | \n",
+ " 1.085 | \n",
+ " 0.922 | \n",
+ " 89639.0 | \n",
+ " 0.584 | \n",
+ "
\n",
+ " \n",
+ " | 2006 | \n",
+ " 107578.0 | \n",
+ " 0.640 | \n",
+ " 68850.0 | \n",
+ " 48804.0 | \n",
+ " 1.070 | \n",
+ " 0.75 | \n",
+ " 39165.0 | \n",
+ " 1.196 | \n",
+ " 0.836 | \n",
+ " 57567.0 | \n",
+ " 0.680 | \n",
+ "
\n",
+ " \n",
+ " | 2007 | \n",
+ " 62438.0 | \n",
+ " 0.800 | \n",
+ " 49950.0 | \n",
+ " 31732.0 | \n",
+ " 1.034 | \n",
+ " 1.00 | \n",
+ " 32811.0 | \n",
+ " 1.512 | \n",
+ " 0.661 | \n",
+ " 33036.0 | \n",
+ " 0.993 | \n",
+ "
\n",
+ " \n",
+ " | 2008 | \n",
+ " 47797.0 | \n",
+ " 1.000 | \n",
+ " 47797.0 | \n",
+ " 18632.0 | \n",
+ " 1.000 | \n",
+ " 1.00 | \n",
+ " 18632.0 | \n",
+ " 2.551 | \n",
+ " 0.392 | \n",
+ " 18737.0 | \n",
+ " 0.994 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Earned Premium On-Level Factor On-Level Premium Reported Claims Trend Tort Reform Adjusted Claims CDF to Ultimate % Reported Used-Up On-Level Premium Estimated Adjusted Claim Ratio\n",
+ "1998 20000.0 0.989 19780.0 15822.0 1.400 0.67 14841.0 1.000 1.000 19780.0 0.750\n",
+ "1999 31500.0 0.970 30555.0 25107.0 1.354 0.67 22777.0 1.000 1.000 30555.0 0.745\n",
+ "2000 45000.0 0.951 42795.0 37246.0 1.309 0.67 32666.0 1.000 1.000 42795.0 0.763\n",
+ "2001 50000.0 0.932 46600.0 38798.0 1.266 0.67 32909.0 1.000 1.000 46600.0 0.706\n",
+ "2002 61183.0 0.914 55921.0 48169.0 1.224 0.67 39502.0 1.003 0.997 55754.0 0.709\n",
+ "2003 69175.0 0.870 60182.0 44373.0 1.183 0.67 35170.0 1.013 0.987 59410.0 0.592\n",
+ "2004 99322.0 0.810 80451.0 70288.0 1.144 0.67 53874.0 1.064 0.940 75612.0 0.713\n",
+ "2005 138151.0 0.704 97258.0 70655.0 1.106 0.67 52357.0 1.085 0.922 89639.0 0.584\n",
+ "2006 107578.0 0.640 68850.0 48804.0 1.070 0.75 39165.0 1.196 0.836 57567.0 0.680\n",
+ "2007 62438.0 0.800 49950.0 31732.0 1.034 1.00 32811.0 1.512 0.661 33036.0 0.993\n",
+ "2008 47797.0 1.000 47797.0 18632.0 1.000 1.00 18632.0 2.551 0.392 18737.0 0.994"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "All-years adjusted claim ratio (apriori): 0.707\n"
+ ]
+ }
+ ],
+ "source": [
+ "xyz = cl.load_sample(\"friedland_xyz_auto_bi\")\n",
+ "xyz_reported = xyz[\"Reported Claims\"]\n",
+ "xyz_paid = xyz[\"Paid Claims\"]\n",
+ "xyz_premium = xyz[\"Earned Premium\"].latest_diagonal\n",
+ "xyz_years = list(xyz_reported.origin.year)\n",
+ "\n",
+ "# Reuse the Chapter 7 XYZ reported development, persisted there with to_json.\n",
+ "_data_dir = os.path.join(os.path.dirname(cl.__file__), \"utils\", \"data\")\n",
+ "with open(os.path.join(_data_dir, \"friedland_ch7_xyz_reported.json\")) as f:\n",
+ " xyz_reported_dev = cl.read_json(f.read())\n",
+ "xyz_reported_dev.ldf_ = xyz_reported_dev.ldf_.round(3)\n",
+ "\n",
+ "# Adjustment factors from the text (Exhibit II, Sheet 1).\n",
+ "# On-level premium adjustment (col 3), pure-premium trend (col 7), tort reform (col 8).\n",
+ "onlevel_adj = np.array([0.989, 0.970, 0.951, 0.932, 0.914, 0.870, 0.810, 0.704, 0.640, 0.800, 1.000])\n",
+ "pp_trend = np.array([1.400, 1.354, 1.309, 1.266, 1.224, 1.183, 1.144, 1.106, 1.070, 1.034, 1.000])\n",
+ "tort_reform = np.array([0.670, 0.670, 0.670, 0.670, 0.670, 0.670, 0.670, 0.670, 0.750, 1.000, 1.000])\n",
+ "\n",
+ "# Reported cumulative development factors are limited to a minimum of 1.00.\n",
+ "xyz_cdf = np.maximum(\n",
+ " xyz_reported_dev.cdf_.to_frame(origin_as_datetime=False).values.flatten()[::-1], 1.0).round(3)\n",
+ "xyz_pct_reported = 1 / xyz_cdf\n",
+ "xyz_reported_latest = col(xyz_reported.latest_diagonal)\n",
+ "xyz_prem = col(xyz_premium)\n",
+ "\n",
+ "on_level_premium = xyz_prem * onlevel_adj\n",
+ "adjusted_claims = xyz_reported_latest * pp_trend * tort_reform\n",
+ "used_up_on_level = on_level_premium * xyz_pct_reported\n",
+ "\n",
+ "# Derive the all-years apriori through CapeCod: fit on the adjusted reported\n",
+ "# triangle with on-level premium exposure.\n",
+ "adj_factor = pp_trend * tort_reform\n",
+ "xyz_adj_tri = xyz_reported.copy()\n",
+ "xyz_adj_tri.values = xyz_adj_tri.values * adj_factor[None, None, :, None]\n",
+ "xyz_adj_dev = xyz_adj_tri.copy()\n",
+ "xyz_adj_dev.ldf_ = xyz_reported_dev.ldf_\n",
+ "onlevel_diag = xyz_premium.copy()\n",
+ "onlevel_diag.values = onlevel_diag.values * onlevel_adj[None, None, :, None]\n",
+ "xyz_cc = cl.CapeCod().fit(xyz_adj_dev, sample_weight=onlevel_diag)\n",
+ "xyz_apriori = float(xyz_cc.apriori_.to_frame().iloc[0, 0])\n",
+ "\n",
+ "sheet1 = pd.DataFrame(index=xyz_years)\n",
+ "sheet1[\"Earned Premium\"] = xyz_prem\n",
+ "sheet1[\"On-Level Factor\"] = onlevel_adj\n",
+ "sheet1[\"On-Level Premium\"] = on_level_premium.round(0)\n",
+ "sheet1[\"Reported Claims\"] = xyz_reported_latest\n",
+ "sheet1[\"Trend\"] = pp_trend\n",
+ "sheet1[\"Tort Reform\"] = tort_reform\n",
+ "sheet1[\"Adjusted Claims\"] = adjusted_claims.round(0)\n",
+ "sheet1[\"CDF to Ultimate\"] = xyz_cdf.round(3)\n",
+ "sheet1[\"% Reported\"] = xyz_pct_reported.round(3)\n",
+ "sheet1[\"Used-Up On-Level Premium\"] = used_up_on_level.round(0)\n",
+ "sheet1[\"Estimated Adjusted Claim Ratio\"] = (adjusted_claims / used_up_on_level).round(3)\n",
+ "display(sheet1)\n",
+ "print(f\"All-years adjusted claim ratio (apriori): {xyz_apriori:.3f}\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "58d85350",
+ "metadata": {},
+ "source": [
+ "### Projection of ultimate claims\n",
+ "\n",
+ "This recreates *Exhibit II, Sheet 2*. The all-years adjusted claim ratio is\n",
+ "detrended back to each accident year's environment (Column 15 of Sheet 1) to give\n",
+ "the per-year expected claim ratios. Expected claims are earned premium times that\n",
+ "ratio; the projected ultimate is reported claims plus expected unreported."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "id": "db65e010",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.microsoft.datawrangler.viewer.v0+json": {
+ "columns": [
+ {
+ "name": "index",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Earned Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Expected Claim Ratio",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Expected Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "CDF to Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "% Unreported",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Expected Unreported",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Reported Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Projected Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ }
+ ],
+ "ref": "d6c5afd3-deae-448a-8916-f392345dde55",
+ "rows": [
+ [
+ "1998",
+ "20000.0",
+ "0.745",
+ "14900.0",
+ "1.0",
+ "0.0",
+ "0.0",
+ "15822.0",
+ "15822.0"
+ ],
+ [
+ "1999",
+ "31500.0",
+ "0.756",
+ "23799.0",
+ "1.0",
+ "0.0",
+ "0.0",
+ "25107.0",
+ "25107.0"
+ ],
+ [
+ "2000",
+ "45000.0",
+ "0.766",
+ "34479.0",
+ "1.0",
+ "0.0",
+ "0.0",
+ "37246.0",
+ "37246.0"
+ ],
+ [
+ "2001",
+ "50000.0",
+ "0.776",
+ "38819.0",
+ "1.0",
+ "0.0",
+ "0.0",
+ "38798.0",
+ "38798.0"
+ ],
+ [
+ "2002",
+ "61183.0",
+ "0.788",
+ "48183.0",
+ "1.003",
+ "0.003",
+ "144.0",
+ "48169.0",
+ "48313.0"
+ ],
+ [
+ "2003",
+ "69175.0",
+ "0.776",
+ "53651.0",
+ "1.013",
+ "0.013",
+ "689.0",
+ "44373.0",
+ "45062.0"
+ ],
+ [
+ "2004",
+ "99322.0",
+ "0.747",
+ "74165.0",
+ "1.064",
+ "0.06",
+ "4461.0",
+ "70288.0",
+ "74749.0"
+ ],
+ [
+ "2005",
+ "138151.0",
+ "0.671",
+ "92740.0",
+ "1.085",
+ "0.078",
+ "7265.0",
+ "70655.0",
+ "77920.0"
+ ],
+ [
+ "2006",
+ "107578.0",
+ "0.564",
+ "60622.0",
+ "1.196",
+ "0.164",
+ "9935.0",
+ "48804.0",
+ "58739.0"
+ ],
+ [
+ "2007",
+ "62438.0",
+ "0.547",
+ "34134.0",
+ "1.512",
+ "0.339",
+ "11559.0",
+ "31732.0",
+ "43291.0"
+ ],
+ [
+ "2008",
+ "47797.0",
+ "0.707",
+ "33773.0",
+ "2.551",
+ "0.608",
+ "20534.0",
+ "18632.0",
+ "39166.0"
+ ]
+ ],
+ "shape": {
+ "columns": 8,
+ "rows": 11
+ }
+ },
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Earned Premium | \n",
+ " Expected Claim Ratio | \n",
+ " Expected Claims | \n",
+ " CDF to Ultimate | \n",
+ " % Unreported | \n",
+ " Expected Unreported | \n",
+ " Reported Claims | \n",
+ " Projected Ultimate | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 1998 | \n",
+ " 20000.0 | \n",
+ " 0.745 | \n",
+ " 14900.0 | \n",
+ " 1.000 | \n",
+ " 0.000 | \n",
+ " 0.0 | \n",
+ " 15822.0 | \n",
+ " 15822.0 | \n",
+ "
\n",
+ " \n",
+ " | 1999 | \n",
+ " 31500.0 | \n",
+ " 0.756 | \n",
+ " 23799.0 | \n",
+ " 1.000 | \n",
+ " 0.000 | \n",
+ " 0.0 | \n",
+ " 25107.0 | \n",
+ " 25107.0 | \n",
+ "
\n",
+ " \n",
+ " | 2000 | \n",
+ " 45000.0 | \n",
+ " 0.766 | \n",
+ " 34479.0 | \n",
+ " 1.000 | \n",
+ " 0.000 | \n",
+ " 0.0 | \n",
+ " 37246.0 | \n",
+ " 37246.0 | \n",
+ "
\n",
+ " \n",
+ " | 2001 | \n",
+ " 50000.0 | \n",
+ " 0.776 | \n",
+ " 38819.0 | \n",
+ " 1.000 | \n",
+ " 0.000 | \n",
+ " 0.0 | \n",
+ " 38798.0 | \n",
+ " 38798.0 | \n",
+ "
\n",
+ " \n",
+ " | 2002 | \n",
+ " 61183.0 | \n",
+ " 0.788 | \n",
+ " 48183.0 | \n",
+ " 1.003 | \n",
+ " 0.003 | \n",
+ " 144.0 | \n",
+ " 48169.0 | \n",
+ " 48313.0 | \n",
+ "
\n",
+ " \n",
+ " | 2003 | \n",
+ " 69175.0 | \n",
+ " 0.776 | \n",
+ " 53651.0 | \n",
+ " 1.013 | \n",
+ " 0.013 | \n",
+ " 689.0 | \n",
+ " 44373.0 | \n",
+ " 45062.0 | \n",
+ "
\n",
+ " \n",
+ " | 2004 | \n",
+ " 99322.0 | \n",
+ " 0.747 | \n",
+ " 74165.0 | \n",
+ " 1.064 | \n",
+ " 0.060 | \n",
+ " 4461.0 | \n",
+ " 70288.0 | \n",
+ " 74749.0 | \n",
+ "
\n",
+ " \n",
+ " | 2005 | \n",
+ " 138151.0 | \n",
+ " 0.671 | \n",
+ " 92740.0 | \n",
+ " 1.085 | \n",
+ " 0.078 | \n",
+ " 7265.0 | \n",
+ " 70655.0 | \n",
+ " 77920.0 | \n",
+ "
\n",
+ " \n",
+ " | 2006 | \n",
+ " 107578.0 | \n",
+ " 0.564 | \n",
+ " 60622.0 | \n",
+ " 1.196 | \n",
+ " 0.164 | \n",
+ " 9935.0 | \n",
+ " 48804.0 | \n",
+ " 58739.0 | \n",
+ "
\n",
+ " \n",
+ " | 2007 | \n",
+ " 62438.0 | \n",
+ " 0.547 | \n",
+ " 34134.0 | \n",
+ " 1.512 | \n",
+ " 0.339 | \n",
+ " 11559.0 | \n",
+ " 31732.0 | \n",
+ " 43291.0 | \n",
+ "
\n",
+ " \n",
+ " | 2008 | \n",
+ " 47797.0 | \n",
+ " 0.707 | \n",
+ " 33773.0 | \n",
+ " 2.551 | \n",
+ " 0.608 | \n",
+ " 20534.0 | \n",
+ " 18632.0 | \n",
+ " 39166.0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Earned Premium Expected Claim Ratio Expected Claims CDF to Ultimate % Unreported Expected Unreported Reported Claims Projected Ultimate\n",
+ "1998 20000.0 0.745 14900.0 1.000 0.000 0.0 15822.0 15822.0\n",
+ "1999 31500.0 0.756 23799.0 1.000 0.000 0.0 25107.0 25107.0\n",
+ "2000 45000.0 0.766 34479.0 1.000 0.000 0.0 37246.0 37246.0\n",
+ "2001 50000.0 0.776 38819.0 1.000 0.000 0.0 38798.0 38798.0\n",
+ "2002 61183.0 0.788 48183.0 1.003 0.003 144.0 48169.0 48313.0\n",
+ "2003 69175.0 0.776 53651.0 1.013 0.013 689.0 44373.0 45062.0\n",
+ "2004 99322.0 0.747 74165.0 1.064 0.060 4461.0 70288.0 74749.0\n",
+ "2005 138151.0 0.671 92740.0 1.085 0.078 7265.0 70655.0 77920.0\n",
+ "2006 107578.0 0.564 60622.0 1.196 0.164 9935.0 48804.0 58739.0\n",
+ "2007 62438.0 0.547 34134.0 1.512 0.339 11559.0 31732.0 43291.0\n",
+ "2008 47797.0 0.707 33773.0 2.551 0.608 20534.0 18632.0 39166.0"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "# Detrend the all-years apriori back to each year's rate, inflation, and tort\n",
+ "# environment (Exhibit II, Sheet 1, Column 15).\n",
+ "xyz_unadjusted_ratio = xyz_apriori * onlevel_adj / pp_trend / tort_reform\n",
+ "xyz_expected_claims = xyz_prem * xyz_unadjusted_ratio\n",
+ "xyz_pct_unreported = 1 - xyz_pct_reported\n",
+ "xyz_expected_unreported = xyz_expected_claims * xyz_pct_unreported\n",
+ "xyz_ult = xyz_reported_latest + xyz_expected_unreported\n",
+ "\n",
+ "sheet2 = pd.DataFrame(index=xyz_years)\n",
+ "sheet2[\"Earned Premium\"] = xyz_prem\n",
+ "sheet2[\"Expected Claim Ratio\"] = xyz_unadjusted_ratio.round(3)\n",
+ "sheet2[\"Expected Claims\"] = xyz_expected_claims.round(0)\n",
+ "sheet2[\"CDF to Ultimate\"] = xyz_cdf.round(3)\n",
+ "sheet2[\"% Unreported\"] = xyz_pct_unreported.round(3)\n",
+ "sheet2[\"Expected Unreported\"] = xyz_expected_unreported.round(0)\n",
+ "sheet2[\"Reported Claims\"] = xyz_reported_latest\n",
+ "sheet2[\"Projected Ultimate\"] = xyz_ult.round(0)\n",
+ "display(sheet2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "eeb67fb7",
+ "metadata": {},
+ "source": [
+ "### Development of unpaid claim estimate\n",
+ "\n",
+ "This recreates *Exhibit II, Sheet 3*: case outstanding, estimated IBNR, and total\n",
+ "unpaid follow from the projected ultimates."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "id": "2fdd601f",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.microsoft.datawrangler.viewer.v0+json": {
+ "columns": [
+ {
+ "name": "index",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Reported Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Paid Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Projected Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Case Outstanding",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "IBNR",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Total Unpaid",
+ "rawType": "float64",
+ "type": "float"
+ }
+ ],
+ "ref": "7dff0ed7-7664-4efa-9d4a-b46f65b94680",
+ "rows": [
+ [
+ "1998",
+ "15822.0",
+ "15822.0",
+ "15822.0",
+ "0.0",
+ "0.0",
+ "0.0"
+ ],
+ [
+ "1999",
+ "25107.0",
+ "24817.0",
+ "25107.0",
+ "290.0",
+ "0.0",
+ "290.0"
+ ],
+ [
+ "2000",
+ "37246.0",
+ "36782.0",
+ "37246.0",
+ "464.0",
+ "0.0",
+ "464.0"
+ ],
+ [
+ "2001",
+ "38798.0",
+ "38519.0",
+ "38798.0",
+ "279.0",
+ "0.0",
+ "279.0"
+ ],
+ [
+ "2002",
+ "48169.0",
+ "44437.0",
+ "48313.0",
+ "3732.0",
+ "144.0",
+ "3876.0"
+ ],
+ [
+ "2003",
+ "44373.0",
+ "39320.0",
+ "45062.0",
+ "5053.0",
+ "689.0",
+ "5742.0"
+ ],
+ [
+ "2004",
+ "70288.0",
+ "52811.0",
+ "74749.0",
+ "17477.0",
+ "4461.0",
+ "21938.0"
+ ],
+ [
+ "2005",
+ "70655.0",
+ "40026.0",
+ "77920.0",
+ "30629.0",
+ "7265.0",
+ "37894.0"
+ ],
+ [
+ "2006",
+ "48804.0",
+ "22819.0",
+ "58739.0",
+ "25985.0",
+ "9935.0",
+ "35920.0"
+ ],
+ [
+ "2007",
+ "31732.0",
+ "11865.0",
+ "43291.0",
+ "19867.0",
+ "11559.0",
+ "31426.0"
+ ],
+ [
+ "2008",
+ "18632.0",
+ "3409.0",
+ "39166.0",
+ "15223.0",
+ "20534.0",
+ "35757.0"
+ ]
+ ],
+ "shape": {
+ "columns": 6,
+ "rows": 11
+ }
+ },
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Reported Claims | \n",
+ " Paid Claims | \n",
+ " Projected Ultimate | \n",
+ " Case Outstanding | \n",
+ " IBNR | \n",
+ " Total Unpaid | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 1998 | \n",
+ " 15822.0 | \n",
+ " 15822.0 | \n",
+ " 15822.0 | \n",
+ " 0.0 | \n",
+ " 0.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 1999 | \n",
+ " 25107.0 | \n",
+ " 24817.0 | \n",
+ " 25107.0 | \n",
+ " 290.0 | \n",
+ " 0.0 | \n",
+ " 290.0 | \n",
+ "
\n",
+ " \n",
+ " | 2000 | \n",
+ " 37246.0 | \n",
+ " 36782.0 | \n",
+ " 37246.0 | \n",
+ " 464.0 | \n",
+ " 0.0 | \n",
+ " 464.0 | \n",
+ "
\n",
+ " \n",
+ " | 2001 | \n",
+ " 38798.0 | \n",
+ " 38519.0 | \n",
+ " 38798.0 | \n",
+ " 279.0 | \n",
+ " 0.0 | \n",
+ " 279.0 | \n",
+ "
\n",
+ " \n",
+ " | 2002 | \n",
+ " 48169.0 | \n",
+ " 44437.0 | \n",
+ " 48313.0 | \n",
+ " 3732.0 | \n",
+ " 144.0 | \n",
+ " 3876.0 | \n",
+ "
\n",
+ " \n",
+ " | 2003 | \n",
+ " 44373.0 | \n",
+ " 39320.0 | \n",
+ " 45062.0 | \n",
+ " 5053.0 | \n",
+ " 689.0 | \n",
+ " 5742.0 | \n",
+ "
\n",
+ " \n",
+ " | 2004 | \n",
+ " 70288.0 | \n",
+ " 52811.0 | \n",
+ " 74749.0 | \n",
+ " 17477.0 | \n",
+ " 4461.0 | \n",
+ " 21938.0 | \n",
+ "
\n",
+ " \n",
+ " | 2005 | \n",
+ " 70655.0 | \n",
+ " 40026.0 | \n",
+ " 77920.0 | \n",
+ " 30629.0 | \n",
+ " 7265.0 | \n",
+ " 37894.0 | \n",
+ "
\n",
+ " \n",
+ " | 2006 | \n",
+ " 48804.0 | \n",
+ " 22819.0 | \n",
+ " 58739.0 | \n",
+ " 25985.0 | \n",
+ " 9935.0 | \n",
+ " 35920.0 | \n",
+ "
\n",
+ " \n",
+ " | 2007 | \n",
+ " 31732.0 | \n",
+ " 11865.0 | \n",
+ " 43291.0 | \n",
+ " 19867.0 | \n",
+ " 11559.0 | \n",
+ " 31426.0 | \n",
+ "
\n",
+ " \n",
+ " | 2008 | \n",
+ " 18632.0 | \n",
+ " 3409.0 | \n",
+ " 39166.0 | \n",
+ " 15223.0 | \n",
+ " 20534.0 | \n",
+ " 35757.0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Reported Claims Paid Claims Projected Ultimate Case Outstanding IBNR Total Unpaid\n",
+ "1998 15822.0 15822.0 15822.0 0.0 0.0 0.0\n",
+ "1999 25107.0 24817.0 25107.0 290.0 0.0 290.0\n",
+ "2000 37246.0 36782.0 37246.0 464.0 0.0 464.0\n",
+ "2001 38798.0 38519.0 38798.0 279.0 0.0 279.0\n",
+ "2002 48169.0 44437.0 48313.0 3732.0 144.0 3876.0\n",
+ "2003 44373.0 39320.0 45062.0 5053.0 689.0 5742.0\n",
+ "2004 70288.0 52811.0 74749.0 17477.0 4461.0 21938.0\n",
+ "2005 70655.0 40026.0 77920.0 30629.0 7265.0 37894.0\n",
+ "2006 48804.0 22819.0 58739.0 25985.0 9935.0 35920.0\n",
+ "2007 31732.0 11865.0 43291.0 19867.0 11559.0 31426.0\n",
+ "2008 18632.0 3409.0 39166.0 15223.0 20534.0 35757.0"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "xyz_paid_latest = col(xyz_paid.latest_diagonal)\n",
+ "sheet3 = pd.DataFrame(index=xyz_years)\n",
+ "sheet3[\"Reported Claims\"] = xyz_reported_latest\n",
+ "sheet3[\"Paid Claims\"] = xyz_paid_latest\n",
+ "sheet3[\"Projected Ultimate\"] = xyz_ult.round(0)\n",
+ "sheet3[\"Case Outstanding\"] = (xyz_reported_latest - xyz_paid_latest).round(0)\n",
+ "sheet3[\"IBNR\"] = (xyz_ult - xyz_reported_latest).round(0)\n",
+ "sheet3[\"Total Unpaid\"] = (xyz_ult - xyz_paid_latest).round(0)\n",
+ "display(sheet3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "0f5d38e1",
+ "metadata": {},
+ "source": [
+ "### Reconciliation to Friedland\n",
+ "\n",
+ "The derived adjusted claim ratio, the per-year detrended claim ratios, and the\n",
+ "projected ultimate and IBNR totals are reconciled to the printed Exhibit II\n",
+ "below (values in $000)."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "id": "e16ace4f",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "# Exhibit II, Sheet 1 - all-years adjusted claim ratio\n",
+ "assert np.isclose(xyz_apriori, 0.708, atol=2e-3)\n",
+ "# Exhibit II, Sheet 1 - selected CDFs to ultimate (limited to a minimum of 1.00)\n",
+ "assert np.allclose(xyz_cdf.round(3),\n",
+ " [1.000, 1.000, 1.000, 1.000, 1.003, 1.013, 1.064, 1.085, 1.196, 1.512, 2.551], atol=1e-3)\n",
+ "# Exhibit II, Sheet 1 - detrended (unadjusted) claim ratios, Column 15\n",
+ "assert np.allclose(xyz_unadjusted_ratio,\n",
+ " [0.746, 0.757, 0.767, 0.778, 0.789, 0.777, 0.747, 0.672, 0.565, 0.547, 0.708], atol=2e-3)\n",
+ "# Exhibit II, Sheet 2 - projected ultimate claims\n",
+ "assert np.isclose(xyz_ult.sum(), 504300, rtol=5e-3)\n",
+ "# Exhibit II, Sheet 3 - estimated IBNR\n",
+ "assert np.isclose((xyz_ult - xyz_reported_latest).sum(), 54674, rtol=5e-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "1f94d563",
+ "metadata": {},
+ "source": [
+ "### Comparison of methods\n",
+ "\n",
+ "This recreates *Exhibit II, Sheets 4 and 5*, which compare the Cape Cod\n",
+ "projection against the development, expected claims, and Bornhuetter-Ferguson\n",
+ "methods from Chapters 7-9. The non-Cape-Cod columns are the published results of\n",
+ "those chapters (cited in the text's column notes); the Cape Cod column is the one\n",
+ "computed in this chapter. Values in $000."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "id": "8c2d4747",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "application/vnd.microsoft.datawrangler.viewer.v0+json": {
+ "columns": [
+ {
+ "name": "index",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Reported",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Paid",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Development (Reported)",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Development (Paid)",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Expected Claims",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "BF (Reported)",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "BF (Paid)",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Cape Cod",
+ "rawType": "float64",
+ "type": "float"
+ }
+ ],
+ "ref": "a564d1bd-9753-4b7e-a5bb-a38d1f12ca62",
+ "rows": [
+ [
+ "1998",
+ "15822.0",
+ "15822.0",
+ "15822",
+ "15980",
+ "15660",
+ "15822",
+ "15977",
+ "15822.0"
+ ],
+ [
+ "1999",
+ "25107.0",
+ "24817.0",
+ "25082",
+ "25164",
+ "24665",
+ "25107",
+ "25158",
+ "25107.0"
+ ],
+ [
+ "2000",
+ "37246.0",
+ "36782.0",
+ "36948",
+ "37922",
+ "35235",
+ "37246",
+ "37841",
+ "37246.0"
+ ],
+ [
+ "2001",
+ "38798.0",
+ "38519.0",
+ "38487",
+ "40600",
+ "39150",
+ "38798",
+ "40525",
+ "38798.0"
+ ],
+ [
+ "2002",
+ "48169.0",
+ "44437.0",
+ "48313",
+ "49592",
+ "47906",
+ "48312",
+ "49417",
+ "48313.0"
+ ],
+ [
+ "2003",
+ "44373.0",
+ "39320.0",
+ "44950",
+ "49858",
+ "54164",
+ "45068",
+ "50768",
+ "45062.0"
+ ],
+ [
+ "2004",
+ "70288.0",
+ "52811.0",
+ "74787",
+ "80537",
+ "86509",
+ "75492",
+ "82593",
+ "74749.0"
+ ],
+ [
+ "2005",
+ "70655.0",
+ "40026.0",
+ "76661",
+ "80333",
+ "108172",
+ "79129",
+ "94301",
+ "77920.0"
+ ],
+ [
+ "2006",
+ "48804.0",
+ "22819.0",
+ "58370",
+ "72108",
+ "70786",
+ "60404",
+ "71205",
+ "58739.0"
+ ],
+ [
+ "2007",
+ "31732.0",
+ "11865.0",
+ "47979",
+ "77941",
+ "39835",
+ "45221",
+ "45636",
+ "43291.0"
+ ],
+ [
+ "2008",
+ "18632.0",
+ "3409.0",
+ "47530",
+ "74995",
+ "39433",
+ "42607",
+ "41049",
+ "39166.0"
+ ]
+ ],
+ "shape": {
+ "columns": 8,
+ "rows": 11
+ }
+ },
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Reported | \n",
+ " Paid | \n",
+ " Development (Reported) | \n",
+ " Development (Paid) | \n",
+ " Expected Claims | \n",
+ " BF (Reported) | \n",
+ " BF (Paid) | \n",
+ " Cape Cod | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 1998 | \n",
+ " 15822.0 | \n",
+ " 15822.0 | \n",
+ " 15822 | \n",
+ " 15980 | \n",
+ " 15660 | \n",
+ " 15822 | \n",
+ " 15977 | \n",
+ " 15822.0 | \n",
+ "
\n",
+ " \n",
+ " | 1999 | \n",
+ " 25107.0 | \n",
+ " 24817.0 | \n",
+ " 25082 | \n",
+ " 25164 | \n",
+ " 24665 | \n",
+ " 25107 | \n",
+ " 25158 | \n",
+ " 25107.0 | \n",
+ "
\n",
+ " \n",
+ " | 2000 | \n",
+ " 37246.0 | \n",
+ " 36782.0 | \n",
+ " 36948 | \n",
+ " 37922 | \n",
+ " 35235 | \n",
+ " 37246 | \n",
+ " 37841 | \n",
+ " 37246.0 | \n",
+ "
\n",
+ " \n",
+ " | 2001 | \n",
+ " 38798.0 | \n",
+ " 38519.0 | \n",
+ " 38487 | \n",
+ " 40600 | \n",
+ " 39150 | \n",
+ " 38798 | \n",
+ " 40525 | \n",
+ " 38798.0 | \n",
+ "
\n",
+ " \n",
+ " | 2002 | \n",
+ " 48169.0 | \n",
+ " 44437.0 | \n",
+ " 48313 | \n",
+ " 49592 | \n",
+ " 47906 | \n",
+ " 48312 | \n",
+ " 49417 | \n",
+ " 48313.0 | \n",
+ "
\n",
+ " \n",
+ " | 2003 | \n",
+ " 44373.0 | \n",
+ " 39320.0 | \n",
+ " 44950 | \n",
+ " 49858 | \n",
+ " 54164 | \n",
+ " 45068 | \n",
+ " 50768 | \n",
+ " 45062.0 | \n",
+ "
\n",
+ " \n",
+ " | 2004 | \n",
+ " 70288.0 | \n",
+ " 52811.0 | \n",
+ " 74787 | \n",
+ " 80537 | \n",
+ " 86509 | \n",
+ " 75492 | \n",
+ " 82593 | \n",
+ " 74749.0 | \n",
+ "
\n",
+ " \n",
+ " | 2005 | \n",
+ " 70655.0 | \n",
+ " 40026.0 | \n",
+ " 76661 | \n",
+ " 80333 | \n",
+ " 108172 | \n",
+ " 79129 | \n",
+ " 94301 | \n",
+ " 77920.0 | \n",
+ "
\n",
+ " \n",
+ " | 2006 | \n",
+ " 48804.0 | \n",
+ " 22819.0 | \n",
+ " 58370 | \n",
+ " 72108 | \n",
+ " 70786 | \n",
+ " 60404 | \n",
+ " 71205 | \n",
+ " 58739.0 | \n",
+ "
\n",
+ " \n",
+ " | 2007 | \n",
+ " 31732.0 | \n",
+ " 11865.0 | \n",
+ " 47979 | \n",
+ " 77941 | \n",
+ " 39835 | \n",
+ " 45221 | \n",
+ " 45636 | \n",
+ " 43291.0 | \n",
+ "
\n",
+ " \n",
+ " | 2008 | \n",
+ " 18632.0 | \n",
+ " 3409.0 | \n",
+ " 47530 | \n",
+ " 74995 | \n",
+ " 39433 | \n",
+ " 42607 | \n",
+ " 41049 | \n",
+ " 39166.0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Reported Paid Development (Reported) Development (Paid) Expected Claims BF (Reported) BF (Paid) Cape Cod\n",
+ "1998 15822.0 15822.0 15822 15980 15660 15822 15977 15822.0\n",
+ "1999 25107.0 24817.0 25082 25164 24665 25107 25158 25107.0\n",
+ "2000 37246.0 36782.0 36948 37922 35235 37246 37841 37246.0\n",
+ "2001 38798.0 38519.0 38487 40600 39150 38798 40525 38798.0\n",
+ "2002 48169.0 44437.0 48313 49592 47906 48312 49417 48313.0\n",
+ "2003 44373.0 39320.0 44950 49858 54164 45068 50768 45062.0\n",
+ "2004 70288.0 52811.0 74787 80537 86509 75492 82593 74749.0\n",
+ "2005 70655.0 40026.0 76661 80333 108172 79129 94301 77920.0\n",
+ "2006 48804.0 22819.0 58370 72108 70786 60404 71205 58739.0\n",
+ "2007 31732.0 11865.0 47979 77941 39835 45221 45636 43291.0\n",
+ "2008 18632.0 3409.0 47530 74995 39433 42607 41049 39166.0"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "data": {
+ "application/vnd.microsoft.datawrangler.viewer.v0+json": {
+ "columns": [
+ {
+ "name": "index",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Case Outstanding",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Development (Reported)",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Development (Paid)",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Expected Claims",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "BF (Reported)",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "BF (Paid)",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Cape Cod",
+ "rawType": "float64",
+ "type": "float"
+ }
+ ],
+ "ref": "fea2b219-c282-4988-88c9-389c7544322e",
+ "rows": [
+ [
+ "1998",
+ "0.0",
+ "0",
+ "158",
+ "-162",
+ "0",
+ "155",
+ "0.0"
+ ],
+ [
+ "1999",
+ "290.0",
+ "-25",
+ "58",
+ "-442",
+ "0",
+ "51",
+ "0.0"
+ ],
+ [
+ "2000",
+ "464.0",
+ "-298",
+ "676",
+ "-2011",
+ "0",
+ "595",
+ "0.0"
+ ],
+ [
+ "2001",
+ "279.0",
+ "-310",
+ "1802",
+ "352",
+ "0",
+ "1728",
+ "0.0"
+ ],
+ [
+ "2002",
+ "3732.0",
+ "145",
+ "1423",
+ "-262",
+ "143",
+ "1248",
+ "144.0"
+ ],
+ [
+ "2003",
+ "5053.0",
+ "577",
+ "5485",
+ "9791",
+ "695",
+ "6396",
+ "689.0"
+ ],
+ [
+ "2004",
+ "17477.0",
+ "4498",
+ "10249",
+ "16221",
+ "5204",
+ "12305",
+ "4461.0"
+ ],
+ [
+ "2005",
+ "30629.0",
+ "6006",
+ "9678",
+ "37517",
+ "8474",
+ "23646",
+ "7265.0"
+ ],
+ [
+ "2006",
+ "25985.0",
+ "9566",
+ "23304",
+ "21982",
+ "11600",
+ "22401",
+ "9935.0"
+ ],
+ [
+ "2007",
+ "19867.0",
+ "16247",
+ "46209",
+ "8103",
+ "13489",
+ "13904",
+ "11559.0"
+ ],
+ [
+ "2008",
+ "15223.0",
+ "28898",
+ "56363",
+ "20801",
+ "23975",
+ "22417",
+ "20534.0"
+ ]
+ ],
+ "shape": {
+ "columns": 7,
+ "rows": 11
+ }
+ },
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Case Outstanding | \n",
+ " Development (Reported) | \n",
+ " Development (Paid) | \n",
+ " Expected Claims | \n",
+ " BF (Reported) | \n",
+ " BF (Paid) | \n",
+ " Cape Cod | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 1998 | \n",
+ " 0.0 | \n",
+ " 0 | \n",
+ " 158 | \n",
+ " -162 | \n",
+ " 0 | \n",
+ " 155 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 1999 | \n",
+ " 290.0 | \n",
+ " -25 | \n",
+ " 58 | \n",
+ " -442 | \n",
+ " 0 | \n",
+ " 51 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2000 | \n",
+ " 464.0 | \n",
+ " -298 | \n",
+ " 676 | \n",
+ " -2011 | \n",
+ " 0 | \n",
+ " 595 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2001 | \n",
+ " 279.0 | \n",
+ " -310 | \n",
+ " 1802 | \n",
+ " 352 | \n",
+ " 0 | \n",
+ " 1728 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2002 | \n",
+ " 3732.0 | \n",
+ " 145 | \n",
+ " 1423 | \n",
+ " -262 | \n",
+ " 143 | \n",
+ " 1248 | \n",
+ " 144.0 | \n",
+ "
\n",
+ " \n",
+ " | 2003 | \n",
+ " 5053.0 | \n",
+ " 577 | \n",
+ " 5485 | \n",
+ " 9791 | \n",
+ " 695 | \n",
+ " 6396 | \n",
+ " 689.0 | \n",
+ "
\n",
+ " \n",
+ " | 2004 | \n",
+ " 17477.0 | \n",
+ " 4498 | \n",
+ " 10249 | \n",
+ " 16221 | \n",
+ " 5204 | \n",
+ " 12305 | \n",
+ " 4461.0 | \n",
+ "
\n",
+ " \n",
+ " | 2005 | \n",
+ " 30629.0 | \n",
+ " 6006 | \n",
+ " 9678 | \n",
+ " 37517 | \n",
+ " 8474 | \n",
+ " 23646 | \n",
+ " 7265.0 | \n",
+ "
\n",
+ " \n",
+ " | 2006 | \n",
+ " 25985.0 | \n",
+ " 9566 | \n",
+ " 23304 | \n",
+ " 21982 | \n",
+ " 11600 | \n",
+ " 22401 | \n",
+ " 9935.0 | \n",
+ "
\n",
+ " \n",
+ " | 2007 | \n",
+ " 19867.0 | \n",
+ " 16247 | \n",
+ " 46209 | \n",
+ " 8103 | \n",
+ " 13489 | \n",
+ " 13904 | \n",
+ " 11559.0 | \n",
+ "
\n",
+ " \n",
+ " | 2008 | \n",
+ " 15223.0 | \n",
+ " 28898 | \n",
+ " 56363 | \n",
+ " 20801 | \n",
+ " 23975 | \n",
+ " 22417 | \n",
+ " 20534.0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Case Outstanding Development (Reported) Development (Paid) Expected Claims BF (Reported) BF (Paid) Cape Cod\n",
+ "1998 0.0 0 158 -162 0 155 0.0\n",
+ "1999 290.0 -25 58 -442 0 51 0.0\n",
+ "2000 464.0 -298 676 -2011 0 595 0.0\n",
+ "2001 279.0 -310 1802 352 0 1728 0.0\n",
+ "2002 3732.0 145 1423 -262 143 1248 144.0\n",
+ "2003 5053.0 577 5485 9791 695 6396 689.0\n",
+ "2004 17477.0 4498 10249 16221 5204 12305 4461.0\n",
+ "2005 30629.0 6006 9678 37517 8474 23646 7265.0\n",
+ "2006 25985.0 9566 23304 21982 11600 22401 9935.0\n",
+ "2007 19867.0 16247 46209 8103 13489 13904 11559.0\n",
+ "2008 15223.0 28898 56363 20801 23975 22417 20534.0"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "# Ultimate claims by method (Sheet 4). Every column other than Cape Cod is the\n",
+ "# published result of a prior chapter - development (Chapter 7), expected claims\n",
+ "# (Chapter 8), and Bornhuetter-Ferguson (Chapter 9) - reproduced from the text's\n",
+ "# column notes for comparison. The Cape Cod column is computed above.\n",
+ "summary_ult = pd.DataFrame(index=xyz_years)\n",
+ "summary_ult[\"Reported\"] = xyz_reported_latest\n",
+ "summary_ult[\"Paid\"] = xyz_paid_latest\n",
+ "summary_ult[\"Development (Reported)\"] = [15822, 25082, 36948, 38487, 48313, 44950, 74787, 76661, 58370, 47979, 47530]\n",
+ "summary_ult[\"Development (Paid)\"] = [15980, 25164, 37922, 40600, 49592, 49858, 80537, 80333, 72108, 77941, 74995]\n",
+ "summary_ult[\"Expected Claims\"] = [15660, 24665, 35235, 39150, 47906, 54164, 86509, 108172, 70786, 39835, 39433]\n",
+ "summary_ult[\"BF (Reported)\"] = [15822, 25107, 37246, 38798, 48312, 45068, 75492, 79129, 60404, 45221, 42607]\n",
+ "summary_ult[\"BF (Paid)\"] = [15977, 25158, 37841, 40525, 49417, 50768, 82593, 94301, 71205, 45636, 41049]\n",
+ "summary_ult[\"Cape Cod\"] = xyz_ult.round(0)\n",
+ "display(summary_ult)\n",
+ "\n",
+ "# Estimated IBNR by method (Sheet 5): projected ultimate minus reported claims.\n",
+ "summary_ibnr = pd.DataFrame(index=xyz_years)\n",
+ "summary_ibnr[\"Case Outstanding\"] = (xyz_reported_latest - xyz_paid_latest).round(0)\n",
+ "summary_ibnr[\"Development (Reported)\"] = [0, -25, -298, -310, 145, 577, 4498, 6006, 9566, 16247, 28898]\n",
+ "summary_ibnr[\"Development (Paid)\"] = [158, 58, 676, 1802, 1423, 5485, 10249, 9678, 23304, 46209, 56363]\n",
+ "summary_ibnr[\"Expected Claims\"] = [-162, -442, -2011, 352, -262, 9791, 16221, 37517, 21982, 8103, 20801]\n",
+ "summary_ibnr[\"BF (Reported)\"] = [0, 0, 0, 0, 143, 695, 5204, 8474, 11600, 13489, 23975]\n",
+ "summary_ibnr[\"BF (Paid)\"] = [155, 51, 595, 1728, 1248, 6396, 12305, 23646, 22401, 13904, 22417]\n",
+ "summary_ibnr[\"Cape Cod\"] = (xyz_ult - xyz_reported_latest).round(0)\n",
+ "display(summary_ibnr)\n",
+ "\n",
+ "# Reconcile the Cape Cod column of Sheets 4 and 5 to the printed exhibit.\n",
+ "assert np.isclose(summary_ult[\"Cape Cod\"].sum(), 504300, rtol=5e-3)\n",
+ "assert np.isclose(summary_ibnr[\"Cape Cod\"].sum(), 54674, rtol=5e-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "549ee58f",
+ "metadata": {},
+ "source": [
+ "## Exhibit III - U.S. PP Auto (Impact of Changing Conditions)\n",
+ "\n",
+ "Exhibit III applies the Cape Cod method to the four **U.S. PP Auto** scenarios\n",
+ "Friedland uses to study a changing environment (valued at 12/31/2008, accident\n",
+ "years 1999-2008):\n",
+ "\n",
+ "1. Steady-State\n",
+ "2. Increasing Claim Ratios\n",
+ "3. Increasing Case Outstanding Strength\n",
+ "4. Increasing Claim Ratios and Case Outstanding Strength\n",
+ "\n",
+ "Unlike Bornhuetter-Ferguson (whose a priori is fixed at a 70% claim ratio for all\n",
+ "four scenarios), Cape Cod *derives* the expected claim ratio from each scenario's\n",
+ "reported experience. This is what makes it more responsive when claim ratios rise\n",
+ "(Scenario 2) but prone to overstatement when case-outstanding strength increases\n",
+ "(Scenarios 3 and 4).\n",
+ "\n",
+ "The development selection is the Chapter 7 five-year simple average with a 1.000\n",
+ "tail, and reported CDFs are limited to a minimum of 1.000.\n",
+ "\n",
+ "> **Note on sample data.** The reported figures for the two *case outstanding\n",
+ "> strength* scenarios do not yet reconcile exactly. The reported development in\n",
+ "> the `friedland_uspp_auto_increasing_case` and\n",
+ "> `friedland_uspp_increasing_claim_case` samples differs slightly from the text\n",
+ "> (a known data correction to these CSVs is still outstanding), so the\n",
+ "> reconciliation below asserts the IBNR total only for the two scenarios with\n",
+ "> clean data. The derived claim ratio reconciles for all four."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "id": "bc5deb56",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Steady-State - all-years estimated claim ratio 0.700\n"
+ ]
+ },
+ {
+ "data": {
+ "application/vnd.microsoft.datawrangler.viewer.v0+json": {
+ "columns": [
+ {
+ "name": "index",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Earned Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Reported Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "CDF to Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "% Reported",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Used-Up Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Estimated Claim Ratio",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Expected Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Projected Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "IBNR",
+ "rawType": "float64",
+ "type": "float"
+ }
+ ],
+ "ref": "632ebdc9-48aa-423d-b41f-56457218760c",
+ "rows": [
+ [
+ "1999",
+ "1000000.0",
+ "700000.0",
+ "1.0",
+ "1.0",
+ "1000000.0",
+ "0.7",
+ "700059.0",
+ "700000.0",
+ "0.0"
+ ],
+ [
+ "2000",
+ "1050000.0",
+ "735000.0",
+ "1.0",
+ "1.0",
+ "1050000.0",
+ "0.7",
+ "735062.0",
+ "735000.0",
+ "0.0"
+ ],
+ [
+ "2001",
+ "1102500.0",
+ "771750.0",
+ "1.0",
+ "1.0",
+ "1102500.0",
+ "0.7",
+ "771815.0",
+ "771750.0",
+ "0.0"
+ ],
+ [
+ "2002",
+ "1157625.0",
+ "810338.0",
+ "1.0",
+ "1.0",
+ "1157625.0",
+ "0.7",
+ "810405.0",
+ "810338.0",
+ "0.0"
+ ],
+ [
+ "2003",
+ "1215506.25",
+ "842346.0",
+ "1.01",
+ "0.99",
+ "1203472.0",
+ "0.7",
+ "850926.0",
+ "850771.0",
+ "8425.0"
+ ],
+ [
+ "2004",
+ "1276281.563",
+ "884463.0",
+ "1.01",
+ "0.99",
+ "1263645.0",
+ "0.7",
+ "893472.0",
+ "893309.0",
+ "8846.0"
+ ],
+ [
+ "2005",
+ "1340095.641",
+ "919306.0",
+ "1.02",
+ "0.98",
+ "1313819.0",
+ "0.7",
+ "938146.0",
+ "937791.0",
+ "18485.0"
+ ],
+ [
+ "2006",
+ "1407100.423",
+ "935722.0",
+ "1.053",
+ "0.95",
+ "1336278.0",
+ "0.7",
+ "985053.0",
+ "985074.0",
+ "49352.0"
+ ],
+ [
+ "2007",
+ "1477455.444",
+ "930797.0",
+ "1.112",
+ "0.899",
+ "1328647.0",
+ "0.701",
+ "1034306.0",
+ "1034718.0",
+ "103921.0"
+ ],
+ [
+ "2008",
+ "1551328.216",
+ "836166.0",
+ "1.3",
+ "0.769",
+ "1193329.0",
+ "0.701",
+ "1086021.0",
+ "1086512.0",
+ "250346.0"
+ ]
+ ],
+ "shape": {
+ "columns": 9,
+ "rows": 10
+ }
+ },
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Earned Premium | \n",
+ " Reported Claims | \n",
+ " CDF to Ultimate | \n",
+ " % Reported | \n",
+ " Used-Up Premium | \n",
+ " Estimated Claim Ratio | \n",
+ " Expected Claims | \n",
+ " Projected Ultimate | \n",
+ " IBNR | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 1999 | \n",
+ " 1000000.000 | \n",
+ " 700000.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 1000000.0 | \n",
+ " 0.700 | \n",
+ " 700059.0 | \n",
+ " 700000.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2000 | \n",
+ " 1050000.000 | \n",
+ " 735000.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 1050000.0 | \n",
+ " 0.700 | \n",
+ " 735062.0 | \n",
+ " 735000.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2001 | \n",
+ " 1102500.000 | \n",
+ " 771750.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 1102500.0 | \n",
+ " 0.700 | \n",
+ " 771815.0 | \n",
+ " 771750.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2002 | \n",
+ " 1157625.000 | \n",
+ " 810338.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 1157625.0 | \n",
+ " 0.700 | \n",
+ " 810405.0 | \n",
+ " 810338.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2003 | \n",
+ " 1215506.250 | \n",
+ " 842346.0 | \n",
+ " 1.010 | \n",
+ " 0.990 | \n",
+ " 1203472.0 | \n",
+ " 0.700 | \n",
+ " 850926.0 | \n",
+ " 850771.0 | \n",
+ " 8425.0 | \n",
+ "
\n",
+ " \n",
+ " | 2004 | \n",
+ " 1276281.563 | \n",
+ " 884463.0 | \n",
+ " 1.010 | \n",
+ " 0.990 | \n",
+ " 1263645.0 | \n",
+ " 0.700 | \n",
+ " 893472.0 | \n",
+ " 893309.0 | \n",
+ " 8846.0 | \n",
+ "
\n",
+ " \n",
+ " | 2005 | \n",
+ " 1340095.641 | \n",
+ " 919306.0 | \n",
+ " 1.020 | \n",
+ " 0.980 | \n",
+ " 1313819.0 | \n",
+ " 0.700 | \n",
+ " 938146.0 | \n",
+ " 937791.0 | \n",
+ " 18485.0 | \n",
+ "
\n",
+ " \n",
+ " | 2006 | \n",
+ " 1407100.423 | \n",
+ " 935722.0 | \n",
+ " 1.053 | \n",
+ " 0.950 | \n",
+ " 1336278.0 | \n",
+ " 0.700 | \n",
+ " 985053.0 | \n",
+ " 985074.0 | \n",
+ " 49352.0 | \n",
+ "
\n",
+ " \n",
+ " | 2007 | \n",
+ " 1477455.444 | \n",
+ " 930797.0 | \n",
+ " 1.112 | \n",
+ " 0.899 | \n",
+ " 1328647.0 | \n",
+ " 0.701 | \n",
+ " 1034306.0 | \n",
+ " 1034718.0 | \n",
+ " 103921.0 | \n",
+ "
\n",
+ " \n",
+ " | 2008 | \n",
+ " 1551328.216 | \n",
+ " 836166.0 | \n",
+ " 1.300 | \n",
+ " 0.769 | \n",
+ " 1193329.0 | \n",
+ " 0.701 | \n",
+ " 1086021.0 | \n",
+ " 1086512.0 | \n",
+ " 250346.0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Earned Premium Reported Claims CDF to Ultimate % Reported Used-Up Premium Estimated Claim Ratio Expected Claims Projected Ultimate IBNR\n",
+ "1999 1000000.000 700000.0 1.000 1.000 1000000.0 0.700 700059.0 700000.0 0.0\n",
+ "2000 1050000.000 735000.0 1.000 1.000 1050000.0 0.700 735062.0 735000.0 0.0\n",
+ "2001 1102500.000 771750.0 1.000 1.000 1102500.0 0.700 771815.0 771750.0 0.0\n",
+ "2002 1157625.000 810338.0 1.000 1.000 1157625.0 0.700 810405.0 810338.0 0.0\n",
+ "2003 1215506.250 842346.0 1.010 0.990 1203472.0 0.700 850926.0 850771.0 8425.0\n",
+ "2004 1276281.563 884463.0 1.010 0.990 1263645.0 0.700 893472.0 893309.0 8846.0\n",
+ "2005 1340095.641 919306.0 1.020 0.980 1313819.0 0.700 938146.0 937791.0 18485.0\n",
+ "2006 1407100.423 935722.0 1.053 0.950 1336278.0 0.700 985053.0 985074.0 49352.0\n",
+ "2007 1477455.444 930797.0 1.112 0.899 1328647.0 0.701 1034306.0 1034718.0 103921.0\n",
+ "2008 1551328.216 836166.0 1.300 0.769 1193329.0 0.701 1086021.0 1086512.0 250346.0"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Increasing Claim Ratios - all-years estimated claim ratio 0.807\n"
+ ]
+ },
+ {
+ "data": {
+ "application/vnd.microsoft.datawrangler.viewer.v0+json": {
+ "columns": [
+ {
+ "name": "index",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Earned Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Reported Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "CDF to Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "% Reported",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Used-Up Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Estimated Claim Ratio",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Expected Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Projected Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "IBNR",
+ "rawType": "float64",
+ "type": "float"
+ }
+ ],
+ "ref": "f212e16b-c2e5-496a-a506-721a740b073f",
+ "rows": [
+ [
+ "1999",
+ "1000000.0",
+ "700000.0",
+ "1.0",
+ "1.0",
+ "1000000.0",
+ "0.7",
+ "807293.0",
+ "700000.0",
+ "0.0"
+ ],
+ [
+ "2000",
+ "1050000.0",
+ "735000.0",
+ "1.0",
+ "1.0",
+ "1050000.0",
+ "0.7",
+ "847658.0",
+ "735000.0",
+ "0.0"
+ ],
+ [
+ "2001",
+ "1102500.0",
+ "771750.0",
+ "1.0",
+ "1.0",
+ "1102500.0",
+ "0.7",
+ "890041.0",
+ "771750.0",
+ "0.0"
+ ],
+ [
+ "2002",
+ "1157625.0",
+ "810338.0",
+ "1.0",
+ "1.0",
+ "1157625.0",
+ "0.7",
+ "934543.0",
+ "810338.0",
+ "0.0"
+ ],
+ [
+ "2003",
+ "1215506.25",
+ "842346.0",
+ "1.01",
+ "0.99",
+ "1203472.0",
+ "0.7",
+ "981270.0",
+ "852062.0",
+ "9716.0"
+ ],
+ [
+ "2004",
+ "1276281.563",
+ "1010815.0",
+ "1.01",
+ "0.99",
+ "1263645.0",
+ "0.8",
+ "1030333.0",
+ "1021016.0",
+ "10201.0"
+ ],
+ [
+ "2005",
+ "1340095.641",
+ "1116300.0",
+ "1.02",
+ "0.98",
+ "1313819.0",
+ "0.85",
+ "1081850.0",
+ "1137617.0",
+ "21317.0"
+ ],
+ [
+ "2006",
+ "1407100.423",
+ "1203071.0",
+ "1.053",
+ "0.95",
+ "1336278.0",
+ "0.9",
+ "1135942.0",
+ "1259983.0",
+ "56912.0"
+ ],
+ [
+ "2007",
+ "1477455.444",
+ "1263224.0",
+ "1.112",
+ "0.899",
+ "1328647.0",
+ "0.951",
+ "1192740.0",
+ "1383064.0",
+ "119840.0"
+ ],
+ [
+ "2008",
+ "1551328.216",
+ "1194523.0",
+ "1.3",
+ "0.769",
+ "1193329.0",
+ "1.001",
+ "1252377.0",
+ "1483217.0",
+ "288694.0"
+ ]
+ ],
+ "shape": {
+ "columns": 9,
+ "rows": 10
+ }
+ },
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Earned Premium | \n",
+ " Reported Claims | \n",
+ " CDF to Ultimate | \n",
+ " % Reported | \n",
+ " Used-Up Premium | \n",
+ " Estimated Claim Ratio | \n",
+ " Expected Claims | \n",
+ " Projected Ultimate | \n",
+ " IBNR | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 1999 | \n",
+ " 1000000.000 | \n",
+ " 700000.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 1000000.0 | \n",
+ " 0.700 | \n",
+ " 807293.0 | \n",
+ " 700000.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2000 | \n",
+ " 1050000.000 | \n",
+ " 735000.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 1050000.0 | \n",
+ " 0.700 | \n",
+ " 847658.0 | \n",
+ " 735000.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2001 | \n",
+ " 1102500.000 | \n",
+ " 771750.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 1102500.0 | \n",
+ " 0.700 | \n",
+ " 890041.0 | \n",
+ " 771750.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2002 | \n",
+ " 1157625.000 | \n",
+ " 810338.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 1157625.0 | \n",
+ " 0.700 | \n",
+ " 934543.0 | \n",
+ " 810338.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2003 | \n",
+ " 1215506.250 | \n",
+ " 842346.0 | \n",
+ " 1.010 | \n",
+ " 0.990 | \n",
+ " 1203472.0 | \n",
+ " 0.700 | \n",
+ " 981270.0 | \n",
+ " 852062.0 | \n",
+ " 9716.0 | \n",
+ "
\n",
+ " \n",
+ " | 2004 | \n",
+ " 1276281.563 | \n",
+ " 1010815.0 | \n",
+ " 1.010 | \n",
+ " 0.990 | \n",
+ " 1263645.0 | \n",
+ " 0.800 | \n",
+ " 1030333.0 | \n",
+ " 1021016.0 | \n",
+ " 10201.0 | \n",
+ "
\n",
+ " \n",
+ " | 2005 | \n",
+ " 1340095.641 | \n",
+ " 1116300.0 | \n",
+ " 1.020 | \n",
+ " 0.980 | \n",
+ " 1313819.0 | \n",
+ " 0.850 | \n",
+ " 1081850.0 | \n",
+ " 1137617.0 | \n",
+ " 21317.0 | \n",
+ "
\n",
+ " \n",
+ " | 2006 | \n",
+ " 1407100.423 | \n",
+ " 1203071.0 | \n",
+ " 1.053 | \n",
+ " 0.950 | \n",
+ " 1336278.0 | \n",
+ " 0.900 | \n",
+ " 1135942.0 | \n",
+ " 1259983.0 | \n",
+ " 56912.0 | \n",
+ "
\n",
+ " \n",
+ " | 2007 | \n",
+ " 1477455.444 | \n",
+ " 1263224.0 | \n",
+ " 1.112 | \n",
+ " 0.899 | \n",
+ " 1328647.0 | \n",
+ " 0.951 | \n",
+ " 1192740.0 | \n",
+ " 1383064.0 | \n",
+ " 119840.0 | \n",
+ "
\n",
+ " \n",
+ " | 2008 | \n",
+ " 1551328.216 | \n",
+ " 1194523.0 | \n",
+ " 1.300 | \n",
+ " 0.769 | \n",
+ " 1193329.0 | \n",
+ " 1.001 | \n",
+ " 1252377.0 | \n",
+ " 1483217.0 | \n",
+ " 288694.0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Earned Premium Reported Claims CDF to Ultimate % Reported Used-Up Premium Estimated Claim Ratio Expected Claims Projected Ultimate IBNR\n",
+ "1999 1000000.000 700000.0 1.000 1.000 1000000.0 0.700 807293.0 700000.0 0.0\n",
+ "2000 1050000.000 735000.0 1.000 1.000 1050000.0 0.700 847658.0 735000.0 0.0\n",
+ "2001 1102500.000 771750.0 1.000 1.000 1102500.0 0.700 890041.0 771750.0 0.0\n",
+ "2002 1157625.000 810338.0 1.000 1.000 1157625.0 0.700 934543.0 810338.0 0.0\n",
+ "2003 1215506.250 842346.0 1.010 0.990 1203472.0 0.700 981270.0 852062.0 9716.0\n",
+ "2004 1276281.563 1010815.0 1.010 0.990 1263645.0 0.800 1030333.0 1021016.0 10201.0\n",
+ "2005 1340095.641 1116300.0 1.020 0.980 1313819.0 0.850 1081850.0 1137617.0 21317.0\n",
+ "2006 1407100.423 1203071.0 1.053 0.950 1336278.0 0.900 1135942.0 1259983.0 56912.0\n",
+ "2007 1477455.444 1263224.0 1.112 0.899 1328647.0 0.951 1192740.0 1383064.0 119840.0\n",
+ "2008 1551328.216 1194523.0 1.300 0.769 1193329.0 1.001 1252377.0 1483217.0 288694.0"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Increasing Case Outstanding Strength - all-years estimated claim ratio 0.717\n"
+ ]
+ },
+ {
+ "data": {
+ "application/vnd.microsoft.datawrangler.viewer.v0+json": {
+ "columns": [
+ {
+ "name": "index",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Earned Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Reported Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "CDF to Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "% Reported",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Used-Up Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Estimated Claim Ratio",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Expected Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Projected Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "IBNR",
+ "rawType": "float64",
+ "type": "float"
+ }
+ ],
+ "ref": "6954be96-0e5a-403d-9a92-bf03a8f13fa5",
+ "rows": [
+ [
+ "1999",
+ "1000000.0",
+ "700000.0",
+ "1.0",
+ "1.0",
+ "1000000.0",
+ "0.7",
+ "716820.0",
+ "700000.0",
+ "0.0"
+ ],
+ [
+ "2000",
+ "1050000.0",
+ "735000.0",
+ "1.0",
+ "1.0",
+ "1050000.0",
+ "0.7",
+ "752661.0",
+ "735000.0",
+ "0.0"
+ ],
+ [
+ "2001",
+ "1102500.0",
+ "771750.0",
+ "1.0",
+ "1.0",
+ "1102500.0",
+ "0.7",
+ "790294.0",
+ "771750.0",
+ "0.0"
+ ],
+ [
+ "2002",
+ "1157625.0",
+ "810338.0",
+ "1.0",
+ "1.0",
+ "1157625.0",
+ "0.7",
+ "829809.0",
+ "810338.0",
+ "0.0"
+ ],
+ [
+ "2003",
+ "1215506.25",
+ "842346.0",
+ "1.01",
+ "0.99",
+ "1203472.0",
+ "0.7",
+ "871300.0",
+ "850973.0",
+ "8627.0"
+ ],
+ [
+ "2004",
+ "1276281.563",
+ "884463.0",
+ "1.01",
+ "0.99",
+ "1263645.0",
+ "0.7",
+ "914865.0",
+ "893521.0",
+ "9058.0"
+ ],
+ [
+ "2005",
+ "1340095.641",
+ "933377.0",
+ "1.019",
+ "0.981",
+ "1315109.0",
+ "0.71",
+ "960608.0",
+ "951371.0",
+ "17994.0"
+ ],
+ [
+ "2006",
+ "1407100.423",
+ "962808.0",
+ "1.054",
+ "0.949",
+ "1335010.0",
+ "0.721",
+ "1008638.0",
+ "1014247.0",
+ "51439.0"
+ ],
+ [
+ "2007",
+ "1477455.444",
+ "979922.0",
+ "1.117",
+ "0.895",
+ "1322700.0",
+ "0.741",
+ "1059070.0",
+ "1090823.0",
+ "110901.0"
+ ],
+ [
+ "2008",
+ "1551328.216",
+ "931185.0",
+ "1.316",
+ "0.76",
+ "1178821.0",
+ "0.79",
+ "1112024.0",
+ "1198066.0",
+ "266881.0"
+ ]
+ ],
+ "shape": {
+ "columns": 9,
+ "rows": 10
+ }
+ },
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Earned Premium | \n",
+ " Reported Claims | \n",
+ " CDF to Ultimate | \n",
+ " % Reported | \n",
+ " Used-Up Premium | \n",
+ " Estimated Claim Ratio | \n",
+ " Expected Claims | \n",
+ " Projected Ultimate | \n",
+ " IBNR | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 1999 | \n",
+ " 1000000.000 | \n",
+ " 700000.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 1000000.0 | \n",
+ " 0.700 | \n",
+ " 716820.0 | \n",
+ " 700000.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2000 | \n",
+ " 1050000.000 | \n",
+ " 735000.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 1050000.0 | \n",
+ " 0.700 | \n",
+ " 752661.0 | \n",
+ " 735000.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2001 | \n",
+ " 1102500.000 | \n",
+ " 771750.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 1102500.0 | \n",
+ " 0.700 | \n",
+ " 790294.0 | \n",
+ " 771750.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2002 | \n",
+ " 1157625.000 | \n",
+ " 810338.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 1157625.0 | \n",
+ " 0.700 | \n",
+ " 829809.0 | \n",
+ " 810338.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2003 | \n",
+ " 1215506.250 | \n",
+ " 842346.0 | \n",
+ " 1.010 | \n",
+ " 0.990 | \n",
+ " 1203472.0 | \n",
+ " 0.700 | \n",
+ " 871300.0 | \n",
+ " 850973.0 | \n",
+ " 8627.0 | \n",
+ "
\n",
+ " \n",
+ " | 2004 | \n",
+ " 1276281.563 | \n",
+ " 884463.0 | \n",
+ " 1.010 | \n",
+ " 0.990 | \n",
+ " 1263645.0 | \n",
+ " 0.700 | \n",
+ " 914865.0 | \n",
+ " 893521.0 | \n",
+ " 9058.0 | \n",
+ "
\n",
+ " \n",
+ " | 2005 | \n",
+ " 1340095.641 | \n",
+ " 933377.0 | \n",
+ " 1.019 | \n",
+ " 0.981 | \n",
+ " 1315109.0 | \n",
+ " 0.710 | \n",
+ " 960608.0 | \n",
+ " 951371.0 | \n",
+ " 17994.0 | \n",
+ "
\n",
+ " \n",
+ " | 2006 | \n",
+ " 1407100.423 | \n",
+ " 962808.0 | \n",
+ " 1.054 | \n",
+ " 0.949 | \n",
+ " 1335010.0 | \n",
+ " 0.721 | \n",
+ " 1008638.0 | \n",
+ " 1014247.0 | \n",
+ " 51439.0 | \n",
+ "
\n",
+ " \n",
+ " | 2007 | \n",
+ " 1477455.444 | \n",
+ " 979922.0 | \n",
+ " 1.117 | \n",
+ " 0.895 | \n",
+ " 1322700.0 | \n",
+ " 0.741 | \n",
+ " 1059070.0 | \n",
+ " 1090823.0 | \n",
+ " 110901.0 | \n",
+ "
\n",
+ " \n",
+ " | 2008 | \n",
+ " 1551328.216 | \n",
+ " 931185.0 | \n",
+ " 1.316 | \n",
+ " 0.760 | \n",
+ " 1178821.0 | \n",
+ " 0.790 | \n",
+ " 1112024.0 | \n",
+ " 1198066.0 | \n",
+ " 266881.0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Earned Premium Reported Claims CDF to Ultimate % Reported Used-Up Premium Estimated Claim Ratio Expected Claims Projected Ultimate IBNR\n",
+ "1999 1000000.000 700000.0 1.000 1.000 1000000.0 0.700 716820.0 700000.0 0.0\n",
+ "2000 1050000.000 735000.0 1.000 1.000 1050000.0 0.700 752661.0 735000.0 0.0\n",
+ "2001 1102500.000 771750.0 1.000 1.000 1102500.0 0.700 790294.0 771750.0 0.0\n",
+ "2002 1157625.000 810338.0 1.000 1.000 1157625.0 0.700 829809.0 810338.0 0.0\n",
+ "2003 1215506.250 842346.0 1.010 0.990 1203472.0 0.700 871300.0 850973.0 8627.0\n",
+ "2004 1276281.563 884463.0 1.010 0.990 1263645.0 0.700 914865.0 893521.0 9058.0\n",
+ "2005 1340095.641 933377.0 1.019 0.981 1315109.0 0.710 960608.0 951371.0 17994.0\n",
+ "2006 1407100.423 962808.0 1.054 0.949 1335010.0 0.721 1008638.0 1014247.0 51439.0\n",
+ "2007 1477455.444 979922.0 1.117 0.895 1322700.0 0.741 1059070.0 1090823.0 110901.0\n",
+ "2008 1551328.216 931185.0 1.316 0.760 1178821.0 0.790 1112024.0 1198066.0 266881.0"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Increasing Claim Ratios and Case Outstanding Strength - all-years estimated claim ratio 0.830\n"
+ ]
+ },
+ {
+ "data": {
+ "application/vnd.microsoft.datawrangler.viewer.v0+json": {
+ "columns": [
+ {
+ "name": "index",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Earned Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Reported Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "CDF to Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "% Reported",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Used-Up Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Estimated Claim Ratio",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Expected Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Projected Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "IBNR",
+ "rawType": "float64",
+ "type": "float"
+ }
+ ],
+ "ref": "fa226c65-6e26-497f-8a63-b6ea81aae312",
+ "rows": [
+ [
+ "1999",
+ "1000000.0",
+ "700000.0",
+ "1.0",
+ "1.0",
+ "1000000.0",
+ "0.7",
+ "830029.0",
+ "700000.0",
+ "0.0"
+ ],
+ [
+ "2000",
+ "1050000.0",
+ "735000.0",
+ "1.0",
+ "1.0",
+ "1050000.0",
+ "0.7",
+ "871530.0",
+ "735000.0",
+ "0.0"
+ ],
+ [
+ "2001",
+ "1102500.0",
+ "771750.0",
+ "1.0",
+ "1.0",
+ "1102500.0",
+ "0.7",
+ "915107.0",
+ "771750.0",
+ "0.0"
+ ],
+ [
+ "2002",
+ "1157625.0",
+ "810338.0",
+ "1.0",
+ "1.0",
+ "1157625.0",
+ "0.7",
+ "960862.0",
+ "810338.0",
+ "0.0"
+ ],
+ [
+ "2003",
+ "1215506.25",
+ "842346.0",
+ "1.01",
+ "0.99",
+ "1203472.0",
+ "0.7",
+ "1008905.0",
+ "852335.0",
+ "9989.0"
+ ],
+ [
+ "2004",
+ "1276281.563",
+ "1010815.0",
+ "1.01",
+ "0.99",
+ "1263645.0",
+ "0.8",
+ "1059351.0",
+ "1021304.0",
+ "10489.0"
+ ],
+ [
+ "2005",
+ "1340095.641",
+ "1133386.0",
+ "1.019",
+ "0.981",
+ "1315109.0",
+ "0.862",
+ "1112318.0",
+ "1154222.0",
+ "20836.0"
+ ],
+ [
+ "2006",
+ "1407100.423",
+ "1237897.0",
+ "1.054",
+ "0.949",
+ "1335010.0",
+ "0.927",
+ "1167934.0",
+ "1297460.0",
+ "59563.0"
+ ],
+ [
+ "2007",
+ "1477455.444",
+ "1329895.0",
+ "1.117",
+ "0.895",
+ "1322700.0",
+ "1.005",
+ "1226331.0",
+ "1458311.0",
+ "128416.0"
+ ],
+ [
+ "2008",
+ "1551328.216",
+ "1330264.0",
+ "1.316",
+ "0.76",
+ "1178821.0",
+ "1.128",
+ "1287647.0",
+ "1639294.0",
+ "309030.0"
+ ]
+ ],
+ "shape": {
+ "columns": 9,
+ "rows": 10
+ }
+ },
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Earned Premium | \n",
+ " Reported Claims | \n",
+ " CDF to Ultimate | \n",
+ " % Reported | \n",
+ " Used-Up Premium | \n",
+ " Estimated Claim Ratio | \n",
+ " Expected Claims | \n",
+ " Projected Ultimate | \n",
+ " IBNR | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 1999 | \n",
+ " 1000000.000 | \n",
+ " 700000.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 1000000.0 | \n",
+ " 0.700 | \n",
+ " 830029.0 | \n",
+ " 700000.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2000 | \n",
+ " 1050000.000 | \n",
+ " 735000.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 1050000.0 | \n",
+ " 0.700 | \n",
+ " 871530.0 | \n",
+ " 735000.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2001 | \n",
+ " 1102500.000 | \n",
+ " 771750.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 1102500.0 | \n",
+ " 0.700 | \n",
+ " 915107.0 | \n",
+ " 771750.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2002 | \n",
+ " 1157625.000 | \n",
+ " 810338.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 1157625.0 | \n",
+ " 0.700 | \n",
+ " 960862.0 | \n",
+ " 810338.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2003 | \n",
+ " 1215506.250 | \n",
+ " 842346.0 | \n",
+ " 1.010 | \n",
+ " 0.990 | \n",
+ " 1203472.0 | \n",
+ " 0.700 | \n",
+ " 1008905.0 | \n",
+ " 852335.0 | \n",
+ " 9989.0 | \n",
+ "
\n",
+ " \n",
+ " | 2004 | \n",
+ " 1276281.563 | \n",
+ " 1010815.0 | \n",
+ " 1.010 | \n",
+ " 0.990 | \n",
+ " 1263645.0 | \n",
+ " 0.800 | \n",
+ " 1059351.0 | \n",
+ " 1021304.0 | \n",
+ " 10489.0 | \n",
+ "
\n",
+ " \n",
+ " | 2005 | \n",
+ " 1340095.641 | \n",
+ " 1133386.0 | \n",
+ " 1.019 | \n",
+ " 0.981 | \n",
+ " 1315109.0 | \n",
+ " 0.862 | \n",
+ " 1112318.0 | \n",
+ " 1154222.0 | \n",
+ " 20836.0 | \n",
+ "
\n",
+ " \n",
+ " | 2006 | \n",
+ " 1407100.423 | \n",
+ " 1237897.0 | \n",
+ " 1.054 | \n",
+ " 0.949 | \n",
+ " 1335010.0 | \n",
+ " 0.927 | \n",
+ " 1167934.0 | \n",
+ " 1297460.0 | \n",
+ " 59563.0 | \n",
+ "
\n",
+ " \n",
+ " | 2007 | \n",
+ " 1477455.444 | \n",
+ " 1329895.0 | \n",
+ " 1.117 | \n",
+ " 0.895 | \n",
+ " 1322700.0 | \n",
+ " 1.005 | \n",
+ " 1226331.0 | \n",
+ " 1458311.0 | \n",
+ " 128416.0 | \n",
+ "
\n",
+ " \n",
+ " | 2008 | \n",
+ " 1551328.216 | \n",
+ " 1330264.0 | \n",
+ " 1.316 | \n",
+ " 0.760 | \n",
+ " 1178821.0 | \n",
+ " 1.128 | \n",
+ " 1287647.0 | \n",
+ " 1639294.0 | \n",
+ " 309030.0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Earned Premium Reported Claims CDF to Ultimate % Reported Used-Up Premium Estimated Claim Ratio Expected Claims Projected Ultimate IBNR\n",
+ "1999 1000000.000 700000.0 1.000 1.000 1000000.0 0.700 830029.0 700000.0 0.0\n",
+ "2000 1050000.000 735000.0 1.000 1.000 1050000.0 0.700 871530.0 735000.0 0.0\n",
+ "2001 1102500.000 771750.0 1.000 1.000 1102500.0 0.700 915107.0 771750.0 0.0\n",
+ "2002 1157625.000 810338.0 1.000 1.000 1157625.0 0.700 960862.0 810338.0 0.0\n",
+ "2003 1215506.250 842346.0 1.010 0.990 1203472.0 0.700 1008905.0 852335.0 9989.0\n",
+ "2004 1276281.563 1010815.0 1.010 0.990 1263645.0 0.800 1059351.0 1021304.0 10489.0\n",
+ "2005 1340095.641 1133386.0 1.019 0.981 1315109.0 0.862 1112318.0 1154222.0 20836.0\n",
+ "2006 1407100.423 1237897.0 1.054 0.949 1335010.0 0.927 1167934.0 1297460.0 59563.0\n",
+ "2007 1477455.444 1329895.0 1.117 0.895 1322700.0 1.005 1226331.0 1458311.0 128416.0\n",
+ "2008 1551328.216 1330264.0 1.316 0.760 1178821.0 1.128 1287647.0 1639294.0 309030.0"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "def pp_cc_scenario(sample):\n",
+ " \"\"\"Recreate a U.S. PP Auto Cape Cod scenario (Exhibit III).\"\"\"\n",
+ " tri = cl.load_sample(sample)\n",
+ " reported = tri[\"Reported Claims\"]\n",
+ " paid = tri[\"Paid Claims\"]\n",
+ " premium = tri[\"Earned Premium\"].latest_diagonal\n",
+ " years = list(reported.origin.year)\n",
+ "\n",
+ " # Chapter 7 selection: five-year simple average reported development, 1.000\n",
+ " # tail; CDFs cumulated from age-to-age factors rounded to three decimals.\n",
+ " reported_dev = cl.TailConstant(tail=1.0, projection_period=0).fit_transform(\n",
+ " cl.Development(n_periods=5, average=\"simple\").fit_transform(reported))\n",
+ " reported_dev.ldf_ = reported_dev.ldf_.round(3)\n",
+ "\n",
+ " cc = cl.CapeCod().fit(reported_dev, sample_weight=premium)\n",
+ " apriori = float(cc.apriori_.to_frame().iloc[0, 0])\n",
+ "\n",
+ " cdf = np.maximum(\n",
+ " reported_dev.cdf_.to_frame(origin_as_datetime=False).values.flatten()[::-1], 1.0).round(3)\n",
+ " prem = col(premium)\n",
+ " reported_latest = col(reported.latest_diagonal)\n",
+ " used_up = prem / cdf\n",
+ " # CapeCod returns NaN IBNR for fully developed years (CDF = 1.000); coerce to 0.\n",
+ " ibnr = np.nan_to_num(col(cc.ibnr_))\n",
+ "\n",
+ " out = pd.DataFrame(index=years)\n",
+ " out[\"Earned Premium\"] = prem\n",
+ " out[\"Reported Claims\"] = reported_latest\n",
+ " out[\"CDF to Ultimate\"] = cdf.round(3)\n",
+ " out[\"% Reported\"] = (1 / cdf).round(3)\n",
+ " out[\"Used-Up Premium\"] = used_up.round(0)\n",
+ " out[\"Estimated Claim Ratio\"] = (reported_latest / used_up).round(3)\n",
+ " out[\"Expected Claims\"] = (prem * apriori).round(0)\n",
+ " out[\"Projected Ultimate\"] = col(cc.ultimate_).round(0)\n",
+ " out[\"IBNR\"] = ibnr.round(0)\n",
+ " return apriori, out\n",
+ "\n",
+ "\n",
+ "pp_scenarios = {\n",
+ " \"Steady-State\": \"friedland_uspp_auto_steady_state\",\n",
+ " \"Increasing Claim Ratios\": \"friedland_uspp_auto_increasing_claim\",\n",
+ " \"Increasing Case Outstanding Strength\": \"friedland_uspp_auto_increasing_case\",\n",
+ " \"Increasing Claim Ratios and Case Outstanding Strength\": \"friedland_uspp_increasing_claim_case\",\n",
+ "}\n",
+ "pp_results = {name: pp_cc_scenario(sample) for name, sample in pp_scenarios.items()}\n",
+ "for name, (apriori, table) in pp_results.items():\n",
+ " print(f\"{name} - all-years estimated claim ratio {apriori:.3f}\")\n",
+ " display(table)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "ae3834b5",
+ "metadata": {},
+ "source": [
+ "### Reconciliation to Friedland\n",
+ "\n",
+ "We reconcile the derived all-years claim ratio for all four scenarios, and the\n",
+ "estimated IBNR total for the two scenarios with clean sample data."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "id": "d9d8e326",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "pp_apriori = {name: apriori for name, (apriori, table) in pp_results.items()}\n",
+ "pp_ibnr = {name: table[\"IBNR\"].sum() for name, (apriori, table) in pp_results.items()}\n",
+ "\n",
+ "# All four scenarios reproduce the text's all-years estimated claim ratio.\n",
+ "assert np.isclose(pp_apriori[\"Steady-State\"], 0.700, atol=2e-3)\n",
+ "assert np.isclose(pp_apriori[\"Increasing Claim Ratios\"], 0.807, atol=2e-3)\n",
+ "assert np.isclose(pp_apriori[\"Increasing Case Outstanding Strength\"], 0.717, atol=2e-3)\n",
+ "assert np.isclose(pp_apriori[\"Increasing Claim Ratios and Case Outstanding Strength\"], 0.831, atol=2e-3)\n",
+ "\n",
+ "# Estimated IBNR reconciles for the two scenarios with clean sample data.\n",
+ "assert np.isclose(pp_ibnr[\"Steady-State\"], 438638, rtol=5e-3)\n",
+ "assert np.isclose(pp_ibnr[\"Increasing Claim Ratios\"], 505828, rtol=5e-3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "7a255f88",
+ "metadata": {},
+ "source": [
+ "## Exhibit IV - U.S. Auto (Impact of Change in Product Mix)\n",
+ "\n",
+ "Exhibit IV applies the Cape Cod method to a combined private-passenger and\n",
+ "commercial automobile portfolio under two scenarios (valued at 12/31/2008,\n",
+ "accident years 1999-2008):\n",
+ "\n",
+ "1. Steady-State (No Change in Product Mix)\n",
+ "2. Changing Product Mix (commercial auto growing faster than private passenger)\n",
+ "\n",
+ "The earned premium follows the text's Exhibit IV, Sheet 1 assumption: $2,000,000\n",
+ "for the first year (1999) with 5% annual growth, and in the change scenario\n",
+ "commercial auto grows 30% per year from 2005. The development selection is the\n",
+ "Chapter 7 five-year simple average with a 1.000 tail.\n",
+ "\n",
+ "Cape Cod generates the correct IBNR when the product mix is stable, but\n",
+ "understates it when the mix shifts, because the reporting pattern changes and the\n",
+ "method does not respond appropriately."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "id": "1bd48eed",
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Steady-State (No Change in Product Mix) - all-years estimated claim ratio 0.750\n"
+ ]
+ },
+ {
+ "data": {
+ "application/vnd.microsoft.datawrangler.viewer.v0+json": {
+ "columns": [
+ {
+ "name": "index",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Earned Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Reported Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "CDF to Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "% Reported",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Used-Up Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Estimated Claim Ratio",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Expected Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Projected Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "IBNR",
+ "rawType": "float64",
+ "type": "float"
+ }
+ ],
+ "ref": "6cb2cac5-0ac1-4cbe-96a7-62513038f1f4",
+ "rows": [
+ [
+ "1999",
+ "2000000.0",
+ "1500000.0",
+ "1.0",
+ "1.0",
+ "2000000.0",
+ "0.75",
+ "1500509.0",
+ "1500000.0",
+ "0.0"
+ ],
+ [
+ "2000",
+ "2100000.0",
+ "1575000.0",
+ "1.0",
+ "1.0",
+ "2100000.0",
+ "0.75",
+ "1575535.0",
+ "1575000.0",
+ "0.0"
+ ],
+ [
+ "2001",
+ "2205000.0",
+ "1653750.0",
+ "1.0",
+ "1.0",
+ "2205000.0",
+ "0.75",
+ "1654312.0",
+ "1653750.0",
+ "0.0"
+ ],
+ [
+ "2002",
+ "2315250.0",
+ "1736438.0",
+ "1.0",
+ "1.0",
+ "2315250.0",
+ "0.75",
+ "1737027.0",
+ "1736438.0",
+ "0.0"
+ ],
+ [
+ "2003",
+ "2431013.0",
+ "1814751.0",
+ "1.005",
+ "0.995",
+ "2418918.0",
+ "0.75",
+ "1823879.0",
+ "1823825.0",
+ "9074.0"
+ ],
+ [
+ "2004",
+ "2552563.0",
+ "1885068.0",
+ "1.016",
+ "0.984",
+ "2512365.0",
+ "0.75",
+ "1915072.0",
+ "1915329.0",
+ "30261.0"
+ ],
+ [
+ "2005",
+ "2680191.0",
+ "1948499.0",
+ "1.032",
+ "0.969",
+ "2597084.0",
+ "0.75",
+ "2010826.0",
+ "2011439.0",
+ "62940.0"
+ ],
+ [
+ "2006",
+ "2814201.0",
+ "1937577.0",
+ "1.09",
+ "0.917",
+ "2581836.0",
+ "0.75",
+ "2111367.0",
+ "2112126.0",
+ "174549.0"
+ ],
+ [
+ "2007",
+ "2954911.0",
+ "1852729.0",
+ "1.197",
+ "0.835",
+ "2468597.0",
+ "0.751",
+ "2216936.0",
+ "2217516.0",
+ "364787.0"
+ ],
+ [
+ "2008",
+ "3102656.0",
+ "1568393.0",
+ "1.484",
+ "0.674",
+ "2090739.0",
+ "0.75",
+ "2327782.0",
+ "2327823.0",
+ "759430.0"
+ ]
+ ],
+ "shape": {
+ "columns": 9,
+ "rows": 10
+ }
+ },
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Earned Premium | \n",
+ " Reported Claims | \n",
+ " CDF to Ultimate | \n",
+ " % Reported | \n",
+ " Used-Up Premium | \n",
+ " Estimated Claim Ratio | \n",
+ " Expected Claims | \n",
+ " Projected Ultimate | \n",
+ " IBNR | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 1999 | \n",
+ " 2000000.0 | \n",
+ " 1500000.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 2000000.0 | \n",
+ " 0.750 | \n",
+ " 1500509.0 | \n",
+ " 1500000.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2000 | \n",
+ " 2100000.0 | \n",
+ " 1575000.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 2100000.0 | \n",
+ " 0.750 | \n",
+ " 1575535.0 | \n",
+ " 1575000.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2001 | \n",
+ " 2205000.0 | \n",
+ " 1653750.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 2205000.0 | \n",
+ " 0.750 | \n",
+ " 1654312.0 | \n",
+ " 1653750.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2002 | \n",
+ " 2315250.0 | \n",
+ " 1736438.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 2315250.0 | \n",
+ " 0.750 | \n",
+ " 1737027.0 | \n",
+ " 1736438.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2003 | \n",
+ " 2431013.0 | \n",
+ " 1814751.0 | \n",
+ " 1.005 | \n",
+ " 0.995 | \n",
+ " 2418918.0 | \n",
+ " 0.750 | \n",
+ " 1823879.0 | \n",
+ " 1823825.0 | \n",
+ " 9074.0 | \n",
+ "
\n",
+ " \n",
+ " | 2004 | \n",
+ " 2552563.0 | \n",
+ " 1885068.0 | \n",
+ " 1.016 | \n",
+ " 0.984 | \n",
+ " 2512365.0 | \n",
+ " 0.750 | \n",
+ " 1915072.0 | \n",
+ " 1915329.0 | \n",
+ " 30261.0 | \n",
+ "
\n",
+ " \n",
+ " | 2005 | \n",
+ " 2680191.0 | \n",
+ " 1948499.0 | \n",
+ " 1.032 | \n",
+ " 0.969 | \n",
+ " 2597084.0 | \n",
+ " 0.750 | \n",
+ " 2010826.0 | \n",
+ " 2011439.0 | \n",
+ " 62940.0 | \n",
+ "
\n",
+ " \n",
+ " | 2006 | \n",
+ " 2814201.0 | \n",
+ " 1937577.0 | \n",
+ " 1.090 | \n",
+ " 0.917 | \n",
+ " 2581836.0 | \n",
+ " 0.750 | \n",
+ " 2111367.0 | \n",
+ " 2112126.0 | \n",
+ " 174549.0 | \n",
+ "
\n",
+ " \n",
+ " | 2007 | \n",
+ " 2954911.0 | \n",
+ " 1852729.0 | \n",
+ " 1.197 | \n",
+ " 0.835 | \n",
+ " 2468597.0 | \n",
+ " 0.751 | \n",
+ " 2216936.0 | \n",
+ " 2217516.0 | \n",
+ " 364787.0 | \n",
+ "
\n",
+ " \n",
+ " | 2008 | \n",
+ " 3102656.0 | \n",
+ " 1568393.0 | \n",
+ " 1.484 | \n",
+ " 0.674 | \n",
+ " 2090739.0 | \n",
+ " 0.750 | \n",
+ " 2327782.0 | \n",
+ " 2327823.0 | \n",
+ " 759430.0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Earned Premium Reported Claims CDF to Ultimate % Reported Used-Up Premium Estimated Claim Ratio Expected Claims Projected Ultimate IBNR\n",
+ "1999 2000000.0 1500000.0 1.000 1.000 2000000.0 0.750 1500509.0 1500000.0 0.0\n",
+ "2000 2100000.0 1575000.0 1.000 1.000 2100000.0 0.750 1575535.0 1575000.0 0.0\n",
+ "2001 2205000.0 1653750.0 1.000 1.000 2205000.0 0.750 1654312.0 1653750.0 0.0\n",
+ "2002 2315250.0 1736438.0 1.000 1.000 2315250.0 0.750 1737027.0 1736438.0 0.0\n",
+ "2003 2431013.0 1814751.0 1.005 0.995 2418918.0 0.750 1823879.0 1823825.0 9074.0\n",
+ "2004 2552563.0 1885068.0 1.016 0.984 2512365.0 0.750 1915072.0 1915329.0 30261.0\n",
+ "2005 2680191.0 1948499.0 1.032 0.969 2597084.0 0.750 2010826.0 2011439.0 62940.0\n",
+ "2006 2814201.0 1937577.0 1.090 0.917 2581836.0 0.750 2111367.0 2112126.0 174549.0\n",
+ "2007 2954911.0 1852729.0 1.197 0.835 2468597.0 0.751 2216936.0 2217516.0 364787.0\n",
+ "2008 3102656.0 1568393.0 1.484 0.674 2090739.0 0.750 2327782.0 2327823.0 759430.0"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Changing Product Mix - all-years estimated claim ratio 0.750\n"
+ ]
+ },
+ {
+ "data": {
+ "application/vnd.microsoft.datawrangler.viewer.v0+json": {
+ "columns": [
+ {
+ "name": "index",
+ "rawType": "int64",
+ "type": "integer"
+ },
+ {
+ "name": "Earned Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Reported Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "CDF to Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "% Reported",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Used-Up Premium",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Estimated Claim Ratio",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Expected Claims",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "Projected Ultimate",
+ "rawType": "float64",
+ "type": "float"
+ },
+ {
+ "name": "IBNR",
+ "rawType": "float64",
+ "type": "float"
+ }
+ ],
+ "ref": "5c8df658-c106-4bcc-9198-1337138ec1c3",
+ "rows": [
+ [
+ "1999",
+ "2000000.0",
+ "1500000.0",
+ "1.0",
+ "1.0",
+ "2000000.0",
+ "0.75",
+ "1499954.0",
+ "1500000.0",
+ "0.0"
+ ],
+ [
+ "2000",
+ "2100000.0",
+ "1575000.0",
+ "1.0",
+ "1.0",
+ "2100000.0",
+ "0.75",
+ "1574952.0",
+ "1575000.0",
+ "0.0"
+ ],
+ [
+ "2001",
+ "2205000.0",
+ "1653750.0",
+ "1.0",
+ "1.0",
+ "2205000.0",
+ "0.75",
+ "1653699.0",
+ "1653750.0",
+ "0.0"
+ ],
+ [
+ "2002",
+ "2315250.0",
+ "1736438.0",
+ "1.0",
+ "1.0",
+ "2315250.0",
+ "0.75",
+ "1736384.0",
+ "1736438.0",
+ "0.0"
+ ],
+ [
+ "2003",
+ "2431013.0",
+ "1814751.0",
+ "1.005",
+ "0.995",
+ "2418918.0",
+ "0.75",
+ "1823204.0",
+ "1823822.0",
+ "9071.0"
+ ],
+ [
+ "2004",
+ "2552563.0",
+ "1885068.0",
+ "1.016",
+ "0.984",
+ "2512365.0",
+ "0.75",
+ "1914363.0",
+ "1915317.0",
+ "30249.0"
+ ],
+ [
+ "2005",
+ "2999262.0",
+ "2193545.0",
+ "1.032",
+ "0.969",
+ "2906262.0",
+ "0.755",
+ "2249377.0",
+ "2263952.0",
+ "70407.0"
+ ],
+ [
+ "2006",
+ "3564016.0",
+ "2471446.0",
+ "1.09",
+ "0.917",
+ "3269739.0",
+ "0.756",
+ "2672930.0",
+ "2692420.0",
+ "220974.0"
+ ],
+ [
+ "2007",
+ "4281446.0",
+ "2680487.0",
+ "1.2",
+ "0.833",
+ "3567872.0",
+ "0.751",
+ "3210986.0",
+ "3216150.0",
+ "535663.0"
+ ],
+ [
+ "2008",
+ "5196516.0",
+ "2556695.0",
+ "1.5",
+ "0.667",
+ "3464344.0",
+ "0.738",
+ "3897267.0",
+ "3856268.0",
+ "1299573.0"
+ ]
+ ],
+ "shape": {
+ "columns": 9,
+ "rows": 10
+ }
+ },
+ "text/html": [
+ "\n",
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " Earned Premium | \n",
+ " Reported Claims | \n",
+ " CDF to Ultimate | \n",
+ " % Reported | \n",
+ " Used-Up Premium | \n",
+ " Estimated Claim Ratio | \n",
+ " Expected Claims | \n",
+ " Projected Ultimate | \n",
+ " IBNR | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 1999 | \n",
+ " 2000000.0 | \n",
+ " 1500000.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 2000000.0 | \n",
+ " 0.750 | \n",
+ " 1499954.0 | \n",
+ " 1500000.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2000 | \n",
+ " 2100000.0 | \n",
+ " 1575000.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 2100000.0 | \n",
+ " 0.750 | \n",
+ " 1574952.0 | \n",
+ " 1575000.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2001 | \n",
+ " 2205000.0 | \n",
+ " 1653750.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 2205000.0 | \n",
+ " 0.750 | \n",
+ " 1653699.0 | \n",
+ " 1653750.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2002 | \n",
+ " 2315250.0 | \n",
+ " 1736438.0 | \n",
+ " 1.000 | \n",
+ " 1.000 | \n",
+ " 2315250.0 | \n",
+ " 0.750 | \n",
+ " 1736384.0 | \n",
+ " 1736438.0 | \n",
+ " 0.0 | \n",
+ "
\n",
+ " \n",
+ " | 2003 | \n",
+ " 2431013.0 | \n",
+ " 1814751.0 | \n",
+ " 1.005 | \n",
+ " 0.995 | \n",
+ " 2418918.0 | \n",
+ " 0.750 | \n",
+ " 1823204.0 | \n",
+ " 1823822.0 | \n",
+ " 9071.0 | \n",
+ "
\n",
+ " \n",
+ " | 2004 | \n",
+ " 2552563.0 | \n",
+ " 1885068.0 | \n",
+ " 1.016 | \n",
+ " 0.984 | \n",
+ " 2512365.0 | \n",
+ " 0.750 | \n",
+ " 1914363.0 | \n",
+ " 1915317.0 | \n",
+ " 30249.0 | \n",
+ "
\n",
+ " \n",
+ " | 2005 | \n",
+ " 2999262.0 | \n",
+ " 2193545.0 | \n",
+ " 1.032 | \n",
+ " 0.969 | \n",
+ " 2906262.0 | \n",
+ " 0.755 | \n",
+ " 2249377.0 | \n",
+ " 2263952.0 | \n",
+ " 70407.0 | \n",
+ "
\n",
+ " \n",
+ " | 2006 | \n",
+ " 3564016.0 | \n",
+ " 2471446.0 | \n",
+ " 1.090 | \n",
+ " 0.917 | \n",
+ " 3269739.0 | \n",
+ " 0.756 | \n",
+ " 2672930.0 | \n",
+ " 2692420.0 | \n",
+ " 220974.0 | \n",
+ "
\n",
+ " \n",
+ " | 2007 | \n",
+ " 4281446.0 | \n",
+ " 2680487.0 | \n",
+ " 1.200 | \n",
+ " 0.833 | \n",
+ " 3567872.0 | \n",
+ " 0.751 | \n",
+ " 3210986.0 | \n",
+ " 3216150.0 | \n",
+ " 535663.0 | \n",
+ "
\n",
+ " \n",
+ " | 2008 | \n",
+ " 5196516.0 | \n",
+ " 2556695.0 | \n",
+ " 1.500 | \n",
+ " 0.667 | \n",
+ " 3464344.0 | \n",
+ " 0.738 | \n",
+ " 3897267.0 | \n",
+ " 3856268.0 | \n",
+ " 1299573.0 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " Earned Premium Reported Claims CDF to Ultimate % Reported Used-Up Premium Estimated Claim Ratio Expected Claims Projected Ultimate IBNR\n",
+ "1999 2000000.0 1500000.0 1.000 1.000 2000000.0 0.750 1499954.0 1500000.0 0.0\n",
+ "2000 2100000.0 1575000.0 1.000 1.000 2100000.0 0.750 1574952.0 1575000.0 0.0\n",
+ "2001 2205000.0 1653750.0 1.000 1.000 2205000.0 0.750 1653699.0 1653750.0 0.0\n",
+ "2002 2315250.0 1736438.0 1.000 1.000 2315250.0 0.750 1736384.0 1736438.0 0.0\n",
+ "2003 2431013.0 1814751.0 1.005 0.995 2418918.0 0.750 1823204.0 1823822.0 9071.0\n",
+ "2004 2552563.0 1885068.0 1.016 0.984 2512365.0 0.750 1914363.0 1915317.0 30249.0\n",
+ "2005 2999262.0 2193545.0 1.032 0.969 2906262.0 0.755 2249377.0 2263952.0 70407.0\n",
+ "2006 3564016.0 2471446.0 1.090 0.917 3269739.0 0.756 2672930.0 2692420.0 220974.0\n",
+ "2007 4281446.0 2680487.0 1.200 0.833 3567872.0 0.751 3210986.0 3216150.0 535663.0\n",
+ "2008 5196516.0 2556695.0 1.500 0.667 3464344.0 0.738 3897267.0 3856268.0 1299573.0"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "# Earned premium per the text's Exhibit IV, Sheet 1, Column 2 assumptions ($).\n",
+ "us_auto_premium = {\n",
+ " \"Steady-State (No Change in Product Mix)\": (\n",
+ " \"friedland_us_auto_steady_state\",\n",
+ " [2000000, 2100000, 2205000, 2315250, 2431013, 2552563, 2680191, 2814201, 2954911, 3102656]),\n",
+ " \"Changing Product Mix\": (\n",
+ " \"friedland_us_auto_chg_prod_mix\",\n",
+ " [2000000, 2100000, 2205000, 2315250, 2431013, 2552563, 2999262, 3564016, 4281446, 5196516]),\n",
+ "}\n",
+ "\n",
+ "\n",
+ "def us_auto_cc_scenario(sample, premium_vec):\n",
+ " \"\"\"Recreate a U.S. Auto product-mix Cape Cod scenario (Exhibit IV).\"\"\"\n",
+ " tri = cl.load_sample(sample)\n",
+ " reported = tri[\"Reported Claims\"]\n",
+ " years = list(reported.origin.year)\n",
+ "\n",
+ " # Chapter 7 selection: five-year simple average reported development, 1.000 tail.\n",
+ " reported_dev = cl.TailConstant(tail=1.0, projection_period=0).fit_transform(\n",
+ " cl.Development(n_periods=5, average=\"simple\").fit_transform(reported))\n",
+ " reported_dev.ldf_ = reported_dev.ldf_.round(3)\n",
+ "\n",
+ " # Earned premium is not carried in the sample; build it from the text's assumption.\n",
+ " premium = reported.latest_diagonal.copy()\n",
+ " premium.iloc[0, 0] = np.array(premium_vec, dtype=float).reshape(premium.shape)\n",
+ "\n",
+ " cc = cl.CapeCod().fit(reported_dev, sample_weight=premium)\n",
+ " apriori = float(cc.apriori_.to_frame().iloc[0, 0])\n",
+ "\n",
+ " cdf = np.maximum(\n",
+ " reported_dev.cdf_.to_frame(origin_as_datetime=False).values.flatten()[::-1], 1.0).round(3)\n",
+ " prem = np.array(premium_vec, dtype=float)\n",
+ " reported_latest = col(reported.latest_diagonal)\n",
+ " used_up = prem / cdf\n",
+ " ibnr = np.nan_to_num(col(cc.ibnr_))\n",
+ "\n",
+ " out = pd.DataFrame(index=years)\n",
+ " out[\"Earned Premium\"] = prem\n",
+ " out[\"Reported Claims\"] = reported_latest\n",
+ " out[\"CDF to Ultimate\"] = cdf.round(3)\n",
+ " out[\"% Reported\"] = (1 / cdf).round(3)\n",
+ " out[\"Used-Up Premium\"] = used_up.round(0)\n",
+ " out[\"Estimated Claim Ratio\"] = (reported_latest / used_up).round(3)\n",
+ " out[\"Expected Claims\"] = (prem * apriori).round(0)\n",
+ " out[\"Projected Ultimate\"] = col(cc.ultimate_).round(0)\n",
+ " out[\"IBNR\"] = ibnr.round(0)\n",
+ " return apriori, out\n",
+ "\n",
+ "\n",
+ "us_auto_results = {\n",
+ " name: us_auto_cc_scenario(sample, vec) for name, (sample, vec) in us_auto_premium.items()\n",
+ "}\n",
+ "for name, (apriori, table) in us_auto_results.items():\n",
+ " print(f\"{name} - all-years estimated claim ratio {apriori:.3f}\")\n",
+ " display(table)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "id": "099431d3",
+ "metadata": {},
+ "source": [
+ "### Reconciliation to Friedland\n",
+ "\n",
+ "Both scenarios derive a 75.0% all-years claim ratio. The steady-state IBNR\n",
+ "reconciles to the actual requirement, while the changing-product-mix IBNR is\n",
+ "understated relative to the actual, as the text describes."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "id": "b1e5e298",
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "us_apriori = {name: apriori for name, (apriori, table) in us_auto_results.items()}\n",
+ "us_ibnr = {name: table[\"IBNR\"].sum() for name, (apriori, table) in us_auto_results.items()}\n",
+ "\n",
+ "# Both scenarios derive the text's 75.0% all-years estimated claim ratio.\n",
+ "assert np.isclose(us_apriori[\"Steady-State (No Change in Product Mix)\"], 0.750, atol=2e-3)\n",
+ "assert np.isclose(us_apriori[\"Changing Product Mix\"], 0.750, atol=2e-3)\n",
+ "\n",
+ "# Steady-state reconciles to the actual IBNR requirement; the changing product mix\n",
+ "# understates it (the text's actual is 2,391,084).\n",
+ "assert np.isclose(us_ibnr[\"Steady-State (No Change in Product Mix)\"], 1394634, rtol=6e-3)\n",
+ "assert np.isclose(us_ibnr[\"Changing Product Mix\"], 2168000, rtol=6e-3)"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "chainladder (3.13.5)",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.13.5"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 5
+}
From eaac40039bebc61b13f5e47157a36ae70c53dfe4 Mon Sep 17 00:00:00 2001
From: priyam0k <87162535+priyam0k@users.noreply.github.com>
Date: Wed, 22 Jul 2026 02:48:12 +0530
Subject: [PATCH 2/6] docs(friedland): merge us_auto samples into one
Scenario-indexed dataset
Addresses review feedback: combine the three friedland_us_auto_* CSVs into a single friedland_us_auto sample with a Scenario index (mirroring the friedland_uspp merge), and carry Earned Premium natively so Chapter 10 Exhibit IV reads premium from the sample instead of hardcoding it. Removes the three now-unused individual files. Reconciliation is unchanged (75.0% claim ratio, both scenarios).
---
chainladder/utils/data/_manifest.py | 20 +--
chainladder/utils/data/friedland_us_auto.csv | 166 ++++++++++++++++++
.../data/friedland_us_auto_chg_prod_mix.csv | 56 ------
.../data/friedland_us_auto_incr_claim.csv | 56 ------
.../data/friedland_us_auto_steady_state.csv | 56 ------
docs/friedland/chapter_10.ipynb | 57 +++---
6 files changed, 196 insertions(+), 215 deletions(-)
create mode 100644 chainladder/utils/data/friedland_us_auto.csv
delete mode 100644 chainladder/utils/data/friedland_us_auto_chg_prod_mix.csv
delete mode 100644 chainladder/utils/data/friedland_us_auto_incr_claim.csv
delete mode 100644 chainladder/utils/data/friedland_us_auto_steady_state.csv
diff --git a/chainladder/utils/data/_manifest.py b/chainladder/utils/data/_manifest.py
index b3fb1307a..ac9d25284 100644
--- a/chainladder/utils/data/_manifest.py
+++ b/chainladder/utils/data/_manifest.py
@@ -181,25 +181,11 @@
"columns": ["Gross Reported Claims", "Net Reported Claims", "Net to Gross"],
"cumulative": True,
},
- "friedland_us_auto_chg_prod_mix": {
+ "friedland_us_auto": {
"origin": "Accident Year",
"development": "Calendar Year",
- "index": None,
- "columns": ["Paid Claims", "Reported Claims"],
- "cumulative": True,
- },
- "friedland_us_auto_incr_claim": {
- "origin": "Accident Year",
- "development": "Calendar Year",
- "index": None,
- "columns": ["Paid Claims", "Reported Claims"],
- "cumulative": True,
- },
- "friedland_us_auto_steady_state": {
- "origin": "Accident Year",
- "development": "Calendar Year",
- "index": None,
- "columns": ["Paid Claims", "Reported Claims"],
+ "index": ["Scenario"],
+ "columns": ["Paid Claims", "Reported Claims", "Earned Premium"],
"cumulative": True,
},
"friedland_us_industry_auto": {
diff --git a/chainladder/utils/data/friedland_us_auto.csv b/chainladder/utils/data/friedland_us_auto.csv
new file mode 100644
index 000000000..50d14dd8f
--- /dev/null
+++ b/chainladder/utils/data/friedland_us_auto.csv
@@ -0,0 +1,166 @@
+Accident Year,Calendar Year,Paid Claims,Reported Claims,Earned Premium,Scenario
+1999,1999,470000,1011000,2000000,Steady State
+1999,2000,865000,1254000,2000000,Steady State
+1999,2001,1124000,1377000,2000000,Steady State
+1999,2002,1300000,1454000,2000000,Steady State
+1999,2003,1400000,1477000,2000000,Steady State
+1999,2004,1446000,1493000,2000000,Steady State
+1999,2005,1469000,1500000,2000000,Steady State
+1999,2006,1477000,1500000,2000000,Steady State
+1999,2007,1492000,1500000,2000000,Steady State
+1999,2008,1500000,1500000,2000000,Steady State
+2000,2000,493500,1061550,2100000,Steady State
+2000,2001,908250,1316700,2100000,Steady State
+2000,2002,1180200,1445850,2100000,Steady State
+2000,2003,1365000,1526700,2100000,Steady State
+2000,2004,1470000,1550850,2100000,Steady State
+2000,2005,1518300,1567650,2100000,Steady State
+2000,2006,1542450,1575000,2100000,Steady State
+2000,2007,1550850,1575000,2100000,Steady State
+2000,2008,1566600,1575000,2100000,Steady State
+2001,2001,518175,1114628,2205000,Steady State
+2001,2002,953663,1382535,2205000,Steady State
+2001,2003,1239210,1518143,2205000,Steady State
+2001,2004,1433250,1603035,2205000,Steady State
+2001,2005,1543500,1628393,2205000,Steady State
+2001,2006,1594215,1646033,2205000,Steady State
+2001,2007,1619573,1653750,2205000,Steady State
+2001,2008,1628393,1653750,2205000,Steady State
+2002,2002,544084,1170359,2315250,Steady State
+2002,2003,1001346,1451662,2315250,Steady State
+2002,2004,1301171,1594050,2315250,Steady State
+2002,2005,1504913,1683187,2315250,Steady State
+2002,2006,1620675,1709812,2315250,Steady State
+2002,2007,1673926,1728334,2315250,Steady State
+2002,2008,1700551,1736438,2315250,Steady State
+2003,2003,571288,1228877,2431013,Steady State
+2003,2004,1051413,1524245,2431013,Steady State
+2003,2005,1366229,1673752,2431013,Steady State
+2003,2006,1580158,1767346,2431013,Steady State
+2003,2007,1701709,1795303,2431013,Steady State
+2003,2008,1757622,1814751,2431013,Steady State
+2004,2004,599852,1290321,2552563,Steady State
+2004,2005,1103984,1600457,2552563,Steady State
+2004,2006,1434540,1757440,2552563,Steady State
+2004,2007,1659166,1855713,2552563,Steady State
+2004,2008,1786794,1885068,2552563,Steady State
+2005,2005,629845,1354837,2680191,Steady State
+2005,2006,1159183,1680480,2680191,Steady State
+2005,2007,1506268,1845312,2680191,Steady State
+2005,2008,1742124,1948499,2680191,Steady State
+2006,2006,661337,1422579,2814201,Steady State
+2006,2007,1217142,1764504,2814201,Steady State
+2006,2008,1581581,1937577,2814201,Steady State
+2007,2007,694404,1493707,2954911,Steady State
+2007,2008,1277999,1852729,2954911,Steady State
+2008,2008,729124,1568393,3102656,Steady State
+1999,1999,294000,539000,2000000,Increasing Claim
+1999,2000,497000,630000,2000000,Increasing Claim
+1999,2001,588000,665000,2000000,Increasing Claim
+1999,2002,644000,686000,2000000,Increasing Claim
+1999,2003,672000,693000,2000000,Increasing Claim
+1999,2004,686000,693000,2000000,Increasing Claim
+1999,2005,693000,700000,2000000,Increasing Claim
+1999,2006,693000,700000,2000000,Increasing Claim
+1999,2007,700000,700000,2000000,Increasing Claim
+1999,2008,700000,700000,2000000,Increasing Claim
+2000,2000,308700,565950,2100000,Increasing Claim
+2000,2001,521850,611500,2100000,Increasing Claim
+2000,2002,617400,698250,2100000,Increasing Claim
+2000,2003,676200,720300,2100000,Increasing Claim
+2000,2004,705600,727650,2100000,Increasing Claim
+2000,2005,720300,727650,2100000,Increasing Claim
+2000,2006,727650,735000,2100000,Increasing Claim
+2000,2007,727650,735000,2100000,Increasing Claim
+2000,2008,735000,735000,2100000,Increasing Claim
+2001,2001,324135,594248,2205000,Increasing Claim
+2001,2002,547943,694575,2205000,Increasing Claim
+2001,2003,648270,733163,2205000,Increasing Claim
+2001,2004,710010,756315,2205000,Increasing Claim
+2001,2005,740880,764033,2205000,Increasing Claim
+2001,2006,756315,764033,2205000,Increasing Claim
+2001,2007,764033,771750,2205000,Increasing Claim
+2001,2008,764033,771750,2205000,Increasing Claim
+2002,2002,340342,623960,2315250,Increasing Claim
+2002,2003,575340,729304,2315250,Increasing Claim
+2002,2004,680684,769821,2315250,Increasing Claim
+2002,2005,745511,794131,2315250,Increasing Claim
+2002,2006,777924,802234,2315250,Increasing Claim
+2002,2007,794131,802234,2315250,Increasing Claim
+2002,2008,802234,810338,2315250,Increasing Claim
+2003,2003,357359,655158,2431013,Increasing Claim
+2003,2004,604107,765769,2431013,Increasing Claim
+2003,2005,714718,808312,2431013,Increasing Claim
+2003,2006,782786,833837,2431013,Increasing Claim
+2003,2007,816820,842346,2431013,Increasing Claim
+2003,2008,833837,842346,2431013,Increasing Claim
+2004,2004,428831,786189,2552563,Increasing Claim
+2004,2005,724928,918923,2552563,Increasing Claim
+2004,2006,857661,969974,2552563,Increasing Claim
+2004,2007,939343,1000605,2552563,Increasing Claim
+2004,2008,980184,1010815,2552563,Increasing Claim
+2005,2005,478414,877093,2680191,Increasing Claim
+2005,2006,808748,1025173,2680191,Increasing Claim
+2005,2007,956828,1082127,2680191,Increasing Claim
+2005,2008,1047955,1116300,2680191,Increasing Claim
+2006,2006,531884,975121,2814201,Increasing Claim
+2006,2007,899137,1139751,2814201,Increasing Claim
+2006,2008,1063768,1203071,2814201,Increasing Claim
+2007,2007,589505,1080759,2954911,Increasing Claim
+2007,2008,996544,1263224,2954911,Increasing Claim
+2008,2008,651558,1194523,3102656,Increasing Claim
+1999,1999,470000,1011000,2000000,Changing Product Mix
+1999,2000,865000,1254000,2000000,Changing Product Mix
+1999,2001,1124000,1377000,2000000,Changing Product Mix
+1999,2002,1300000,1454000,2000000,Changing Product Mix
+1999,2003,1400000,1477000,2000000,Changing Product Mix
+1999,2004,1446000,1493000,2000000,Changing Product Mix
+1999,2005,1469000,1500000,2000000,Changing Product Mix
+1999,2006,1477000,1500000,2000000,Changing Product Mix
+1999,2007,1492000,1500000,2000000,Changing Product Mix
+1999,2008,1500000,1500000,2000000,Changing Product Mix
+2000,2000,493500,1061550,2100000,Changing Product Mix
+2000,2001,908250,1316700,2100000,Changing Product Mix
+2000,2002,1180200,1445850,2100000,Changing Product Mix
+2000,2003,1365000,1526700,2100000,Changing Product Mix
+2000,2004,1470000,1550850,2100000,Changing Product Mix
+2000,2005,1518300,1567650,2100000,Changing Product Mix
+2000,2006,1542450,1575000,2100000,Changing Product Mix
+2000,2007,1550850,1575000,2100000,Changing Product Mix
+2000,2008,1566600,1575000,2100000,Changing Product Mix
+2001,2001,518175,1114628,2205000,Changing Product Mix
+2001,2002,953663,1382535,2205000,Changing Product Mix
+2001,2003,1239210,1518143,2205000,Changing Product Mix
+2001,2004,1433250,1603035,2205000,Changing Product Mix
+2001,2005,1543500,1628393,2205000,Changing Product Mix
+2001,2006,1594215,1646033,2205000,Changing Product Mix
+2001,2007,1619573,1653750,2205000,Changing Product Mix
+2001,2008,1628393,1653750,2205000,Changing Product Mix
+2002,2002,544084,1170359,2315250,Changing Product Mix
+2002,2003,1001346,1451662,2315250,Changing Product Mix
+2002,2004,1301171,1594050,2315250,Changing Product Mix
+2002,2005,1504913,1683187,2315250,Changing Product Mix
+2002,2006,1620675,1709812,2315250,Changing Product Mix
+2002,2007,1673926,1728334,2315250,Changing Product Mix
+2002,2008,1700551,1736438,2315250,Changing Product Mix
+2003,2003,571288,1228877,2431013,Changing Product Mix
+2003,2004,1051413,1524245,2431013,Changing Product Mix
+2003,2005,1366229,1673752,2431013,Changing Product Mix
+2003,2006,1580158,1767346,2431013,Changing Product Mix
+2003,2007,1701709,1795303,2431013,Changing Product Mix
+2003,2008,1757622,1814751,2431013,Changing Product Mix
+2004,2004,599852,1290321,2552563,Changing Product Mix
+2004,2005,1103984,1600457,2552563,Changing Product Mix
+2004,2006,1434540,1757440,2552563,Changing Product Mix
+2004,2007,1659166,1855713,2552563,Changing Product Mix
+2004,2008,1786794,1885068,2552563,Changing Product Mix
+2005,2005,686001,1505438,2999262,Changing Product Mix
+2005,2006,1276601,1879580,2999262,Changing Product Mix
+2005,2007,1677289,2072490,2999262,Changing Product Mix
+2005,2008,1951435,2193545,2999262,Changing Product Mix
+2006,2006,793305,1776491,3564016,Changing Product Mix
+2006,2007,1493074,2232389,3564016,Changing Product Mix
+2006,2008,1983482,2471446,3564016,Changing Product Mix
+2007,2007,927874,2119832,4281446,Changing Product Mix
+2007,2008,1766164,2680487,4281446,Changing Product Mix
+2008,2008,1097644,2556695,5196516,Changing Product Mix
diff --git a/chainladder/utils/data/friedland_us_auto_chg_prod_mix.csv b/chainladder/utils/data/friedland_us_auto_chg_prod_mix.csv
deleted file mode 100644
index 828a88e39..000000000
--- a/chainladder/utils/data/friedland_us_auto_chg_prod_mix.csv
+++ /dev/null
@@ -1,56 +0,0 @@
-Accident Year,Calendar Year,Paid Claims,Reported Claims
-1999,1999,470000,1011000
-1999,2000,865000,1254000
-1999,2001,1124000,1377000
-1999,2002,1300000,1454000
-1999,2003,1400000,1477000
-1999,2004,1446000,1493000
-1999,2005,1469000,1500000
-1999,2006,1477000,1500000
-1999,2007,1492000,1500000
-1999,2008,1500000,1500000
-2000,2000,493500,1061550
-2000,2001,908250,1316700
-2000,2002,1180200,1445850
-2000,2003,1365000,1526700
-2000,2004,1470000,1550850
-2000,2005,1518300,1567650
-2000,2006,1542450,1575000
-2000,2007,1550850,1575000
-2000,2008,1566600,1575000
-2001,2001,518175,1114628
-2001,2002,953663,1382535
-2001,2003,1239210,1518143
-2001,2004,1433250,1603035
-2001,2005,1543500,1628393
-2001,2006,1594215,1646033
-2001,2007,1619573,1653750
-2001,2008,1628393,1653750
-2002,2002,544084,1170359
-2002,2003,1001346,1451662
-2002,2004,1301171,1594050
-2002,2005,1504913,1683187
-2002,2006,1620675,1709812
-2002,2007,1673926,1728334
-2002,2008,1700551,1736438
-2003,2003,571288,1228877
-2003,2004,1051413,1524245
-2003,2005,1366229,1673752
-2003,2006,1580158,1767346
-2003,2007,1701709,1795303
-2003,2008,1757622,1814751
-2004,2004,599852,1290321
-2004,2005,1103984,1600457
-2004,2006,1434540,1757440
-2004,2007,1659166,1855713
-2004,2008,1786794,1885068
-2005,2005,686001,1505438
-2005,2006,1276601,1879580
-2005,2007,1677289,2072490
-2005,2008,1951435,2193545
-2006,2006,793305,1776491
-2006,2007,1493074,2232389
-2006,2008,1983482,2471446
-2007,2007,927874,2119832
-2007,2008,1766164,2680487
-2008,2008,1097644,2556695
diff --git a/chainladder/utils/data/friedland_us_auto_incr_claim.csv b/chainladder/utils/data/friedland_us_auto_incr_claim.csv
deleted file mode 100644
index ae39709cb..000000000
--- a/chainladder/utils/data/friedland_us_auto_incr_claim.csv
+++ /dev/null
@@ -1,56 +0,0 @@
-Accident Year,Calendar Year,Paid Claims,Reported Claims
-1999,1999,294000,539000
-1999,2000,497000,630000
-1999,2001,588000,665000
-1999,2002,644000,686000
-1999,2003,672000,693000
-1999,2004,686000,693000
-1999,2005,693000,700000
-1999,2006,693000,700000
-1999,2007,700000,700000
-1999,2008,700000,700000
-2000,2000,308700,565950
-2000,2001,521850,611500
-2000,2002,617400,698250
-2000,2003,676200,720300
-2000,2004,705600,727650
-2000,2005,720300,727650
-2000,2006,727650,735000
-2000,2007,727650,735000
-2000,2008,735000,735000
-2001,2001,324135,594248
-2001,2002,547943,694575
-2001,2003,648270,733163
-2001,2004,710010,756315
-2001,2005,740880,764033
-2001,2006,756315,764033
-2001,2007,764033,771750
-2001,2008,764033,771750
-2002,2002,340342,623960
-2002,2003,575340,729304
-2002,2004,680684,769821
-2002,2005,745511,794131
-2002,2006,777924,802234
-2002,2007,794131,802234
-2002,2008,802234,810338
-2003,2003,357359,655158
-2003,2004,604107,765769
-2003,2005,714718,808312
-2003,2006,782786,833837
-2003,2007,816820,842346
-2003,2008,833837,842346
-2004,2004,428831,786189
-2004,2005,724928,918923
-2004,2006,857661,969974
-2004,2007,939343,1000605
-2004,2008,980184,1010815
-2005,2005,478414,877093
-2005,2006,808748,1025173
-2005,2007,956828,1082127
-2005,2008,1047955,1116300
-2006,2006,531884,975121
-2006,2007,899137,1139751
-2006,2008,1063768,1203071
-2007,2007,589505,1080759
-2007,2008,996544,1263224
-2008,2008,651558,1194523
diff --git a/chainladder/utils/data/friedland_us_auto_steady_state.csv b/chainladder/utils/data/friedland_us_auto_steady_state.csv
deleted file mode 100644
index b7730076f..000000000
--- a/chainladder/utils/data/friedland_us_auto_steady_state.csv
+++ /dev/null
@@ -1,56 +0,0 @@
-Accident Year,Calendar Year,Paid Claims,Reported Claims
-1999,1999,470000,1011000
-1999,2000,865000,1254000
-1999,2001,1124000,1377000
-1999,2002,1300000,1454000
-1999,2003,1400000,1477000
-1999,2004,1446000,1493000
-1999,2005,1469000,1500000
-1999,2006,1477000,1500000
-1999,2007,1492000,1500000
-1999,2008,1500000,1500000
-2000,2000,493500,1061550
-2000,2001,908250,1316700
-2000,2002,1180200,1445850
-2000,2003,1365000,1526700
-2000,2004,1470000,1550850
-2000,2005,1518300,1567650
-2000,2006,1542450,1575000
-2000,2007,1550850,1575000
-2000,2008,1566600,1575000
-2001,2001,518175,1114628
-2001,2002,953663,1382535
-2001,2003,1239210,1518143
-2001,2004,1433250,1603035
-2001,2005,1543500,1628393
-2001,2006,1594215,1646033
-2001,2007,1619573,1653750
-2001,2008,1628393,1653750
-2002,2002,544084,1170359
-2002,2003,1001346,1451662
-2002,2004,1301171,1594050
-2002,2005,1504913,1683187
-2002,2006,1620675,1709812
-2002,2007,1673926,1728334
-2002,2008,1700551,1736438
-2003,2003,571288,1228877
-2003,2004,1051413,1524245
-2003,2005,1366229,1673752
-2003,2006,1580158,1767346
-2003,2007,1701709,1795303
-2003,2008,1757622,1814751
-2004,2004,599852,1290321
-2004,2005,1103984,1600457
-2004,2006,1434540,1757440
-2004,2007,1659166,1855713
-2004,2008,1786794,1885068
-2005,2005,629845,1354837
-2005,2006,1159183,1680480
-2005,2007,1506268,1845312
-2005,2008,1742124,1948499
-2006,2006,661337,1422579
-2006,2007,1217142,1764504
-2006,2008,1581581,1937577
-2007,2007,694404,1493707
-2007,2008,1277999,1852729
-2008,2008,729124,1568393
diff --git a/docs/friedland/chapter_10.ipynb b/docs/friedland/chapter_10.ipynb
index 0d6892e27..ab5fa5e6b 100644
--- a/docs/friedland/chapter_10.ipynb
+++ b/docs/friedland/chapter_10.ipynb
@@ -135,7 +135,7 @@
"type": "float"
}
],
- "ref": "31ec5da6-208f-452e-9292-68ddec23feca",
+ "ref": "4ac13023-73ec-4f62-a5ad-0fe3cc8121ca",
"rows": [
[
"1998",
@@ -506,7 +506,7 @@
"type": "float"
}
],
- "ref": "84758c07-b7d9-43fd-a1c9-8f6cf348970c",
+ "ref": "0ac2458f-16fa-4f59-94e1-26f4695200e0",
"rows": [
[
"1998",
@@ -865,7 +865,7 @@
"type": "float"
}
],
- "ref": "8ed2506b-e250-4402-ba44-f2d9c0913772",
+ "ref": "e7c7c0b5-2aa2-49e0-9a53-008e24a513e4",
"rows": [
[
"1998",
@@ -1252,7 +1252,7 @@
"type": "float"
}
],
- "ref": "ea921f1f-836d-4f05-a6d9-a49a74e1aeec",
+ "ref": "fab06e41-5aa1-4da4-ac4e-c8a1928382a4",
"rows": [
[
"1998",
@@ -1758,7 +1758,7 @@
"type": "float"
}
],
- "ref": "d6c5afd3-deae-448a-8916-f392345dde55",
+ "ref": "c10e730b-41cd-4f1b-a938-2929bd524767",
"rows": [
[
"1998",
@@ -2139,7 +2139,7 @@
"type": "float"
}
],
- "ref": "7dff0ed7-7664-4efa-9d4a-b46f65b94680",
+ "ref": "a944af79-41d6-4379-9972-d877c267cf58",
"rows": [
[
"1998",
@@ -2511,7 +2511,7 @@
"type": "float"
}
],
- "ref": "a564d1bd-9753-4b7e-a5bb-a38d1f12ca62",
+ "ref": "2fef2c48-dda0-4285-a377-3c913f4942d2",
"rows": [
[
"1998",
@@ -2858,7 +2858,7 @@
"type": "float"
}
],
- "ref": "fea2b219-c282-4988-88c9-389c7544322e",
+ "ref": "27b85f58-ce3d-4f3c-b1c0-6dd3340deab7",
"rows": [
[
"1998",
@@ -3272,7 +3272,7 @@
"type": "float"
}
],
- "ref": "632ebdc9-48aa-423d-b41f-56457218760c",
+ "ref": "72881216-848a-48fc-bdd8-923ca1088b36",
"rows": [
[
"1999",
@@ -3634,7 +3634,7 @@
"type": "float"
}
],
- "ref": "f212e16b-c2e5-496a-a506-721a740b073f",
+ "ref": "76395ea6-8059-44e5-a20d-943bd86adbb5",
"rows": [
[
"1999",
@@ -3996,7 +3996,7 @@
"type": "float"
}
],
- "ref": "6954be96-0e5a-403d-9a92-bf03a8f13fa5",
+ "ref": "104a91dd-f092-4fe6-8212-c50c38f568d3",
"rows": [
[
"1999",
@@ -4358,7 +4358,7 @@
"type": "float"
}
],
- "ref": "fa226c65-6e26-497f-8a63-b6ea81aae312",
+ "ref": "527050b9-f7f9-4e7d-a9ac-5407dc340005",
"rows": [
[
"1999",
@@ -4834,7 +4834,7 @@
"type": "float"
}
],
- "ref": "6cb2cac5-0ac1-4cbe-96a7-62513038f1f4",
+ "ref": "3eb3309c-c0cf-4dc0-b440-f972d898f12a",
"rows": [
[
"1999",
@@ -5196,7 +5196,7 @@
"type": "float"
}
],
- "ref": "5c8df658-c106-4bcc-9198-1337138ec1c3",
+ "ref": "70456411-695a-476e-becd-900844635cb2",
"rows": [
[
"1999",
@@ -5498,21 +5498,21 @@
}
],
"source": [
- "# Earned premium per the text's Exhibit IV, Sheet 1, Column 2 assumptions ($).\n",
- "us_auto_premium = {\n",
- " \"Steady-State (No Change in Product Mix)\": (\n",
- " \"friedland_us_auto_steady_state\",\n",
- " [2000000, 2100000, 2205000, 2315250, 2431013, 2552563, 2680191, 2814201, 2954911, 3102656]),\n",
- " \"Changing Product Mix\": (\n",
- " \"friedland_us_auto_chg_prod_mix\",\n",
- " [2000000, 2100000, 2205000, 2315250, 2431013, 2552563, 2999262, 3564016, 4281446, 5196516]),\n",
+ "# The friedland_us_auto sample carries all scenarios under a Scenario index, with\n",
+ "# earned premium per the text's Exhibit IV, Sheet 1 assumptions. Select the two\n",
+ "# product-mix scenarios by label.\n",
+ "us_auto = cl.load_sample(\"friedland_us_auto\")\n",
+ "us_auto_scenarios = {\n",
+ " \"Steady-State (No Change in Product Mix)\": \"Steady State\",\n",
+ " \"Changing Product Mix\": \"Changing Product Mix\",\n",
"}\n",
"\n",
"\n",
- "def us_auto_cc_scenario(sample, premium_vec):\n",
+ "def us_auto_cc_scenario(scenario):\n",
" \"\"\"Recreate a U.S. Auto product-mix Cape Cod scenario (Exhibit IV).\"\"\"\n",
- " tri = cl.load_sample(sample)\n",
+ " tri = us_auto.loc[scenario]\n",
" reported = tri[\"Reported Claims\"]\n",
+ " premium = tri[\"Earned Premium\"].latest_diagonal\n",
" years = list(reported.origin.year)\n",
"\n",
" # Chapter 7 selection: five-year simple average reported development, 1.000 tail.\n",
@@ -5520,18 +5520,15 @@
" cl.Development(n_periods=5, average=\"simple\").fit_transform(reported))\n",
" reported_dev.ldf_ = reported_dev.ldf_.round(3)\n",
"\n",
- " # Earned premium is not carried in the sample; build it from the text's assumption.\n",
- " premium = reported.latest_diagonal.copy()\n",
- " premium.iloc[0, 0] = np.array(premium_vec, dtype=float).reshape(premium.shape)\n",
- "\n",
" cc = cl.CapeCod().fit(reported_dev, sample_weight=premium)\n",
" apriori = float(cc.apriori_.to_frame().iloc[0, 0])\n",
"\n",
" cdf = np.maximum(\n",
" reported_dev.cdf_.to_frame(origin_as_datetime=False).values.flatten()[::-1], 1.0).round(3)\n",
- " prem = np.array(premium_vec, dtype=float)\n",
+ " prem = col(premium)\n",
" reported_latest = col(reported.latest_diagonal)\n",
" used_up = prem / cdf\n",
+ " # CapeCod returns NaN IBNR for fully developed years (CDF = 1.000); coerce to 0.\n",
" ibnr = np.nan_to_num(col(cc.ibnr_))\n",
"\n",
" out = pd.DataFrame(index=years)\n",
@@ -5548,7 +5545,7 @@
"\n",
"\n",
"us_auto_results = {\n",
- " name: us_auto_cc_scenario(sample, vec) for name, (sample, vec) in us_auto_premium.items()\n",
+ " label: us_auto_cc_scenario(scenario) for label, scenario in us_auto_scenarios.items()\n",
"}\n",
"for name, (apriori, table) in us_auto_results.items():\n",
" print(f\"{name} - all-years estimated claim ratio {apriori:.3f}\")\n",
From 6e13104630aed4c7e887a0dbf45688cbfe5f1ac8 Mon Sep 17 00:00:00 2001
From: priyam0k <87162535+priyam0k@users.noreply.github.com>
Date: Sun, 2 Aug 2026 00:02:51 +0530
Subject: [PATCH 3/6] docs(friedland): source ch10 exhibit tables from
model_diagnostics
Replace manual cdf_/latest_diagonal/ultimate_/ibnr_ extraction with cl.model_diagnostics for Exhibit I and the Exhibit III/IV scenario helpers. Values are identical; all reconciliation asserts still pass. Addresses Henry's review note on #588.
---
docs/friedland/chapter_10.ipynb | 32 ++++++++++++++++++--------------
1 file changed, 18 insertions(+), 14 deletions(-)
diff --git a/docs/friedland/chapter_10.ipynb b/docs/friedland/chapter_10.ipynb
index ab5fa5e6b..079089c38 100644
--- a/docs/friedland/chapter_10.ipynb
+++ b/docs/friedland/chapter_10.ipynb
@@ -420,9 +420,11 @@
"ia_cc = cl.CapeCod().fit(ia_reported_dev, sample_weight=ia_premium)\n",
"ia_apriori = float(ia_cc.apriori_.to_frame().iloc[0, 0])\n",
"\n",
- "ia_cdf = ia_reported_dev.cdf_.to_frame(origin_as_datetime=False).values.flatten()[::-1]\n",
+ "# model_diagnostics packages Latest, CDF, Ultimate, and IBNR by accident year.\n",
+ "ia_diag = cl.model_diagnostics(ia_cc)\n",
+ "ia_cdf = col(ia_diag[\"CDF\"])\n",
"ia_pct_reported = 1 / ia_cdf\n",
- "ia_reported_latest = col(ia_reported.latest_diagonal)\n",
+ "ia_reported_latest = col(ia_diag[\"Latest\"])\n",
"ia_used_up = col(ia_premium) * ia_pct_reported\n",
"\n",
"sheet1 = pd.DataFrame(index=ia_years)\n",
@@ -791,9 +793,9 @@
"ia_pct_unreported = 1 - ia_pct_reported\n",
"# CapeCod returns NaN IBNR for fully developed years (CDF = 1.000); the text\n",
"# shows these as zero, so coerce NaN to 0.\n",
- "ia_ibnr = np.nan_to_num(col(ia_cc.ibnr_))\n",
+ "ia_ibnr = np.nan_to_num(col(ia_diag[\"IBNR\"]))\n",
"ia_expected_unreported = ia_ibnr\n",
- "ia_ult = col(ia_cc.ultimate_)\n",
+ "ia_ult = col(ia_diag[\"Ultimate\"])\n",
"\n",
"sheet2 = pd.DataFrame(index=ia_years)\n",
"sheet2[\"Earned Premium\"] = col(ia_premium)\n",
@@ -4677,13 +4679,14 @@
" cc = cl.CapeCod().fit(reported_dev, sample_weight=premium)\n",
" apriori = float(cc.apriori_.to_frame().iloc[0, 0])\n",
"\n",
- " cdf = np.maximum(\n",
- " reported_dev.cdf_.to_frame(origin_as_datetime=False).values.flatten()[::-1], 1.0).round(3)\n",
+ " # model_diagnostics packages Latest, CDF, Ultimate, and IBNR by accident year.\n",
+ " diag = cl.model_diagnostics(cc)\n",
+ " cdf = np.maximum(col(diag[\"CDF\"]), 1.0).round(3)\n",
" prem = col(premium)\n",
- " reported_latest = col(reported.latest_diagonal)\n",
+ " reported_latest = col(diag[\"Latest\"])\n",
" used_up = prem / cdf\n",
" # CapeCod returns NaN IBNR for fully developed years (CDF = 1.000); coerce to 0.\n",
- " ibnr = np.nan_to_num(col(cc.ibnr_))\n",
+ " ibnr = np.nan_to_num(col(diag[\"IBNR\"]))\n",
"\n",
" out = pd.DataFrame(index=years)\n",
" out[\"Earned Premium\"] = prem\n",
@@ -4693,7 +4696,7 @@
" out[\"Used-Up Premium\"] = used_up.round(0)\n",
" out[\"Estimated Claim Ratio\"] = (reported_latest / used_up).round(3)\n",
" out[\"Expected Claims\"] = (prem * apriori).round(0)\n",
- " out[\"Projected Ultimate\"] = col(cc.ultimate_).round(0)\n",
+ " out[\"Projected Ultimate\"] = col(diag[\"Ultimate\"]).round(0)\n",
" out[\"IBNR\"] = ibnr.round(0)\n",
" return apriori, out\n",
"\n",
@@ -5523,13 +5526,14 @@
" cc = cl.CapeCod().fit(reported_dev, sample_weight=premium)\n",
" apriori = float(cc.apriori_.to_frame().iloc[0, 0])\n",
"\n",
- " cdf = np.maximum(\n",
- " reported_dev.cdf_.to_frame(origin_as_datetime=False).values.flatten()[::-1], 1.0).round(3)\n",
+ " # model_diagnostics packages Latest, CDF, Ultimate, and IBNR by accident year.\n",
+ " diag = cl.model_diagnostics(cc)\n",
+ " cdf = np.maximum(col(diag[\"CDF\"]), 1.0).round(3)\n",
" prem = col(premium)\n",
- " reported_latest = col(reported.latest_diagonal)\n",
+ " reported_latest = col(diag[\"Latest\"])\n",
" used_up = prem / cdf\n",
" # CapeCod returns NaN IBNR for fully developed years (CDF = 1.000); coerce to 0.\n",
- " ibnr = np.nan_to_num(col(cc.ibnr_))\n",
+ " ibnr = np.nan_to_num(col(diag[\"IBNR\"]))\n",
"\n",
" out = pd.DataFrame(index=years)\n",
" out[\"Earned Premium\"] = prem\n",
@@ -5539,7 +5543,7 @@
" out[\"Used-Up Premium\"] = used_up.round(0)\n",
" out[\"Estimated Claim Ratio\"] = (reported_latest / used_up).round(3)\n",
" out[\"Expected Claims\"] = (prem * apriori).round(0)\n",
- " out[\"Projected Ultimate\"] = col(cc.ultimate_).round(0)\n",
+ " out[\"Projected Ultimate\"] = col(diag[\"Ultimate\"]).round(0)\n",
" out[\"IBNR\"] = ibnr.round(0)\n",
" return apriori, out\n",
"\n",
From 110c2bcb2cb5591267fe99b0495347921aaf68fd Mon Sep 17 00:00:00 2001
From: priyam0k <87162535+priyam0k@users.noreply.github.com>
Date: Sun, 2 Aug 2026 00:27:13 +0530
Subject: [PATCH 4/6] fix(friedland): floor reported CDF before CapeCod in ch10
Exhibit II
The XYZ reported pattern has cumulative CDFs below 1.0 at mature ages. CapeCod was fitting the unfloored pattern, so the derived apriori came out 0.707 instead of the text's 0.708. Floor the cumulative CDF at 1.0 (the same basis the sheet uses for used-up premium) before fitting; apriori is now 0.708 and the ultimate reconciles to 504,290. Addresses the Cursor Bugbot finding on #1180.
---
docs/friedland/chapter_10.ipynb | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/docs/friedland/chapter_10.ipynb b/docs/friedland/chapter_10.ipynb
index 079089c38..51c33596f 100644
--- a/docs/friedland/chapter_10.ipynb
+++ b/docs/friedland/chapter_10.ipynb
@@ -1669,7 +1669,14 @@
"xyz_adj_tri = xyz_reported.copy()\n",
"xyz_adj_tri.values = xyz_adj_tri.values * adj_factor[None, None, :, None]\n",
"xyz_adj_dev = xyz_adj_tri.copy()\n",
- "xyz_adj_dev.ldf_ = xyz_reported_dev.ldf_\n",
+ "# Friedland floors the reported CDF at 1.0 (caps %reported at 100%); apply the\n",
+ "# same floor to the pattern CapeCod fits so its apriori reconciles to the sheet.\n",
+ "floored_cdf = np.maximum(xyz_reported_dev.cdf_.values, 1.0)\n",
+ "floored_ldf = xyz_reported_dev.ldf_.copy()\n",
+ "floored_ldf_vals = floored_cdf.copy()\n",
+ "floored_ldf_vals[..., :-1] = floored_cdf[..., :-1] / floored_cdf[..., 1:]\n",
+ "floored_ldf.values = floored_ldf_vals\n",
+ "xyz_adj_dev.ldf_ = floored_ldf\n",
"onlevel_diag = xyz_premium.copy()\n",
"onlevel_diag.values = onlevel_diag.values * onlevel_adj[None, None, :, None]\n",
"xyz_cc = cl.CapeCod().fit(xyz_adj_dev, sample_weight=onlevel_diag)\n",
From 721417b5d9e66186fbc20d58470c36dbbccd047b Mon Sep 17 00:00:00 2001
From: priyam0k <87162535+priyam0k@users.noreply.github.com>
Date: Sun, 2 Aug 2026 00:49:37 +0530
Subject: [PATCH 5/6] docs(friedland): derive ch10 Exhibit II factors via
ParallelogramOLF/CapeCod pipeline
Replace the hardcoded on-level/trend/tort arrays in Exhibit II Sheet 1 with a cl.Pipeline: ParallelogramOLF (vertical_line=True) for on-level premium and tort reform, DevelopmentConstant for the floored Chapter 7 CDF, and CapeCod(trend=0.0342) for the pure-premium trend. Derived factors reproduce the text exactly; apriori 0.708, ultimate 504,284, all reconciliation asserts pass. The DevelopmentConstant floor subsumes the earlier standalone floor fix. Addresses Henry's second review nitpick on #588.
---
docs/friedland/chapter_10.ipynb | 71 ++++++++++++++++++++-------------
1 file changed, 43 insertions(+), 28 deletions(-)
diff --git a/docs/friedland/chapter_10.ipynb b/docs/friedland/chapter_10.ipynb
index 51c33596f..33f849973 100644
--- a/docs/friedland/chapter_10.ipynb
+++ b/docs/friedland/chapter_10.ipynb
@@ -1176,11 +1176,13 @@
"source": [
"### Development of expected claim ratio\n",
"\n",
- "This recreates *Exhibit II, Sheet 1*. The all-years apriori is derived through the\n",
- "`CapeCod` estimator, fit on an adjusted reported triangle (each origin scaled by\n",
- "its trend and tort-reform factors, which leaves the age-to-age factors and hence\n",
- "the development pattern unchanged) with on-level premium as the exposure. The\n",
- "resulting 70.8% adjusted claim ratio is detrended back per year in Column (15)."
+ "This recreates *Exhibit II, Sheet 1*. The on-level and tort-reform factors are\n",
+ "produced by `ParallelogramOLF` from the text's rate-change and reform histories.\n",
+ "The all-years apriori is then derived through a `Pipeline` that applies the\n",
+ "tort-reform on-level factors, develops the reported claims on the floored\n",
+ "Chapter 7 pattern (`DevelopmentConstant`), and fits `CapeCod` with the\n",
+ "pure-premium trend, using on-level premium as the exposure. The resulting 70.8%\n",
+ "adjusted claim ratio is detrended back per year in Column (15)."
]
},
{
@@ -1646,13 +1648,31 @@
" xyz_reported_dev = cl.read_json(f.read())\n",
"xyz_reported_dev.ldf_ = xyz_reported_dev.ldf_.round(3)\n",
"\n",
- "# Adjustment factors from the text (Exhibit II, Sheet 1).\n",
- "# On-level premium adjustment (col 3), pure-premium trend (col 7), tort reform (col 8).\n",
- "onlevel_adj = np.array([0.989, 0.970, 0.951, 0.932, 0.914, 0.870, 0.810, 0.704, 0.640, 0.800, 1.000])\n",
- "pp_trend = np.array([1.400, 1.354, 1.309, 1.266, 1.224, 1.183, 1.144, 1.106, 1.070, 1.034, 1.000])\n",
- "tort_reform = np.array([0.670, 0.670, 0.670, 0.670, 0.670, 0.670, 0.670, 0.670, 0.750, 1.000, 1.000])\n",
+ "# Adjustment methods (Exhibit II, Sheet 1). The text restates premium to the 2008\n",
+ "# rate level and adjusts reported claims for pure-premium trend and tort reform.\n",
+ "# The rate-change and tort-reform histories are from the text; the parallelogram\n",
+ "# method (vertical_line=True) reproduces its on-level and tort factors, and the\n",
+ "# 3.42% pure-premium trend is applied through CapeCod's trend parameter.\n",
+ "rate_history = pd.DataFrame({\n",
+ " \"date\": [\"1/1/1999\", \"1/1/2000\", \"1/1/2001\", \"1/1/2002\", \"1/1/2003\",\n",
+ " \"1/1/2004\", \"1/1/2005\", \"1/1/2006\", \"1/1/2007\", \"1/1/2008\"],\n",
+ " \"rate_change\": [0.02, 0.02, 0.02, 0.02, 0.05, 0.075, 0.15, 0.10, -0.20, -0.20],\n",
+ "})\n",
+ "tort_history = pd.DataFrame({\n",
+ " \"date\": [\"1/1/2006\", \"1/1/2007\"],\n",
+ " \"rate_change\": [-0.1067, -0.25],\n",
+ "})\n",
+ "pp_trend_rate = 0.0342\n",
"\n",
- "# Reported cumulative development factors are limited to a minimum of 1.00.\n",
+ "onlevel = cl.ParallelogramOLF(\n",
+ " rate_history, change_col=\"rate_change\", date_col=\"date\", vertical_line=True)\n",
+ "tort = cl.ParallelogramOLF(\n",
+ " tort_history, change_col=\"rate_change\", date_col=\"date\", vertical_line=True)\n",
+ "onlevel_adj = col(onlevel.fit(xyz_premium).olf_)\n",
+ "tort_reform = col(tort.fit(xyz_reported.latest_diagonal).olf_)\n",
+ "pp_trend = (1 + pp_trend_rate) ** (max(xyz_years) - np.array(xyz_years))\n",
+ "\n",
+ "# Reported cumulative development factors are floored at 1.0 (caps %reported at 100%).\n",
"xyz_cdf = np.maximum(\n",
" xyz_reported_dev.cdf_.to_frame(origin_as_datetime=False).values.flatten()[::-1], 1.0).round(3)\n",
"xyz_pct_reported = 1 / xyz_cdf\n",
@@ -1663,23 +1683,18 @@
"adjusted_claims = xyz_reported_latest * pp_trend * tort_reform\n",
"used_up_on_level = on_level_premium * xyz_pct_reported\n",
"\n",
- "# Derive the all-years apriori through CapeCod: fit on the adjusted reported\n",
- "# triangle with on-level premium exposure.\n",
- "adj_factor = pp_trend * tort_reform\n",
- "xyz_adj_tri = xyz_reported.copy()\n",
- "xyz_adj_tri.values = xyz_adj_tri.values * adj_factor[None, None, :, None]\n",
- "xyz_adj_dev = xyz_adj_tri.copy()\n",
- "# Friedland floors the reported CDF at 1.0 (caps %reported at 100%); apply the\n",
- "# same floor to the pattern CapeCod fits so its apriori reconciles to the sheet.\n",
- "floored_cdf = np.maximum(xyz_reported_dev.cdf_.values, 1.0)\n",
- "floored_ldf = xyz_reported_dev.ldf_.copy()\n",
- "floored_ldf_vals = floored_cdf.copy()\n",
- "floored_ldf_vals[..., :-1] = floored_cdf[..., :-1] / floored_cdf[..., 1:]\n",
- "floored_ldf.values = floored_ldf_vals\n",
- "xyz_adj_dev.ldf_ = floored_ldf\n",
- "onlevel_diag = xyz_premium.copy()\n",
- "onlevel_diag.values = onlevel_diag.values * onlevel_adj[None, None, :, None]\n",
- "xyz_cc = cl.CapeCod().fit(xyz_adj_dev, sample_weight=onlevel_diag)\n",
+ "# Chain the adjustments into a pipeline to derive the all-years apriori: the\n",
+ "# tort-reform OLF and the floored Chapter 7 pattern develop the reported claims,\n",
+ "# CapeCod applies the pure-premium trend, and on-level premium is the exposure.\n",
+ "floored_patterns = dict(zip(\n",
+ " [int(age) for age in xyz_reported_dev.cdf_.ddims],\n",
+ " np.maximum(xyz_reported_dev.cdf_.values.flatten(), 1.0)))\n",
+ "onlevel_premium = xyz_premium * onlevel.olf_\n",
+ "xyz_cc = cl.Pipeline([\n",
+ " (\"tort\", tort),\n",
+ " (\"dev\", cl.DevelopmentConstant(patterns=floored_patterns, style=\"cdf\")),\n",
+ " (\"capecod\", cl.CapeCod(trend=pp_trend_rate)),\n",
+ "]).fit(xyz_reported, sample_weight=onlevel_premium).named_steps[\"capecod\"]\n",
"xyz_apriori = float(xyz_cc.apriori_.to_frame().iloc[0, 0])\n",
"\n",
"sheet1 = pd.DataFrame(index=xyz_years)\n",
From 3de8166c2dce6a2c65f3fd37225a7d371e29ceb7 Mon Sep 17 00:00:00 2001
From: priyam0k <87162535+priyam0k@users.noreply.github.com>
Date: Mon, 3 Aug 2026 02:08:28 +0530
Subject: [PATCH 6/6] docs(friedland): drop unused mislabeled Increasing Claim
scenario from friedland_us_auto
---
chainladder/utils/data/friedland_us_auto.csv | 55 --------------------
1 file changed, 55 deletions(-)
diff --git a/chainladder/utils/data/friedland_us_auto.csv b/chainladder/utils/data/friedland_us_auto.csv
index 50d14dd8f..c225d75d4 100644
--- a/chainladder/utils/data/friedland_us_auto.csv
+++ b/chainladder/utils/data/friedland_us_auto.csv
@@ -54,61 +54,6 @@ Accident Year,Calendar Year,Paid Claims,Reported Claims,Earned Premium,Scenario
2007,2007,694404,1493707,2954911,Steady State
2007,2008,1277999,1852729,2954911,Steady State
2008,2008,729124,1568393,3102656,Steady State
-1999,1999,294000,539000,2000000,Increasing Claim
-1999,2000,497000,630000,2000000,Increasing Claim
-1999,2001,588000,665000,2000000,Increasing Claim
-1999,2002,644000,686000,2000000,Increasing Claim
-1999,2003,672000,693000,2000000,Increasing Claim
-1999,2004,686000,693000,2000000,Increasing Claim
-1999,2005,693000,700000,2000000,Increasing Claim
-1999,2006,693000,700000,2000000,Increasing Claim
-1999,2007,700000,700000,2000000,Increasing Claim
-1999,2008,700000,700000,2000000,Increasing Claim
-2000,2000,308700,565950,2100000,Increasing Claim
-2000,2001,521850,611500,2100000,Increasing Claim
-2000,2002,617400,698250,2100000,Increasing Claim
-2000,2003,676200,720300,2100000,Increasing Claim
-2000,2004,705600,727650,2100000,Increasing Claim
-2000,2005,720300,727650,2100000,Increasing Claim
-2000,2006,727650,735000,2100000,Increasing Claim
-2000,2007,727650,735000,2100000,Increasing Claim
-2000,2008,735000,735000,2100000,Increasing Claim
-2001,2001,324135,594248,2205000,Increasing Claim
-2001,2002,547943,694575,2205000,Increasing Claim
-2001,2003,648270,733163,2205000,Increasing Claim
-2001,2004,710010,756315,2205000,Increasing Claim
-2001,2005,740880,764033,2205000,Increasing Claim
-2001,2006,756315,764033,2205000,Increasing Claim
-2001,2007,764033,771750,2205000,Increasing Claim
-2001,2008,764033,771750,2205000,Increasing Claim
-2002,2002,340342,623960,2315250,Increasing Claim
-2002,2003,575340,729304,2315250,Increasing Claim
-2002,2004,680684,769821,2315250,Increasing Claim
-2002,2005,745511,794131,2315250,Increasing Claim
-2002,2006,777924,802234,2315250,Increasing Claim
-2002,2007,794131,802234,2315250,Increasing Claim
-2002,2008,802234,810338,2315250,Increasing Claim
-2003,2003,357359,655158,2431013,Increasing Claim
-2003,2004,604107,765769,2431013,Increasing Claim
-2003,2005,714718,808312,2431013,Increasing Claim
-2003,2006,782786,833837,2431013,Increasing Claim
-2003,2007,816820,842346,2431013,Increasing Claim
-2003,2008,833837,842346,2431013,Increasing Claim
-2004,2004,428831,786189,2552563,Increasing Claim
-2004,2005,724928,918923,2552563,Increasing Claim
-2004,2006,857661,969974,2552563,Increasing Claim
-2004,2007,939343,1000605,2552563,Increasing Claim
-2004,2008,980184,1010815,2552563,Increasing Claim
-2005,2005,478414,877093,2680191,Increasing Claim
-2005,2006,808748,1025173,2680191,Increasing Claim
-2005,2007,956828,1082127,2680191,Increasing Claim
-2005,2008,1047955,1116300,2680191,Increasing Claim
-2006,2006,531884,975121,2814201,Increasing Claim
-2006,2007,899137,1139751,2814201,Increasing Claim
-2006,2008,1063768,1203071,2814201,Increasing Claim
-2007,2007,589505,1080759,2954911,Increasing Claim
-2007,2008,996544,1263224,2954911,Increasing Claim
-2008,2008,651558,1194523,3102656,Increasing Claim
1999,1999,470000,1011000,2000000,Changing Product Mix
1999,2000,865000,1254000,2000000,Changing Product Mix
1999,2001,1124000,1377000,2000000,Changing Product Mix