Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1552 +/- ##
==========================================
+ Coverage 94.39% 94.46% +0.07%
==========================================
Files 98 100 +2
Lines 6222 6307 +85
Branches 799 803 +4
==========================================
+ Hits 5873 5958 +85
Misses 225 225
Partials 124 124
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:
|
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): 11.1% fully typed (5 / 45)
Patch symbol details
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 381fd8d. Configure here.
| inc = inc_tri.values # (index, column, origin, development) | ||
| # Exposure of each origin, broadcast to the shape of X. | ||
| V = self.sample_weight_.set_backend("numpy").latest_diagonal.values | ||
| V = np.broadcast_to(V, inc.shape[:3] + (1,)) |
There was a problem hiding this comment.
Weights paired by position not labels
Medium Severity
fit only checks that X and sample_weight have the same number of origin periods, then reads both as numpy arrays. Origins and index rows are paired by position, so matching counts with different or reordered labels still run and assign the wrong exposures to the loss ratio pattern and reserves.
Reviewed by Cursor Bugbot for commit 381fd8d. Configure here.
| ) | ||
| # Skip MethodBase.fit: it fits a Development, which this method does not use. | ||
| X = X.incr_to_cum().val_to_dev() if not X.is_cumulative else X.val_to_dev() | ||
| self.X_ = X |
There was a problem hiding this comment.
Pattern properties crash after fit
Low Severity
fit skips MethodBase.fit, so X_ never gets ldf_. Inherited full_triangle_ then fails with a missing ldf_ error on the triangle. predict already raises a clear NotImplementedError; these pattern-based attributes do not.
Reviewed by Cursor Bugbot for commit 381fd8d. Configure here.


Summary of Changes
Add a new estimator,
HurlimannCLRto implement the Hurlimann paper.Related GitHub Issue(s)
#1502
AI/LLM Usage
Claude Opus 5.5
Additional Context for Reviewers
Submitter's Checklist
[FIX],[FEAT],[DOCS],[TST],[CHORE], or[BRK]).Reviewer's Checklist
Note
Low Risk
Additive reserving method with no changes to existing estimators; risk is mainly actuarial correctness, which is heavily regression-tested against published examples.
Overview
This PR introduces
HurlimannCLR, a new IBNR estimator implementing Hürlimann’s credible loss ratio model. Reserves blend individual and collective components via a selectable credibility weight (optimal,benktander,neuhaus,collective,individual), with payout patterns driven by incremental claims and required exposure passed assample_weightrather than link-ratio development factors.The implementation bypasses the usual
MethodBasedevelopment fit, exposes diagnostic triangles (m_,elr_,p_,credibility_,mse_, etc.), and does not supportpredict.HurlimannCLRis wired into the package exports, API docs, and bibliography.Coverage includes extensive pytest checks against the paper’s Section 7 tables (with errata) plus a user-guide verification notebook.
Reviewed by Cursor Bugbot for commit 381fd8d. Bugbot is set up for automated code reviews on this repo. Configure here.