Repository navigation
Conversation
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): 0.0% fully typed (0 / 25)
Patch symbol details
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1560 +/- ##
==========================================
- Coverage 94.59% 94.58% -0.01%
==========================================
Files 98 98
Lines 6233 6302 +69
Branches 799 800 +1
==========================================
+ Hits 5896 5961 +65
- Misses 216 218 +2
- Partials 121 123 +2
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:
|
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.
Reviewed by Cursor Bugbot for commit 7d360d3. Configure here.
| xp = out.get_array_module() | ||
| den = xp.copy(case_sliced[..., :-1]) | ||
| den[den == 0] = xp.nan | ||
| out.values = num / den |
There was a problem hiding this comment.
Ratio assignment ignores dropped developments
Medium Severity
case_to_prior_case_ and paid_to_prior_case_ valuation-filter the incurred template first, then write num / den from origin-prefix slices of the unfiltered arrays. That filter can drop trailing development periods (single-origin triangles or empty last lags), so the assigned values no longer match out.values and fitting raises a shape error. link_ratio avoids this by computing ratios first, then filtering.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 7d360d3. Configure here.


Summary of Changes
Routes selection weights in CaseOutstanding through TriangleWeight, bringing full parameter parity with Development (medial averages, drop high/low, drop valuation, preserve) across paid and case ratios. Also adds symmetric shorthand aliases and ensures diagnostic ratio properties retain unweighted historical values.
Related GitHub Issue(s)
Closes #1512
AI/LLM Usage
Used basic model for initial unit test drafting.
Additional Context for Reviewers
Includes test coverage in test_outstanding.py reconciling 5-year medial (5x1) selections against Friedland Chapter 12 Exhibit I and validating scikit-learn clone compatibility.
Submitter's Checklist
[FIX],[FEAT],[DOCS],[TST],[CHORE], or[BRK]).Reviewer's Checklist
Note
Medium Risk
Changes core loss-development weighting and ratio math in CaseOutstanding and broadens warning suppression on Triangle aggregates; well covered by tests but affects actuarial outputs.
Overview
CaseOutstanding gains Development-parity selection via
TriangleWeight: paid/case medial averages, drop high/low, origin/dev drops, valuation drops, thresholds, and shorthand aliases (n_periods,drop_high, etc.). Fitting builds weightedpaid_ldf_/case_ldf_from origin-level ratios, keeps diagnostic*_to_prior_case_unweighted, and treats zero case runoff as0.0instead of defaulting to1.0. Ratio properties are reworked to respect valuation cutoffs and zero denominators.Triangle aggregation now always suppresses empty/All-NaN slice
RuntimeWarnings during reduce, not only on partially developed index/column aggregations.Tests add Friedland 5×1 medial benchmarks, sklearn
clone, drop/valuation alignment withDevelopment, and zero-reserve/warning cases.Reviewed by Cursor Bugbot for commit 7d360d3. Bugbot is set up for automated code reviews on this repo. Configure here.