From 0a04d039c746874b3a8e725ad29caed8d96359f3 Mon Sep 17 00:00:00 2001 From: kennethshsu Date: Fri, 15 Sep 2023 15:18:23 -0700 Subject: [PATCH] Removed the old workbook --- .../online_sandbox/20-Minutes Demo.ipynb | 4086 ----------------- 1 file changed, 4086 deletions(-) delete mode 100644 docs/getting_started/online_sandbox/20-Minutes Demo.ipynb diff --git a/docs/getting_started/online_sandbox/20-Minutes Demo.ipynb b/docs/getting_started/online_sandbox/20-Minutes Demo.ipynb deleted file mode 100644 index 2b54b5e8..00000000 --- a/docs/getting_started/online_sandbox/20-Minutes Demo.ipynb +++ /dev/null @@ -1,4086 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "id": "8c8767ae-b492-4f4f-ad0b-00dd3f79cf8a", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "chainladder 0.8.13\n" - ] - } - ], - "source": [ - "import chainladder as cl\n", - "import numpy as np\n", - "import pandas as pd\n", - "import matplotlib.pyplot as plt\n", - "\n", - "print(\"chainladder\", cl.__version__)" - ] - }, - { - "cell_type": "markdown", - "id": "c9a3a636-979a-4205-9762-469e8afb7e46", - "metadata": {}, - "source": [ - "Let's begin by looking at a sample dataset, called `xyz`." - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "aa2c95b8-86b4-4846-b950-12c402477ec1", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
AccidentYearDevelopmentYearIncurredPaidReportedClosedPremium
020022002128112318134220361183
12003200396511743137318169175
220042004169952221193223599322
3200520052867430432067295138151
4200620062706635311473307107578
520072007194773529119232962438
620082008186323409103627647797
720022003203707932151460761183
820032004169956240161661469175
920042005401809898216884899322
1020052006474321221922931119138151
112006200746783117781645906107578
12200720083173211865126479162438
13200220042665613822154884161183
14200320053035412683163094169175
152004200658866259502234144299322
1620052007703402707323671664138151
1720062008488042281916571201107578
182002200537667220951557108961183
192003200640594228921626126369175
\n", - "
" - ], - "text/plain": [ - " AccidentYear DevelopmentYear Incurred Paid Reported Closed Premium\n", - "0 2002 2002 12811 2318 1342 203 61183\n", - "1 2003 2003 9651 1743 1373 181 69175\n", - "2 2004 2004 16995 2221 1932 235 99322\n", - "3 2005 2005 28674 3043 2067 295 138151\n", - "4 2006 2006 27066 3531 1473 307 107578\n", - "5 2007 2007 19477 3529 1192 329 62438\n", - "6 2008 2008 18632 3409 1036 276 47797\n", - "7 2002 2003 20370 7932 1514 607 61183\n", - "8 2003 2004 16995 6240 1616 614 69175\n", - "9 2004 2005 40180 9898 2168 848 99322\n", - "10 2005 2006 47432 12219 2293 1119 138151\n", - "11 2006 2007 46783 11778 1645 906 107578\n", - "12 2007 2008 31732 11865 1264 791 62438\n", - "13 2002 2004 26656 13822 1548 841 61183\n", - "14 2003 2005 30354 12683 1630 941 69175\n", - "15 2004 2006 58866 25950 2234 1442 99322\n", - "16 2005 2007 70340 27073 2367 1664 138151\n", - "17 2006 2008 48804 22819 1657 1201 107578\n", - "18 2002 2005 37667 22095 1557 1089 61183\n", - "19 2003 2006 40594 22892 1626 1263 69175" - ] - }, - "execution_count": 2, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xyz_df = pd.read_csv(\n", - " \"https://raw.githubusercontent.com/casact/chainladder-python/master/chainladder/utils/data/xyz.csv\"\n", - ")\n", - "xyz_df.head(20)" - ] - }, - { - "cell_type": "markdown", - "id": "996795b6-9361-4b5c-a00d-d9b6391b115f", - "metadata": {}, - "source": [ - "How many unique accident years are there?" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "4c11052c-291e-439f-ac0f-6736bb2b0b68", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array([1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008])" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "np.sort(xyz_df[\"AccidentYear\"].unique())" - ] - }, - { - "cell_type": "markdown", - "id": "58d76c79-2dfc-4240-bb12-89f46d8e3faf", - "metadata": {}, - "source": [ - "How many unique valuation years are there?" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "ced40b27-3ad1-4805-bba2-06bc0666832a", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array([2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008])" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "np.sort(xyz_df[\"DevelopmentYear\"].unique())" - ] - }, - { - "cell_type": "markdown", - "id": "3eb013b1-7481-45b1-a39f-206abf2ee8f3", - "metadata": {}, - "source": [ - "Let's load the data into the chainladder triangle format." - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "2b51e0b6-c1d3-4976-8866-4800b15d27ec", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
Triangle Summary
Valuation:2008-12
Grain:OYDY
Shape:(1, 5, 11, 11)
Index:[Total]
Columns:[Incurred, Paid, Reported, Closed, Premium]
" - ], - "text/plain": [ - " Triangle Summary\n", - "Valuation: 2008-12\n", - "Grain: OYDY\n", - "Shape: (1, 5, 11, 11)\n", - "Index: [Total]\n", - "Columns: [Incurred, Paid, Reported, Closed, Premium]" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xyz_tri = cl.load_sample(\"xyz\")\n", - "xyz_tri" - ] - }, - { - "cell_type": "markdown", - "id": "2c404d26-4418-43b8-8687-58be1b6423f1", - "metadata": {}, - "source": [ - "What does the incurred triangle look like?" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "fe9309fe-2744-4e4d-beff-0a36c1182386", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
1224364860728496108120132
199811,17112,38013,21614,06714,68816,36616,16315,83515,822
199913,25516,40519,63922,47323,76425,09424,79525,07125,107
200015,67618,74921,90027,14429,48834,45836,94937,50537,246
200111,82716,00421,02226,57834,20537,13638,54138,798
200212,81120,37026,65637,66744,41448,70148,169
20039,65116,99530,35440,59444,23144,373
200416,99540,18058,86671,70770,288
200528,67447,43270,34070,655
200627,06646,78348,804
200719,47731,732
200818,632
" - ], - "text/plain": [ - " 12 24 36 48 60 72 84 96 108 120 132\n", - "1998 NaN NaN 11171.0 12380.0 13216.0 14067.0 14688.0 16366.0 16163.0 15835.0 15822.0\n", - "1999 NaN 13255.0 16405.0 19639.0 22473.0 23764.0 25094.0 24795.0 25071.0 25107.0 NaN\n", - "2000 15676.0 18749.0 21900.0 27144.0 29488.0 34458.0 36949.0 37505.0 37246.0 NaN NaN\n", - "2001 11827.0 16004.0 21022.0 26578.0 34205.0 37136.0 38541.0 38798.0 NaN NaN NaN\n", - "2002 12811.0 20370.0 26656.0 37667.0 44414.0 48701.0 48169.0 NaN NaN NaN NaN\n", - "2003 9651.0 16995.0 30354.0 40594.0 44231.0 44373.0 NaN NaN NaN NaN NaN\n", - "2004 16995.0 40180.0 58866.0 71707.0 70288.0 NaN NaN NaN NaN NaN NaN\n", - "2005 28674.0 47432.0 70340.0 70655.0 NaN NaN NaN NaN NaN NaN NaN\n", - "2006 27066.0 46783.0 48804.0 NaN NaN NaN NaN NaN NaN NaN NaN\n", - "2007 19477.0 31732.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN\n", - "2008 18632.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xyz_tri[\"Incurred\"]" - ] - }, - { - "cell_type": "markdown", - "id": "ed9811e6-5761-4258-9942-19a620540361", - "metadata": {}, - "source": [ - "How about paid?" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "278856cf-6d84-4fa6-ac57-4f57755580b8", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
1224364860728496108120132
19986,3098,52110,08211,62013,24214,41915,31115,76415,822
19994,6669,86113,97118,12722,03223,51124,14624,59224,817
20001,3026,51312,13917,82824,03028,85333,22235,90236,782
20011,5395,95212,31918,60924,38731,09037,07038,519
20022,3187,93213,82222,09531,94540,62944,437
20031,7436,24012,68322,89234,50539,320
20042,2219,89825,95043,43952,811
20053,04312,21927,07340,026
20063,53111,77822,819
20073,52911,865
20083,409
" - ], - "text/plain": [ - " 12 24 36 48 60 72 84 96 108 120 132\n", - "1998 NaN NaN 6309.0 8521.0 10082.0 11620.0 13242.0 14419.0 15311.0 15764.0 15822.0\n", - "1999 NaN 4666.0 9861.0 13971.0 18127.0 22032.0 23511.0 24146.0 24592.0 24817.0 NaN\n", - "2000 1302.0 6513.0 12139.0 17828.0 24030.0 28853.0 33222.0 35902.0 36782.0 NaN NaN\n", - "2001 1539.0 5952.0 12319.0 18609.0 24387.0 31090.0 37070.0 38519.0 NaN NaN NaN\n", - "2002 2318.0 7932.0 13822.0 22095.0 31945.0 40629.0 44437.0 NaN NaN NaN NaN\n", - "2003 1743.0 6240.0 12683.0 22892.0 34505.0 39320.0 NaN NaN NaN NaN NaN\n", - "2004 2221.0 9898.0 25950.0 43439.0 52811.0 NaN NaN NaN NaN NaN NaN\n", - "2005 3043.0 12219.0 27073.0 40026.0 NaN NaN NaN NaN NaN NaN NaN\n", - "2006 3531.0 11778.0 22819.0 NaN NaN NaN NaN NaN NaN NaN NaN\n", - "2007 3529.0 11865.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN\n", - "2008 3409.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xyz_tri[\"Paid\"]" - ] - }, - { - "cell_type": "markdown", - "id": "433b8ae8-1968-4dfc-a176-c8a8c93c5f97", - "metadata": {}, - "source": [ - "Let's see how `.iloc[...]` and `.loc[...]` simiarly to pandas. They take 4 parameters: [index, column, origin, valuation]." - ] - }, - { - "cell_type": "markdown", - "id": "f0452527-796d-4185-929a-97241329b377", - "metadata": {}, - "source": [ - "What if we want the row from AY 1998 Incurred data?" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "a13a157b-3fe9-4254-bc72-11d4e1705f29", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
1224364860728496108120132
199811,17112,38013,21614,06714,68816,36616,16315,83515,822
" - ], - "text/plain": [ - " 12 24 36 48 60 72 84 96 108 120 132\n", - "1998 NaN NaN 11171.0 12380.0 13216.0 14067.0 14688.0 16366.0 16163.0 15835.0 15822.0" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xyz_tri.iloc[:,0,0,:]" - ] - }, - { - "cell_type": "markdown", - "id": "08b8557c-66fe-4a25-a8bf-5413ca1c1fbb", - "metadata": {}, - "source": [ - "What if you only want the valuation at age 60 (index 4)?" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "fb20eda1-4e4a-431d-8c8a-21cc87b8c472", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
60
199813,216
" - ], - "text/plain": [ - " 60\n", - "1998 13216.0" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xyz_tri.iloc[:,0,0,4]" - ] - }, - { - "cell_type": "markdown", - "id": "6d04a3d3-20c9-4d53-9d81-a3ba5a127a55", - "metadata": {}, - "source": [ - "Can we get the Incurred column at age 60?" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "ac62d64a-6c89-4cc2-916d-fdbfdc4c70c3", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
60
199813,216
199922,473
200029,488
200134,205
200244,414
200344,231
200470,288
2005
2006
2007
2008
" - ], - "text/plain": [ - " 60\n", - "1998 13216.0\n", - "1999 22473.0\n", - "2000 29488.0\n", - "2001 34205.0\n", - "2002 44414.0\n", - "2003 44231.0\n", - "2004 70288.0\n", - "2005 NaN\n", - "2006 NaN\n", - "2007 NaN\n", - "2008 NaN" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xyz_tri.iloc[:,0,:,4]" - ] - }, - { - "cell_type": "markdown", - "id": "56683ffb-01ef-4e18-ba27-1b8ab31b9ae7", - "metadata": {}, - "source": [ - "Let's use `.loc[...]` to the incurred triangle." - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "id": "b8116ded-c788-483c-b2af-fde45b72ee4a", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
1224364860728496108120132
199811,17112,38013,21614,06714,68816,36616,16315,83515,822
199913,25516,40519,63922,47323,76425,09424,79525,07125,107
200015,67618,74921,90027,14429,48834,45836,94937,50537,246
200111,82716,00421,02226,57834,20537,13638,54138,798
200212,81120,37026,65637,66744,41448,70148,169
20039,65116,99530,35440,59444,23144,373
200416,99540,18058,86671,70770,288
200528,67447,43270,34070,655
200627,06646,78348,804
200719,47731,732
200818,632
" - ], - "text/plain": [ - " 12 24 36 48 60 72 84 96 108 120 132\n", - "1998 NaN NaN 11171.0 12380.0 13216.0 14067.0 14688.0 16366.0 16163.0 15835.0 15822.0\n", - "1999 NaN 13255.0 16405.0 19639.0 22473.0 23764.0 25094.0 24795.0 25071.0 25107.0 NaN\n", - "2000 15676.0 18749.0 21900.0 27144.0 29488.0 34458.0 36949.0 37505.0 37246.0 NaN NaN\n", - "2001 11827.0 16004.0 21022.0 26578.0 34205.0 37136.0 38541.0 38798.0 NaN NaN NaN\n", - "2002 12811.0 20370.0 26656.0 37667.0 44414.0 48701.0 48169.0 NaN NaN NaN NaN\n", - "2003 9651.0 16995.0 30354.0 40594.0 44231.0 44373.0 NaN NaN NaN NaN NaN\n", - "2004 16995.0 40180.0 58866.0 71707.0 70288.0 NaN NaN NaN NaN NaN NaN\n", - "2005 28674.0 47432.0 70340.0 70655.0 NaN NaN NaN NaN NaN NaN NaN\n", - "2006 27066.0 46783.0 48804.0 NaN NaN NaN NaN NaN NaN NaN NaN\n", - "2007 19477.0 31732.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN\n", - "2008 18632.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xyz_tri.loc[:,\"Incurred\",:,:]" - ] - }, - { - "cell_type": "markdown", - "id": "4adf2d0a-4f5e-4aaf-93c1-9a74e040c3bb", - "metadata": {}, - "source": [ - "What if we want the Paid value for AY 1999 at age 60?" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "id": "7ec55526-fcb3-4f53-88c9-5e74f7c2eb93", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
60
199918,127
" - ], - "text/plain": [ - " 60\n", - "1999 18127.0" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xyz_tri.loc[:,\"Paid\",\"1999\",60]" - ] - }, - { - "cell_type": "markdown", - "id": "c9d515b7-c9a3-4045-ad79-78af1574be8a", - "metadata": {}, - "source": [ - "How do we get the latest diagonal only?" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "id": "5bce08b8-bf34-418e-ac3b-db253db44898", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
2008
199815,822
199925,107
200037,246
200138,798
200248,169
200344,373
200470,288
200570,655
200648,804
200731,732
200818,632
" - ], - "text/plain": [ - " 2008\n", - "1998 15822.0\n", - "1999 25107.0\n", - "2000 37246.0\n", - "2001 38798.0\n", - "2002 48169.0\n", - "2003 44373.0\n", - "2004 70288.0\n", - "2005 70655.0\n", - "2006 48804.0\n", - "2007 31732.0\n", - "2008 18632.0" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xyz_tri[\"Incurred\"].latest_diagonal" - ] - }, - { - "cell_type": "markdown", - "id": "31b56210-cbcd-4bbb-af9f-063a3788867a", - "metadata": {}, - "source": [ - "Very often, we want incremental triangles instead. Let's convert the Incurred triangle to the incremental form." - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "id": "b2766e7b-b1e6-4574-bfa7-fd70ccd556d7", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
1224364860728496108120132
199811,1711,2098368516211,678-203-328-13
199913,2553,1503,2342,8341,2911,330-29927636
200015,6763,0733,1515,2442,3444,9702,491556-259
200111,8274,1775,0185,5567,6272,9311,405257
200212,8117,5596,28611,0116,7474,287-532
20039,6517,34413,35910,2403,637142
200416,99523,18518,68612,841-1,419
200528,67418,75822,908315
200627,06619,7172,021
200719,47712,255
200818,632
" - ], - "text/plain": [ - " 12 24 36 48 60 72 84 96 108 120 132\n", - "1998 NaN NaN 11171.0 1209.0 836.0 851.0 621.0 1678.0 -203.0 -328.0 -13.0\n", - "1999 NaN 13255.0 3150.0 3234.0 2834.0 1291.0 1330.0 -299.0 276.0 36.0 NaN\n", - "2000 15676.0 3073.0 3151.0 5244.0 2344.0 4970.0 2491.0 556.0 -259.0 NaN NaN\n", - "2001 11827.0 4177.0 5018.0 5556.0 7627.0 2931.0 1405.0 257.0 NaN NaN NaN\n", - "2002 12811.0 7559.0 6286.0 11011.0 6747.0 4287.0 -532.0 NaN NaN NaN NaN\n", - "2003 9651.0 7344.0 13359.0 10240.0 3637.0 142.0 NaN NaN NaN NaN NaN\n", - "2004 16995.0 23185.0 18686.0 12841.0 -1419.0 NaN NaN NaN NaN NaN NaN\n", - "2005 28674.0 18758.0 22908.0 315.0 NaN NaN NaN NaN NaN NaN NaN\n", - "2006 27066.0 19717.0 2021.0 NaN NaN NaN NaN NaN NaN NaN NaN\n", - "2007 19477.0 12255.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN\n", - "2008 18632.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xyz_tri[\"Incurred\"].cum_to_incr()" - ] - }, - { - "cell_type": "markdown", - "id": "6235668f-9025-4108-b987-f867f93c8ce6", - "metadata": {}, - "source": [ - "We can also convert the triangle to the valuation format, what we often see on Schedule Ps." - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "id": "72487c9a-4438-4ab7-8a24-245485d4c637", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
19981999200020012002200320042005200620072008
199811,17112,38013,21614,06714,68816,36616,16315,83515,822
199913,25516,40519,63922,47323,76425,09424,79525,07125,107
200015,67618,74921,90027,14429,48834,45836,94937,50537,246
200111,82716,00421,02226,57834,20537,13638,54138,798
200212,81120,37026,65637,66744,41448,70148,169
20039,65116,99530,35440,59444,23144,373
200416,99540,18058,86671,70770,288
200528,67447,43270,34070,655
200627,06646,78348,804
200719,47731,732
200818,632
" - ], - "text/plain": [ - " 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008\n", - "1998 NaN NaN 11171.0 12380.0 13216.0 14067.0 14688.0 16366.0 16163.0 15835.0 15822.0\n", - "1999 NaN NaN 13255.0 16405.0 19639.0 22473.0 23764.0 25094.0 24795.0 25071.0 25107.0\n", - "2000 NaN NaN 15676.0 18749.0 21900.0 27144.0 29488.0 34458.0 36949.0 37505.0 37246.0\n", - "2001 NaN NaN NaN 11827.0 16004.0 21022.0 26578.0 34205.0 37136.0 38541.0 38798.0\n", - "2002 NaN NaN NaN NaN 12811.0 20370.0 26656.0 37667.0 44414.0 48701.0 48169.0\n", - "2003 NaN NaN NaN NaN NaN 9651.0 16995.0 30354.0 40594.0 44231.0 44373.0\n", - "2004 NaN NaN NaN NaN NaN NaN 16995.0 40180.0 58866.0 71707.0 70288.0\n", - "2005 NaN NaN NaN NaN NaN NaN NaN 28674.0 47432.0 70340.0 70655.0\n", - "2006 NaN NaN NaN NaN NaN NaN NaN NaN 27066.0 46783.0 48804.0\n", - "2007 NaN NaN NaN NaN NaN NaN NaN NaN NaN 19477.0 31732.0\n", - "2008 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 18632.0" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xyz_tri[\"Incurred\"].dev_to_val()" - ] - }, - { - "cell_type": "markdown", - "id": "27d110d2-ee73-4bb5-a411-3d27c0dd7673", - "metadata": {}, - "source": [ - "## Development" - ] - }, - { - "cell_type": "markdown", - "id": "a0d0950f-bec7-406d-b253-4cf1bfd925dd", - "metadata": {}, - "source": [ - "How can we get the incurred link ratios?" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "id": "ec16d0fd-ac17-4280-aabf-ad5795114d5f", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
12-2424-3636-4848-6060-7272-8484-9696-108108-120120-132
19981.10821.06751.06441.04411.11420.98760.97970.9992
19991.23761.19711.14431.05741.05600.98811.01111.0014
20001.19601.16811.23951.08641.16851.07231.01500.9931
20011.35321.31351.26431.28701.08571.03781.0067
20021.59001.30861.41311.17911.09650.9891
20031.76101.78611.33741.08961.0032
20042.36421.46511.21810.9802
20051.65421.48301.0045
20061.72851.0432
20071.6292
" - ], - "text/plain": [ - " 12-24 24-36 36-48 48-60 60-72 72-84 84-96 96-108 108-120 120-132\n", - "1998 NaN NaN 1.108227 1.067528 1.064392 1.044146 1.114243 0.987596 0.979707 0.999179\n", - "1999 NaN 1.237646 1.197135 1.144305 1.057447 1.055967 0.988085 1.011131 1.001436 NaN\n", - "2000 1.196032 1.168062 1.239452 1.086354 1.168543 1.072291 1.015048 0.993094 NaN NaN\n", - "2001 1.353175 1.313547 1.264295 1.286967 1.085689 1.037834 1.006668 NaN NaN NaN\n", - "2002 1.590040 1.308591 1.413078 1.179122 1.096524 0.989076 NaN NaN NaN NaN\n", - "2003 1.760957 1.786055 1.337353 1.089595 1.003210 NaN NaN NaN NaN NaN\n", - "2004 2.364225 1.465057 1.218140 0.980211 NaN NaN NaN NaN NaN NaN\n", - "2005 1.654181 1.482965 1.004478 NaN NaN NaN NaN NaN NaN NaN\n", - "2006 1.728479 1.043199 NaN NaN NaN NaN NaN NaN NaN NaN\n", - "2007 1.629204 NaN NaN NaN NaN NaN NaN NaN NaN NaN" - ] - }, - "execution_count": 16, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xyz_tri[\"Incurred\"].link_ratio" - ] - }, - { - "cell_type": "markdown", - "id": "c74c5352-a95b-4403-8322-962ded312e39", - "metadata": {}, - "source": [ - "We can also apply a heatmap to make it easier to visulize the highs and lows." - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "id": "172c70be-2324-472f-b89c-29963695179a", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
 12-2424-3636-4848-6060-7272-8484-9696-108108-120120-132
19981.10821.06751.06441.04411.11420.98760.97970.9992
19991.23761.19711.14431.05741.05600.98811.01111.0014
20001.19601.16811.23951.08641.16851.07231.01500.9931
20011.35321.31351.26431.28701.08571.03781.0067
20021.59001.30861.41311.17911.09650.9891
20031.76101.78611.33741.08961.0032
20042.36421.46511.21810.9802
20051.65421.48301.0045
20061.72851.0432
20071.6292
\n" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xyz_tri[\"Incurred\"].link_ratio.heatmap()" - ] - }, - { - "cell_type": "markdown", - "id": "f5f212b0-3769-49cd-b7cc-b484f2877aa2", - "metadata": {}, - "source": [ - "Let's get a simple average LDFs for our Incurred triangle." - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "id": "ba0b96cb-77eb-472c-84fd-c5c8c5c11e10", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
12-2424-3636-4848-6060-7272-8484-9696-108108-120120-132
(All)1.65951.35061.22281.11921.07931.03991.03100.99730.99060.9992
" - ], - "text/plain": [ - " 12-24 24-36 36-48 48-60 60-72 72-84 84-96 96-108 108-120 120-132\n", - "(All) 1.659537 1.35064 1.22277 1.119155 1.079301 1.039863 1.031011 0.997274 0.990571 0.999179" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "cl.Development(average = \"simple\").fit(xyz_tri[\"Incurred\"]).ldf_" - ] - }, - { - "cell_type": "markdown", - "id": "0c4baafd-e141-4566-a4ae-2f0a44ef828e", - "metadata": {}, - "source": [ - "How about the CDFs?" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "id": "b156f84b-dd0d-49d6-8eec-070d0143f40c", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
12-Ult24-Ult36-Ult48-Ult60-Ult72-Ult84-Ult96-Ult108-Ult120-Ult
(All)3.50342.11111.56301.27821.14221.05821.01770.98710.98980.9992
" - ], - "text/plain": [ - " 12-Ult 24-Ult 36-Ult 48-Ult 60-Ult 72-Ult 84-Ult 96-Ult 108-Ult 120-Ult\n", - "(All) 3.503374 2.111056 1.563004 1.278249 1.142156 1.058237 1.01767 0.98706 0.989758 0.999179" - ] - }, - "execution_count": 19, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "cl.Development(average = \"simple\").fit(xyz_tri[\"Incurred\"]).cdf_" - ] - }, - { - "cell_type": "markdown", - "id": "d51e5664-3106-41d1-b77f-8afa9ee94ff7", - "metadata": {}, - "source": [ - "We can also use only the latest 3 periods in the calculation of LDFs." - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "id": "de88fdad-5d89-4cc2-adb0-bbeb7c77bbcb", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
12-2424-3636-4848-6060-7272-8484-9696-108108-120120-132
(All)1.67441.32451.14661.05981.05991.02801.00510.99760.99290.9992
" - ], - "text/plain": [ - " 12-24 24-36 36-48 48-60 60-72 72-84 84-96 96-108 108-120 120-132\n", - "(All) 1.674449 1.324528 1.146628 1.059779 1.05991 1.027965 1.00511 0.997636 0.992918 0.999179" - ] - }, - "execution_count": 20, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "cl.Development(n_periods = 3).fit(xyz_tri[\"Incurred\"]).ldf_" - ] - }, - { - "cell_type": "markdown", - "id": "b018bae9-6070-4795-8af6-b5e196aa1af1", - "metadata": {}, - "source": [ - "## Deterministic Models" - ] - }, - { - "cell_type": "markdown", - "id": "e7c7b88e-205d-45c8-b9e6-4586f29041a4", - "metadata": {}, - "source": [ - "Before we can build any models, we need to use `fit_transform()`, so that the object is actually modified with our selected development pattern(s)." - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "id": "9e5136d2-0c3c-44da-8440-57ca3cfbbb9d", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
1224364860728496108120132
199811,17112,38013,21614,06714,68816,36616,16315,83515,822
199913,25516,40519,63922,47323,76425,09424,79525,07125,107
200015,67618,74921,90027,14429,48834,45836,94937,50537,246
200111,82716,00421,02226,57834,20537,13638,54138,798
200212,81120,37026,65637,66744,41448,70148,169
20039,65116,99530,35440,59444,23144,373
200416,99540,18058,86671,70770,288
200528,67447,43270,34070,655
200627,06646,78348,804
200719,47731,732
200818,632
" - ], - "text/plain": [ - " 12 24 36 48 60 72 84 96 108 120 132\n", - "1998 NaN NaN 11171.0 12380.0 13216.0 14067.0 14688.0 16366.0 16163.0 15835.0 15822.0\n", - "1999 NaN 13255.0 16405.0 19639.0 22473.0 23764.0 25094.0 24795.0 25071.0 25107.0 NaN\n", - "2000 15676.0 18749.0 21900.0 27144.0 29488.0 34458.0 36949.0 37505.0 37246.0 NaN NaN\n", - "2001 11827.0 16004.0 21022.0 26578.0 34205.0 37136.0 38541.0 38798.0 NaN NaN NaN\n", - "2002 12811.0 20370.0 26656.0 37667.0 44414.0 48701.0 48169.0 NaN NaN NaN NaN\n", - "2003 9651.0 16995.0 30354.0 40594.0 44231.0 44373.0 NaN NaN NaN NaN NaN\n", - "2004 16995.0 40180.0 58866.0 71707.0 70288.0 NaN NaN NaN NaN NaN NaN\n", - "2005 28674.0 47432.0 70340.0 70655.0 NaN NaN NaN NaN NaN NaN NaN\n", - "2006 27066.0 46783.0 48804.0 NaN NaN NaN NaN NaN NaN NaN NaN\n", - "2007 19477.0 31732.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN\n", - "2008 18632.0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN" - ] - }, - "execution_count": 21, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "cl.Development(n_periods = 3).fit_transform(xyz_tri[\"Incurred\"])" - ] - }, - { - "cell_type": "markdown", - "id": "1bd89481-e5c7-4a84-b2cc-a2e386ccdb15", - "metadata": {}, - "source": [ - "Let's fit a chainladder model to our Incurred triangle." - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "id": "022e22e9-92a8-427c-bf5c-cf352df1437c", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
Chainladder()
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" - ], - "text/plain": [ - "Chainladder()" - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "cl_mod = cl.Chainladder().fit(xyz_tri[\"Incurred\"])\n", - "cl_mod" - ] - }, - { - "cell_type": "markdown", - "id": "7b710342-5f86-408e-bf7e-76382b37f2d1", - "metadata": {}, - "source": [ - "How can we get the model's ultimate estimate?" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "id": "69f18923-73b1-4b80-9148-60a7bab5b118", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
2261
199815,822
199925,086
200036,952
200138,401
200248,582
200346,258
200478,914
200586,933
200671,662
200762,406
200861,402
" - ], - "text/plain": [ - " 2261\n", - "1998 15822.000000\n", - "1999 25086.388001\n", - "2000 36951.879990\n", - "2001 38400.613702\n", - "2002 48582.226476\n", - "2003 46257.941381\n", - "2004 78913.510138\n", - "2005 86933.374265\n", - "2006 71661.720703\n", - "2007 62405.722716\n", - "2008 61401.770743" - ] - }, - "execution_count": 23, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "cl_mod.ultimate_" - ] - }, - { - "cell_type": "markdown", - "id": "b416a404-8d0f-46fc-a3e7-f5b5b884b4b4", - "metadata": {}, - "source": [ - "How about just the IBNR?" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "id": "5fad3aa0-03bc-4f84-a8b7-1a00dbdebe8d", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
2261
1998
1999-21
2000-294
2001-397
2002413
20031,885
20048,626
200516,278
200622,858
200730,674
200842,770
" - ], - "text/plain": [ - " 2261\n", - "1998 NaN\n", - "1999 -20.611999\n", - "2000 -294.120010\n", - "2001 -397.386298\n", - "2002 413.226476\n", - "2003 1884.941381\n", - "2004 8625.510138\n", - "2005 16278.374265\n", - "2006 22857.720703\n", - "2007 30673.722716\n", - "2008 42769.770743" - ] - }, - "execution_count": 24, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "cl_mod.ibnr_" - ] - }, - { - "cell_type": "markdown", - "id": "70d8c018-21ca-4f2c-a764-433e310bb44a", - "metadata": {}, - "source": [ - "Let's fit an Expected Loss model, with an aprior of 90% on Premium, and get its ultimates." - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "id": "22eba9fa-1890-4f6f-8a10-281142d2d58d", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
2261
199818,000
199928,350
200040,500
200145,000
200255,065
200362,258
200489,390
2005124,336
200696,820
200756,194
200843,017
" - ], - "text/plain": [ - " 2261\n", - "1998 18000.0\n", - "1999 28350.0\n", - "2000 40500.0\n", - "2001 45000.0\n", - "2002 55064.7\n", - "2003 62257.5\n", - "2004 89389.8\n", - "2005 124335.9\n", - "2006 96820.2\n", - "2007 56194.2\n", - "2008 43017.3" - ] - }, - "execution_count": 25, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "cl.ExpectedLoss(apriori=0.90).fit(\n", - " xyz_tri[\"Incurred\"], sample_weight=xyz_tri[\"Premium\"].latest_diagonal\n", - ").ultimate_" - ] - }, - { - "cell_type": "markdown", - "id": "eb20b72a-4e49-4eaa-b8e8-d3801833e2d3", - "metadata": {}, - "source": [ - "We should get the same result even if we fit it on a Paid triangle." - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "id": "411f48b0-8b86-4175-80f2-f5f4a19e6c46", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
2261
199818,000
199928,350
200040,500
200145,000
200255,065
200362,258
200489,390
2005124,336
200696,820
200756,194
200843,017
" - ], - "text/plain": [ - " 2261\n", - "1998 18000.0\n", - "1999 28350.0\n", - "2000 40500.0\n", - "2001 45000.0\n", - "2002 55064.7\n", - "2003 62257.5\n", - "2004 89389.8\n", - "2005 124335.9\n", - "2006 96820.2\n", - "2007 56194.2\n", - "2008 43017.3" - ] - }, - "execution_count": 26, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "cl.ExpectedLoss(apriori=0.90).fit(\n", - " xyz_tri[\"Paid\"], sample_weight=xyz_tri[\"Premium\"].latest_diagonal\n", - ").ultimate_" - ] - }, - { - "cell_type": "markdown", - "id": "fb1d7eda-f4c6-4990-9488-47235492001a", - "metadata": {}, - "source": [ - "How about a Bornhuetter-Ferguson model?" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "id": "d66c7c9a-71eb-4d56-beea-f275da062fc0", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
2261
199815,822
199925,084
200036,924
200138,332
200248,637
200346,910
200480,059
200593,937
200679,686
200759,353
200848,596
" - ], - "text/plain": [ - " 2261\n", - "1998 15822.000000\n", - "1999 25083.706485\n", - "2000 36923.638582\n", - "2001 38332.320375\n", - "2002 48637.364535\n", - "2003 46909.899276\n", - "2004 80058.603599\n", - "2005 93937.040205\n", - "2006 79686.444188\n", - "2007 59352.628911\n", - "2008 48595.957663" - ] - }, - "execution_count": 27, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "cl.BornhuetterFerguson(apriori=0.90).fit(\n", - " xyz_tri[\"Incurred\"], sample_weight=xyz_tri[\"Premium\"].latest_diagonal\n", - ").ultimate_" - ] - }, - { - "cell_type": "markdown", - "id": "5564ead9-d059-4d2c-839a-f988238e50ee", - "metadata": {}, - "source": [ - "How about Benktander, with 1 iteration, which is the same as BF?" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "id": "d504e48d-1f5d-4fd6-975b-155235ffb577", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
2261
199815,822
199925,084
200036,924
200138,332
200248,637
200346,910
200480,059
200593,937
200679,686
200759,353
200848,596
" - ], - "text/plain": [ - " 2261\n", - "1998 15822.000000\n", - "1999 25083.706485\n", - "2000 36923.638582\n", - "2001 38332.320375\n", - "2002 48637.364535\n", - "2003 46909.899276\n", - "2004 80058.603599\n", - "2005 93937.040205\n", - "2006 79686.444188\n", - "2007 59352.628911\n", - "2008 48595.957663" - ] - }, - "execution_count": 28, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "cl.Benktander(apriori=0.90, n_iters = 1).fit(\n", - " xyz_tri[\"Incurred\"], sample_weight=xyz_tri[\"Premium\"].latest_diagonal\n", - ").ultimate_" - ] - }, - { - "cell_type": "markdown", - "id": "002a76c2-7989-46ba-954b-d84c09b4675a", - "metadata": {}, - "source": [ - "How about Cape Cod?" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "id": "7089ea42-ad28-4edc-9e83-723a7bc25443", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
2261
199815,822
199925,087
200036,975
200138,407
200248,562
200346,504
200478,496
200590,214
200674,748
200754,936
200843,804
" - ], - "text/plain": [ - " 2261\n", - "1998 15822.000000\n", - "1999 25087.431508\n", - "2000 36975.189569\n", - "2001 38406.790341\n", - "2002 48562.465206\n", - "2003 46504.206620\n", - "2004 78496.120544\n", - "2005 90213.852284\n", - "2006 74747.824455\n", - "2007 54935.628037\n", - "2008 43804.219299" - ] - }, - "execution_count": 29, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "cl.CapeCod().fit(\n", - " xyz_tri[\"Incurred\"], sample_weight=xyz_tri[\"Premium\"].latest_diagonal\n", - ").ultimate_" - ] - }, - { - "cell_type": "markdown", - "id": "3f9e62f8-225b-4046-8847-a6e8d971e14d", - "metadata": {}, - "source": [ - "## Stochastic Models" - ] - }, - { - "cell_type": "markdown", - "id": "36105614-e317-4a87-a42d-282f59b1d339", - "metadata": {}, - "source": [ - "The Mack's Chainladder model is available." - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "id": "e008ebdb-243d-4ed0-9256-86331df1070a", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
MackChainladder()
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" - ], - "text/plain": [ - "MackChainladder()" - ] - }, - "execution_count": 30, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "mcl_mod = cl.MackChainladder().fit(xyz_tri[\"Incurred\"])\n", - "mcl_mod" - ] - }, - { - "cell_type": "markdown", - "id": "3298c63c-5356-4d69-afa3-058b68daf777", - "metadata": {}, - "source": [ - "There are many attributes that are available, such as `full_std_err_`, `total_process_risk_`, `total_parameter_risk_`, `mack_std_err_` and `total_mack_std_err_`." - ] - }, - { - "cell_type": "code", - "execution_count": 31, - "id": "67f5d99b-7a5e-4640-a6e0-f8b654e6ce27", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
1224364860728496108120132
19980.00000.00000.24500.17410.08860.05370.06090.01460.01690.01100.0000
19990.00000.30440.20220.13820.06790.04130.04660.01180.01360.00870.0000
20000.32430.25590.17500.11760.05930.03430.03840.00960.01120.00720.0000
20010.37340.27700.17860.11880.05500.03300.03760.00950.01090.00700.0000
20020.35870.24550.15860.09980.04830.02890.03370.00840.00970.00630.0000
20030.41330.26880.14870.09610.04840.03020.03450.00860.01000.00640.0000
20040.31150.17480.10670.07230.03840.02310.02640.00660.00760.00490.0000
20050.23980.16090.09770.07290.03660.02210.02520.00630.00730.00470.0000
20060.24680.16200.11720.08030.04030.02430.02770.00690.00800.00520.0000
20070.29090.19670.12560.08600.04320.02600.02970.00740.00860.00550.0000
20080.29750.19830.12670.08670.04350.02620.02990.00750.00870.00560.0000
" - ], - "text/plain": [ - " 12 24 36 48 60 72 84 96 108 120 132\n", - "1998 0.000000 0.000000 0.245040 0.174079 0.088551 0.053698 0.060944 0.014560 0.016943 0.010981 0.0\n", - "1999 0.000000 0.304387 0.202207 0.138212 0.067907 0.041314 0.046626 0.011829 0.013604 0.008721 0.0\n", - "2000 0.324294 0.255933 0.175009 0.117563 0.059282 0.034309 0.038425 0.009618 0.011162 0.007186 0.0\n", - "2001 0.373352 0.277014 0.178627 0.118808 0.055043 0.033049 0.037623 0.009456 0.010949 0.007049 0.0\n", - "2002 0.358728 0.245539 0.158630 0.099799 0.048304 0.028859 0.033653 0.008407 0.009734 0.006267 0.0\n", - "2003 0.413305 0.268816 0.148654 0.096134 0.048404 0.030234 0.034488 0.008616 0.009976 0.006422 0.0\n", - "2004 0.311455 0.174828 0.106746 0.072331 0.038398 0.023148 0.026405 0.006597 0.007638 0.004917 0.0\n", - "2005 0.239780 0.160909 0.097652 0.072868 0.036584 0.022054 0.025158 0.006285 0.007277 0.004685 0.0\n", - "2006 0.246799 0.162021 0.117235 0.080257 0.040294 0.024291 0.027709 0.006922 0.008015 0.005160 0.0\n", - "2007 0.290935 0.196728 0.125628 0.086003 0.043178 0.026030 0.029693 0.007418 0.008589 0.005529 0.0\n", - "2008 0.297459 0.198330 0.126651 0.086704 0.043530 0.026242 0.029935 0.007478 0.008659 0.005574 0.0" - ] - }, - "execution_count": 31, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "mcl_mod.full_std_err_" - ] - }, - { - "cell_type": "markdown", - "id": "bdb08c81-5921-4c41-ad63-96168ffd48b7", - "metadata": {}, - "source": [ - "MackChainladder also has a `summary_` attribute." - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "id": "81fc38c1-d5b7-4262-94ae-bce5c7ac17e1", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
LatestIBNRUltimateMack Std Err
199815,82215,822
199925,107-2125,086352
200037,246-29436,952751
200138,798-39738,401893
200248,16941348,5822,190
200344,3731,88546,2582,614
200470,2888,62678,9145,004
200570,65516,27886,9338,487
200648,80422,85871,66210,738
200731,73230,67462,40613,925
200818,63242,77061,40218,019
" - ], - "text/plain": [ - " Latest IBNR Ultimate Mack Std Err\n", - "1998 15822.0 NaN 15822.000000 NaN\n", - "1999 25107.0 -20.611999 25086.388001 352.069939\n", - "2000 37246.0 -294.120010 36951.879990 750.954565\n", - "2001 38798.0 -397.386298 38400.613702 892.719893\n", - "2002 48169.0 413.226476 48582.226476 2190.044383\n", - "2003 44373.0 1884.941381 46257.941381 2613.888360\n", - "2004 70288.0 8625.510138 78913.510138 5004.358291\n", - "2005 70655.0 16278.374265 86933.374265 8486.846704\n", - "2006 48804.0 22857.720703 71661.720703 10738.482249\n", - "2007 31732.0 30673.722716 62405.722716 13925.203501\n", - "2008 18632.0 42769.770743 61401.770743 18019.072745" - ] - }, - "execution_count": 32, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "mcl_mod.summary_" - ] - }, - { - "cell_type": "markdown", - "id": "0e285585-62b6-48e4-8b1d-c5824ae5df46", - "metadata": {}, - "source": [ - "Let's make a graph." - ] - }, - { - "cell_type": "code", - "execution_count": 33, - "id": "e615b86e-a907-4445-9e95-645090719f76", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 33, - "metadata": {}, - "output_type": "execute_result" - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAD8CAYAAABpcuN4AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAazElEQVR4nO3df5RU5Z3n8fdHfsgPIwLir26dZo9Mjogiggij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jvwOL0uJ+k/mn5fGBvRLwOvAsMl9R8ca3zye2DLLu0H3MJsD4ifpD31EpgZlqeCTySV6+TdHjavTYMWJOmxTskjUvbvCyvTVkVa4xpWzcBA4BrStD1Nini73BRRJwQETXAucCbEVFbijFkKeL4AvgVUJvWmwi83sndb5Mi/o2W7r2mM46Qd9cbuRnDZmAPuRSfBVxN7lMJbwIL+NeTFGvIXaV2PfAP5K682Lyd/5Tqr5D7Yx1c7rGlfp1Lblr+CvBSuv17YDC5/e8N6X5QXpv/Rm4WtYG8T/2QO3C/Lj33v5p/LuW+FWuM5P7XFun32LydvzlUxtdimzV0nU89FfNv9M/IfRDlldTmpHKPrxPGWJL3Gp+ZbWZmmbzryczMMjkozMwsk4PCzMwyOSjMzCyTg8LMzDI5KMzMLJODwszMMjkozMws0/8H5v2yUTMAZAoAAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "plt.bar(\n", - " mcl_mod.summary_.to_frame(origin_as_datetime=True).index.year,\n", - " mcl_mod.summary_.to_frame(origin_as_datetime=True)[\"Latest\"],\n", - " label=\"Paid\",\n", - ")\n", - "plt.bar(\n", - " mcl_mod.summary_.to_frame(origin_as_datetime=True).index.year,\n", - " mcl_mod.summary_.to_frame(origin_as_datetime=True)[\"IBNR\"],\n", - " bottom=mcl_mod.summary_.to_frame(origin_as_datetime=True)[\"Latest\"],\n", - " yerr=mcl_mod.summary_.to_frame(origin_as_datetime=True)[\"Mack Std Err\"],\n", - " label=\"Reserves\",\n", - ")\n", - "plt.legend(loc=\"upper left\")" - ] - }, - { - "cell_type": "markdown", - "id": "785120ad-03cf-48a7-90d8-d1d56a75ef88", - "metadata": {}, - "source": [ - "ODP Bootstrap is also available. Let's build some sampled triangles." - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "id": "859e19f3-d526-435c-a845-4845a7a3956d", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
Triangle Summary
Valuation:2008-12
Grain:OYDY
Shape:(10000, 1, 11, 11)
Index:[Total]
Columns:[Incurred]
" - ], - "text/plain": [ - " Triangle Summary\n", - "Valuation: 2008-12\n", - "Grain: OYDY\n", - "Shape: (10000, 1, 11, 11)\n", - "Index: [Total]\n", - "Columns: [Incurred]" - ] - }, - "execution_count": 34, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "xyz_tri_sampled = (\n", - " cl.BootstrapODPSample(n_sims=10000).fit(xyz_tri[\"Incurred\"]).resampled_triangles_\n", - ")\n", - "xyz_tri_sampled" - ] - }, - { - "cell_type": "code", - "execution_count": 35, - "id": "fe6dbe70-1b2a-4fb0-aa6b-56380534704f", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/opt/anaconda3/lib/python3.9/site-packages/chainladder/utils/weighted_regression.py:76: RuntimeWarning: invalid value encountered in sqrt\n", - " residual = (y - fitted_value) * xp.sqrt(w)\n", - "/opt/anaconda3/lib/python3.9/site-packages/chainladder/utils/weighted_regression.py:81: RuntimeWarning: invalid value encountered in sqrt\n", - " std_err = xp.sqrt(mse / d)\n", - "/opt/anaconda3/lib/python3.9/site-packages/chainladder/development/development.py:182: RuntimeWarning: invalid value encountered in sqrt\n", - " / xp.swapaxes(xp.sqrt(x ** (2 - exponent))[..., 0:1, :], -1, -2)\n", - "/opt/anaconda3/lib/python3.9/site-packages/chainladder/development/development.py:192: RuntimeWarning: invalid value encountered in sqrt\n", - " std = xp.sqrt((1 / num_to_nan(w)) * (self.sigma_ ** 2).values)\n", - "/opt/anaconda3/lib/python3.9/site-packages/chainladder/tails/base.py:120: RuntimeWarning: overflow encountered in exp\n", - " sigma_ = xp.exp(time_pd * reg.slope_ + reg.intercept_)\n", - "/opt/anaconda3/lib/python3.9/site-packages/chainladder/tails/base.py:124: RuntimeWarning: overflow encountered in exp\n", - " std_err_ = xp.exp(time_pd * reg.slope_ + reg.intercept_)\n", - "/opt/anaconda3/lib/python3.9/site-packages/chainladder/tails/base.py:127: RuntimeWarning: invalid value encountered in multiply\n", - " sigma_ = sigma_ * 0\n", - "/opt/anaconda3/lib/python3.9/site-packages/chainladder/tails/base.py:128: RuntimeWarning: invalid value encountered in multiply\n", - " std_err_ = std_err_* 0\n" - ] - }, - { - "data": { - "text/html": [ - "
Chainladder()
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" - ], - "text/plain": [ - "Chainladder()" - ] - }, - "execution_count": 35, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "cl_mod_bootstrapped = cl.Chainladder().fit(xyz_tri_sampled)\n", - "cl_mod_bootstrapped" - ] - }, - { - "cell_type": "markdown", - "id": "bb3d7c32-9e75-4ae4-ab23-0ca3f2a436b5", - "metadata": {}, - "source": [ - "Let's make another graph." - ] - }, - { - "cell_type": "code", - "execution_count": 36, - "id": "edeba1db-97e6-43df-b1c0-590c2d7cd098", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 36, - "metadata": {}, - "output_type": "execute_result" - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAD4CAYAAADy46FuAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAUeElEQVR4nO3df7Bc5X3f8ffHKBBsF8wPQbFEIzKobmVmYhsNIT8mvR01RonTiGmhlTsJmloZTRnS2Gk7HdF2xm1tppCmtkNb6GgMtnAdg4LdgdQlLhVm3LQMWPgX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KUt/yxwoKoeBf4QWJNk9iqMP8vgGOTUteOYNwGPVdXHhlbdCWxqy5uAO4bqG5Oc1A6vrQYeaNPiV5Jc3PZ5xVCbqRrXGNu+PgqcCnxoAl0/LGN8Dm+sqrdX1Srgp4FvV9XMJMbQM8bxFfC7wEzbbh3w6FHu/mEZ42t0cu81R+MM+VK9MZgx7AX+jEGKbwY+yOBTCd8GruX1b7OvYnA588eA/8HgEr2z+/kHrf4tBi/WM6Y9ttavn2YwLf8W8I12+3ngDAbH359o96cPtfnnDGZRjzP0qR8GJ+4fbuv+w+x/l2nfxjVGBn+1VXseZ/fzK8fK+ObscxWL51NP43yN/giDD6J8q7X5S9Me31EY40Tea7yEhySpy0NPkqQug0KS1GVQSJK6DApJUpdBIUnqMigkSV0GhSSp6/8B5I+OOyfcSJMAAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "plt.bar(\n", - " cl_mod_bootstrapped.ultimate_.mean().to_frame(origin_as_datetime=True).index.year,\n", - " cl_mod_bootstrapped.ultimate_.mean().to_frame(origin_as_datetime=True)[\"2261\"],\n", - " yerr=cl_mod_bootstrapped.ultimate_.std().to_frame(origin_as_datetime=True)[\"2261\"],\n", - ")" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "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.9.12" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -}