Friedland Chapter 15 - DC Insurer monitoring (Exhibit IV) - #1224
Friedland Chapter 15 - DC Insurer monitoring (Exhibit IV)#1224EKtheSage wants to merge 1 commit into
Conversation
Recreate Exhibit IV Sheets 2-4 (actual-versus-expected reported) without depending on Chapters 7-10 JSON. Co-authored-by: Cursor <cursoragent@cursor.com>
Pyright Type CompletenessView the full Project (full
Other symbols referenced but not exported by
Symbols without documentation:
Patch (exported symbols added or changed by this PR): no exported symbol type-completeness changes detected. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 80893d2. Configure here.
| " \"\"\"Expected emergence between two valuations (Friedland Exhibit IV).\"\"\"\n", | ||
| " unreported = 1.0 - pct_from\n", | ||
| " emergence = np.where(unreported > 0, (ultimate - reported) / unreported, 0.0)\n", | ||
| " return emergence * (pct_to - pct_from)" |
There was a problem hiding this comment.
Unsafe zero-division in emergence
Low Severity
expected_reported uses np.where with a divide that still runs when pct_from is 1.0, so mature years trigger RuntimeWarning: invalid value encountered in divide. Those warnings are baked into the Sheet 3 and Sheet 4 outputs (including a local Users\EthanKang path), so the docs notebook renders with stderr noise even though the selected values stay 0.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 80893d2. Configure here.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1224 +/- ##
=======================================
Coverage 91.31% 91.31%
=======================================
Files 91 91
Lines 5434 5434
Branches 700 700
=======================================
Hits 4962 4962
Misses 336 336
Partials 136 136
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
On the two questions: DC Insurer as a sample dataset. I would not add one in this PR. Sheets 2-4 only use the 12/31/2007 latest diagonal and the selected CDFs. The quarterly triangle in Sheet 1 was not reconstructable from the PDF extract, and the other Friedland samples exist because those chapters reuse the full triangle. Shipping Expected emergence as a Triangle property/method. I would not add one here either. Fitted objects already expose the next-period expected:
Friedland's formula is the incremental expected from |
this is not true. Based on the selected tail factor, we can safely assume there's no development beyond 36 months
this is also not true. there are single diagonal datasets from chapter 8 that are loaded as sample data.
please use the fitted object in the exhibit. the point is to use chainladder objects to produce matching exhibits, rather than demonstrating pandas manipulation. |


Summary
docs/friedland/chapter_15_monitoring.ipynbrecreating Friedland Exhibit IV Sheets 2-4: selected ultimates at 12/31/2007, then annual and monthly actual-versus-expected reported claims.DevelopmentConstant/Chainladderfor the Sheet 2 ultimates and the printed reporting-pattern formula for expected emergence. No new sample CSV — Sheet 1's quarterly triangle is not required for the monitoring tests.Related to #588.
Test plan
pytest --nbmake docs/friedland/chapter_15_monitoring.ipynbMade with Cursor