Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b3a5b13
Chapter 11 prep (#1078)
henrydingliu Jun 30, 2026
fea1475
adding chapter 11
henrydingliu Jun 30, 2026
b7be956
Update _toc.yml
henrydingliu Jun 30, 2026
52a53b0
adding narrative
henrydingliu Jun 30, 2026
5fc60fd
Update triangle.py
henrydingliu Jun 30, 2026
44d0119
Merge pull request #1085 from casact/main
henrydingliu Jul 2, 2026
94df385
Merge branch 'main' into chapter_11_parking
henrydingliu Aug 1, 2026
a108767
Update triangle_weight.py
henrydingliu Aug 1, 2026
dc2919e
Update triangle_weight.py
henrydingliu Aug 1, 2026
6508949
reverting to data given by the text
henrydingliu Aug 3, 2026
0b9b926
updating exhibit
henrydingliu Aug 3, 2026
916ae0b
reverting xyz changes
henrydingliu Aug 3, 2026
61163d7
reverting to data given by the text
henrydingliu Aug 3, 2026
dd4a4da
updating exhibit
henrydingliu Aug 3, 2026
e79195c
reverting xyz changes
henrydingliu Aug 3, 2026
adef864
Merge branch 'main' into chapter_11_parking
henrydingliu Aug 3, 2026
ca41421
Update _toc.yml
henrydingliu Aug 3, 2026
5fe56c6
Merge branch 'chapter_11' of https://github.com/henrydingliu/chainlad…
henrydingliu Aug 3, 2026
d01c817
removing a debugging cell
henrydingliu Aug 3, 2026
cba3b81
removing a debugging cell
henrydingliu Aug 3, 2026
abdd11d
more formatting
henrydingliu Aug 3, 2026
819dae7
Merge branch 'chapter_11_parking' into chapter_11
henrydingliu Aug 3, 2026
62743b0
updating exhibit
henrydingliu Aug 3, 2026
1124554
removing a debugging cell
henrydingliu Aug 3, 2026
fe37feb
more formatting
henrydingliu Aug 3, 2026
dd18092
fixing doctest
henrydingliu Aug 3, 2026
901ded6
Merge pull request #1188 from henrydingliu/chapter_11
henrydingliu Aug 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion chainladder/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def nan_triangle(self):
This becomes useful when managing array arithmetic.
"""
xp = self.get_array_module()
if self.is_pattern or self.is_ultimate:
if self.is_ultimate:
return xp.ones(self.values.shape[2:], dtype="float16")
val_array = np.array(self.valuation).reshape(self.shape[-2:], order="f")
nan_triangle = np.array(pd.DataFrame(val_array) > self.valuation_date)
Expand Down Expand Up @@ -601,6 +601,9 @@ def _drop_subtriangles(self):
del self.sigma_
if "std_err_" in sub_tris:
del self.std_err_
#w_ is currently stored as an ndarray
if hasattr(self, "w_"):
del self.w_

@property
def subtriangles(self):
Expand Down
8 changes: 1 addition & 7 deletions chainladder/utils/data/_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
"Reported Claim Counts",
"Disposal Rate",
"Paid Claims",
"Reported Claims",
],
"cumulative": True,
},
Expand Down Expand Up @@ -284,13 +285,6 @@
"columns": ["Paid Claims", "Reported Claims", "Closed Claim Counts", "Reported Claim Counts", "Case Outstanding", "Reported Severities", "Earned Premium"],
"cumulative": True,
},
"friedland_xyz_disp": {
"origin": "Accident Year",
"development": "Calendar Year",
"index": None,
"columns": ["Disposal Rate", "Closed Claim Counts", "Paid Claims"],
"cumulative": True,
},
"genins": {
"origin": "origin",
"development": "development",
Expand Down
112 changes: 56 additions & 56 deletions chainladder/utils/data/friedland_auto_freq_sev.csv
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
Accident Half-Year,Calendar Half-Year,Closed Claim Counts,Reported Claim Counts,Reported Claims,Reported Severity,Paid Claims
2003-07,2003-07,2547,3556,14235000,4003,
2003-07,2004-01,3262,3314,14960000,4514,
2003-07,2004-07,3287,3301,14921000,4520,
2003-07,2005-01,3291,3299,14911000,4520,
2003-07,2005-07,3292,3295,14926000,4530,
2003-07,2006-01,3292,3294,14864000,4512,
2003-07,2006-07,3292,3293,14860000,4513,
2003-07,2007-01,3292,3293,14854000,4511,
2003-07,2007-07,3292,3293,14850000,4510,
2003-07,2008-01,3292,3292,14847000,4510,14846000
2004-01,2004-01,2791,3492,14548000,4166,
2004-01,2004-07,3217,3262,14674000,4498,
2004-01,2005-01,3240,3250,14643000,4506,
2004-01,2005-07,3242,3247,14626000,4505,
2004-01,2006-01,3243,3247,14621000,4503,
2004-01,2006-07,3243,3245,14610000,4502,
2004-01,2007-01,3243,3245,14610000,4502,
2004-01,2007-07,3243,3244,14611000,4504,
2004-01,2008-01,3242,3243,14617000,4507,14614000
2004-07,2004-07,2099,2980,12129000,4070,
2004-07,2005-01,2677,2712,12576000,4637,
2004-07,2005-07,2695,2704,12541000,4638,
2004-07,2006-01,2697,2702,12531000,4638,
2004-07,2006-07,2697,2700,12523000,4683,
2004-07,2007-01,2698,2700,12523000,4638,
2004-07,2007-07,2698,2699,12510000,4635,
2004-07,2008-01,2698,2699,12502000,4632,12502000
2005-01,2005-01,2370,2896,11980000,4137,
2005-01,2005-07,2735,2768,11921000,4307,
2005-01,2006-01,2751,2761,11882000,4304,
2005-01,2006-07,2754,2758,11862000,4301,
2005-01,2007-01,2755,2758,11854000,4298,
2005-01,2007-07,2755,2758,11844000,4294,
2005-01,2008-01,2756,2757,11841000,4295,11840000
2005-07,2005-07,1966,2814,11283000,4010,
2005-07,2006-01,2609,2650,11843000,4469,
2005-07,2006-07,2630,2640,11805000,4472,
2005-07,2007-01,2634,2639,11789000,4467,
2005-07,2007-07,2634,2638,11772000,4462,
2005-07,2008-01,2634,2636,11770000,4465,11765000
2006-01,2006-01,2261,2808,11947000,4254,
2006-01,2006-07,2671,2712,11856000,4372,
2006-01,2007-01,2694,2704,11820000,4371,
2006-01,2007-07,2696,2701,11772000,4359,
2006-01,2008-01,2697,2700,11760000,4356,11755000
2006-07,2006-07,1949,2799,12503000,4467,
2006-07,2007-01,2637,2675,12762000,4771,
2006-07,2007-07,2659,2670,12706000,4759,
2006-07,2008-01,2662,2668,12697000,4759,12679000
2007-01,2007-01,2059,2578,11662000,4524,
2007-01,2007-07,2496,2533,11523000,4549,
2007-01,2008-01,2520,2529,11492000,4544,11406000
2007-07,2007-07,2083,2791,12647000,4531,
2007-07,2008-01,2732,2778,12854000,4627,12648000
2008-01,2008-01,2533,3139,14071000,4483,11833000
Accident Half-Year,Calendar Half-Year,Closed Claim Counts,Reported Claim Counts,Reported Claims,Reported Severity,Paid Claims
2003-07,2003-07,2547,3556,14234668,4003,
2003-07,2004-01,3262,3314,14959396,4514,
2003-07,2004-07,3287,3301,14920520,4520,
2003-07,2005-01,3291,3299,14911480,4520,
2003-07,2005-07,3292,3295,14926350,4530,
2003-07,2006-01,3292,3294,14862528,4512,
2003-07,2006-07,3292,3293,14861309,4513,
2003-07,2007-01,3292,3293,14854723,4511,
2003-07,2007-07,3292,3293,14851430,4510,
2003-07,2008-01,3292,3292,14846920,4510,14846000
2004-01,2004-01,2791,3492,14547672,4166,
2004-01,2004-07,3217,3262,14672476,4498,
2004-01,2005-01,3240,3250,14644500,4506,
2004-01,2005-07,3242,3247,14627735,4505,
2004-01,2006-01,3243,3247,14621241,4503,
2004-01,2006-07,3243,3245,14608990,4502,
2004-01,2007-01,3243,3245,14608990,4502,
2004-01,2007-07,3243,3244,14610976,4504,
2004-01,2008-01,3242,3243,14616201,4507,14614000
2004-07,2004-07,2099,2980,12128600,4070,
2004-07,2005-01,2677,2712,12575544,4637,
2004-07,2005-07,2695,2704,12541152,4638,
2004-07,2006-01,2697,2702,12531876,4638,
2004-07,2006-07,2697,2700,12522600,4683,
Comment thread
cursor[bot] marked this conversation as resolved.
Outdated
2004-07,2007-01,2698,2700,12522600,4638,
2004-07,2007-07,2698,2699,12509865,4635,
2004-07,2008-01,2698,2699,12501768,4632,12502000
2005-01,2005-01,2370,2896,11980752,4137,
2005-01,2005-07,2735,2768,11921776,4307,
2005-01,2006-01,2751,2761,11883344,4304,
2005-01,2006-07,2754,2758,11862158,4301,
2005-01,2007-01,2755,2758,11853884,4298,
2005-01,2007-07,2755,2758,11842852,4294,
2005-01,2008-01,2756,2757,11841315,4295,11840000
2005-07,2005-07,1966,2814,11284140,4010,
2005-07,2006-01,2609,2650,11842850,4469,
2005-07,2006-07,2630,2640,11806080,4472,
2005-07,2007-01,2634,2639,11788413,4467,
2005-07,2007-07,2634,2638,11770756,4462,
2005-07,2008-01,2634,2636,11769740,4465,11765000
2006-01,2006-01,2261,2808,11945232,4254,
2006-01,2006-07,2671,2712,11856864,4372,
2006-01,2007-01,2694,2704,11819184,4371,
2006-01,2007-07,2696,2701,11773659,4359,
2006-01,2008-01,2697,2700,11761200,4356,11755000
2006-07,2006-07,1949,2799,12503133,4467,
2006-07,2007-01,2637,2675,12762425,4771,
2006-07,2007-07,2659,2670,12706530,4759,
2006-07,2008-01,2662,2668,12697012,4759,12679000
2007-01,2007-01,2059,2578,11662872,4524,
2007-01,2007-07,2496,2533,11522617,4549,
2007-01,2008-01,2520,2529,11491776,4544,11406000
2007-07,2007-07,2083,2791,12646021,4531,
2007-07,2008-01,2732,2778,12853806,4627,12648000
2008-01,2008-01,2533,3139,14072137,4483,11833000
74 changes: 37 additions & 37 deletions chainladder/utils/data/friedland_gl_insurer.csv
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
Accident Year,Calendar Year,Closed Claim Counts,Reported Claim Counts,Disposal Rate,Paid Claims
2001,2001,195,1299,0.223,1119962
2001,2002,375,1077,0.43,4373268
2001,2003,510,1057,0.584,8398345
2001,2004,625,965,0.716,13490793
2001,2005,702,930,0.804,17372233
2001,2006,752,917,0.862,22052662
2001,2007,780,864,0.894,27359691
2001,2008,796,870,0.912,29901361
2002,2002,199,847,0.277,1411957
2002,2003,349,945,0.485,6287005
2002,2004,445,864,0.618,11443820
2002,2005,508,787,0.706,15520552
2002,2006,563,784,0.782,21295572
2002,2007,594,743,0.826,28410418
2002,2008,626,731,0.87,32468911
2003,2003,106,800,0.169,984748
2003,2004,294,831,0.47,6128957
2003,2005,383,762,0.612,10470758
2003,2006,453,704,0.724,14604684
2003,2007,499,669,0.797,21936647
2003,2008,542,636,0.866,23942499
2004,2004,126,823,0.2,1158659
2004,2005,281,862,0.447,5811172
2004,2006,377,797,0.599,10497504
2004,2007,445,728,0.707,15087416
2004,2008,494,684,0.785,18242570
2005,2005,114,828,0.194,1198767
2005,2006,249,850,0.423,5103837
2005,2007,315,765,0.536,9042134
2005,2008,403,687,0.685,15443929
2006,2006,114,824,0.206,1220778
2006,2007,229,809,0.414,4594746
2006,2008,300,734,0.543,8983864
2007,2007,79,604,0.18,796774
2007,2008,188,620,0.429,4233641
2008,2008,127,812,0.209,1445365
Accident Year,Calendar Year,Closed Claim Counts,Reported Claim Counts,Disposal Rate,Paid Claims,Reported Claims
2001,2001,195,1299,0.223,1119962,
2001,2002,375,1077,0.43,4373268,
2001,2003,510,1057,0.584,8398345,
2001,2004,625,965,0.716,13490793,
2001,2005,702,930,0.804,17372233,
2001,2006,752,917,0.862,22052662,
2001,2007,780,864,0.894,27359691,
2001,2008,796,870,0.912,29901361,35592000
2002,2002,199,847,0.277,1411957,
2002,2003,349,945,0.485,6287005,
2002,2004,445,864,0.618,11443820,
2002,2005,508,787,0.706,15520552,
2002,2006,563,784,0.782,21295572,
2002,2007,594,743,0.826,28410418,
2002,2008,626,731,0.87,32468911,36330000
2003,2003,106,800,0.169,984748,
2003,2004,294,831,0.47,6128957,
2003,2005,383,762,0.612,10470758,
2003,2006,453,704,0.724,14604684,
2003,2007,499,669,0.797,21936647,
2003,2008,542,636,0.866,23942499,31900000
2004,2004,126,823,0.2,1158659,
2004,2005,281,862,0.447,5811172,
2004,2006,377,797,0.599,10497504,
2004,2007,445,728,0.707,15087416,
2004,2008,494,684,0.785,18242570,39716000
2005,2005,114,828,0.194,1198767,
2005,2006,249,850,0.423,5103837,
2005,2007,315,765,0.536,9042134,
2005,2008,403,687,0.685,15443929,32667000
2006,2006,114,824,0.206,1220778,
2006,2007,229,809,0.414,4594746,
2006,2008,300,734,0.543,8983864,27774000
2007,2007,79,604,0.18,796774,
2007,2008,188,620,0.429,4233641,16246000
2008,2008,127,812,0.209,1445365,8216000
134 changes: 67 additions & 67 deletions chainladder/utils/data/friedland_xyz_auto_bi.csv
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
Accident Year,Calendar Year,Paid Claims,Reported Claims,Closed Claim Counts,Reported Claim Counts,Case Outstanding,Reported Severities,Earned Premium
1998,1998,,,,,,,20000
1998,1999,,,,,,,20000
1998,2000,6309,11171,,,4861,,20000
1998,2001,8521,12380,510,634,3859,19526,20000
1998,2002,10082,13216,547,635,3134,20813,20000
1998,2003,11620,14067,575,635,2447,22152,20000
1998,2004,13242,14688,598,637,1446,23058,20000
1998,2005,14419,16366,612,637,1947,25692,20000
1998,2006,15311,16163,620,637,853,25374,20000
1998,2007,15764,15835,635,637,71,24859,20000
1998,2008,15822,15822,637,637,0,24839,20000
1999,1999,,,,,,,31500
1999,2000,4666,13255,,,8589,,31500
1999,2001,9861,16405,686,1026,6544,15989,31500
1999,2002,13971,19639,819,1039,5668,18902,31500
1999,2003,18127,22473,910,1047,4347,21464,31500
1999,2004,22032,23764,980,1050,1732,22632,31500
1999,2005,23511,25094,1007,1053,1583,23831,31500
1999,2006,24146,24795,1036,1047,649,23682,31500
1999,2007,24592,25071,1039,1047,479,23946,31500
1999,2008,24817,25107,1044,1047,290,23980,31500
2000,2000,1302,15676,,,14374,,45000
2000,2001,6513,18749,650,1354,12237,13847,45000
2000,2002,12139,21900,932,1397,9760,15676,45000
2000,2003,17828,27144,1095,1411,9316,19237,45000
2000,2004,24030,29488,1216,1410,5458,20914,45000
2000,2005,28853,34458,1292,1408,5605,24473,45000
2000,2006,33222,36949,1367,1408,3727,26242,45000
2000,2007,35902,37505,1391,1408,1603,26637,45000
2000,2008,36782,37246,1402,1408,465,26453,45000
2001,2001,1539,11827,304,1305,10288,9063,50000
2001,2002,5952,16004,681,1421,10052,11262,50000
2001,2003,12319,21022,936,1449,8703,14508,50000
2001,2004,18609,26578,1092,1458,7969,18229,50000
2001,2005,24387,34205,1225,1458,9818,23460,50000
2001,2006,31090,37136,1357,1455,6046,25523,50000
2001,2007,37070,38541,1432,1455,1471,26489,50000
2001,2008,38519,38798,1446,1455,278,26665,50000
2002,2002,2318,12811,203,1342,10494,9546,61183
2002,2003,7932,20370,607,1514,12439,13455,61183
2002,2004,13822,26656,841,1548,12833,17219,61183
2002,2005,22095,37667,1089,1557,15572,24192,61183
2002,2006,31945,44414,1327,1549,12469,28673,61183
2002,2007,40629,48701,1464,1552,8072,31379,61183
2002,2008,44437,48169,1523,1554,3731,30997,61183
2003,2003,1743,9651,181,1373,7908,7029,69175
2003,2004,6240,16995,614,1616,10755,10517,69175
2003,2005,12683,30354,941,1630,17671,18622,69175
2003,2006,22892,40594,1263,1626,17702,24966,69175
2003,2007,34505,44231,1507,1629,9726,27152,69175
2003,2008,39320,44373,1568,1629,5052,27239,69175
2004,2004,2221,16995,235,1932,14774,8796,99322
2004,2005,9898,40180,848,2168,30281,18533,99322
2004,2006,25950,58866,1442,2234,32916,26350,99322
2004,2007,43439,71707,1852,2249,28268,31884,99322
2004,2008,52811,70288,2029,2258,17477,31129,99322
2005,2005,3043,28674,295,2067,25631,13872,138151
2005,2006,12219,47432,1119,2293,35213,20686,138151
2005,2007,27073,70340,1664,2367,43268,29717,138151
2005,2008,40026,70655,1946,2390,30629,29563,138151
2006,2006,3531,27066,307,1473,23535,18375,107578
2006,2007,11778,46783,906,1645,35005,28440,107578
2006,2008,22819,48804,1201,1657,25985,29453,107578
2007,2007,3529,19477,329,1192,15948,16340,62438
2007,2008,11865,31732,791,1264,19867,25104,62438
2008,2008,3409,18632,276,1036,15223,17985,47797
Accident Year,Calendar Year,Paid Claims,Reported Claims,Closed Claim Counts,Reported Claim Counts,Case Outstanding,Reported Severities,Earned Premium
1998,1998,,,,,,,20000
1998,1999,,,,,,,20000
1998,2000,6309,11171,,,4861,,20000
1998,2001,8521,12380,510,634,3859,19526,20000
1998,2002,10082,13216,547,635,3134,20813,20000
1998,2003,11620,14067,575,635,2447,22152,20000
1998,2004,13242,14688,598,637,1446,23058,20000
1998,2005,14419,16366,612,637,1947,25692,20000
1998,2006,15311,16163,620,637,853,25374,20000
1998,2007,15764,15835,635,637,71,24859,20000
1998,2008,15822,15822,637,637,0,24839,20000
1999,1999,,,,,,,31500
1999,2000,4666,13255,,,8589,,31500
1999,2001,9861,16405,686,1026,6544,15989,31500
1999,2002,13971,19639,819,1039,5668,18902,31500
1999,2003,18127,22473,910,1047,4347,21464,31500
1999,2004,22032,23764,980,1050,1732,22632,31500
1999,2005,23511,25094,1007,1053,1583,23831,31500
1999,2006,24146,24795,1036,1047,649,23682,31500
1999,2007,24592,25071,1039,1047,479,23946,31500
1999,2008,24817,25107,1044,1047,290,23980,31500
2000,2000,1302,15676,,,14374,,45000
2000,2001,6513,18749,650,1354,12237,13847,45000
2000,2002,12139,21900,932,1397,9760,15676,45000
2000,2003,17828,27144,1095,1411,9316,19237,45000
2000,2004,24030,29488,1216,1410,5458,20914,45000
2000,2005,28853,34458,1292,1408,5605,24473,45000
2000,2006,33222,36949,1367,1408,3727,26242,45000
2000,2007,35902,37505,1391,1408,1603,26637,45000
2000,2008,36782,37246,1402,1408,465,26453,45000
2001,2001,1539.456,11827,304,1305,10288,9063,50000
2001,2002,5952.241,16004,681,1421,10052,11262,50000
2001,2003,12319.336,21022,936,1449,8703,14508,50000
2001,2004,18608.788,26578,1092,1458,7969,18229,50000
2001,2005,24386.973,34205,1225,1458,9818,23460,50000
2001,2006,31090.065,37136,1357,1455,6046,25523,50000
2001,2007,37069.815,38541,1432,1455,1471,26489,50000
2001,2008,38519.529,38798,1446,1455,278,26665,50000
2002,2002,2317.651,12811,203,1342,10494,9546,61183
2002,2003,7931.635,20370,607,1514,12439,13455,61183
2002,2004,13822.585,26656,841,1548,12833,17219,61183
2002,2005,22095.617,37667,1089,1557,15572,24192,61183
2002,2006,31945.485,44414,1327,1549,12469,28673,61183
2002,2007,40628.819,48701,1464,1552,8072,31379,61183
2002,2008,44437.623,48169,1523,1554,3731,30997,61183
2003,2003,1743.211,9651,181,1373,7908,7029,69175
2003,2004,6240.349,16995,614,1616,10755,10517,69175
2003,2005,12683.23,30354,941,1630,17671,18622,69175
2003,2006,22892.562,40594,1263,1626,17702,24966,69175
2003,2007,34505.01,44231,1507,1629,9726,27152,69175
2003,2008,39320.472,44373,1568,1629,5052,27239,69175
2004,2004,2221.22,16995,235,1932,14774,8796,99322
2004,2005,9898.432,40180,848,2168,30281,18533,99322
2004,2006,25950.094,58866,1442,2234,32916,26350,99322
2004,2007,43439.464,71707,1852,2249,28268,31884,99322
2004,2008,52811.083,70288,2029,2258,17477,31129,99322
2005,2005,3042.925,28674,295,2067,25631,13872,138151
2005,2006,12218.989,47432,1119,2293,35213,20686,138151
2005,2007,27072.964,70340,1664,2367,43268,29717,138151
2005,2008,40026.352,70655,1946,2390,30629,29563,138151
2006,2006,3531.114,27066,307,1473,23535,18375,107578
2006,2007,11778.146,46783,906,1645,35005,28440,107578
2006,2008,22819.111,48804,1201,1657,25985,29453,107578
2007,2007,3528.854,19477,329,1192,15948,16340,62438
2007,2008,11864.72,31732,791,1264,19867,25104,62438
2008,2008,3408.876,18632,276,1036,15223,17985,47797
Loading
Loading