Skip to content

[DOCS] Add Hurlimann verification notebook. - #1554

Draft
genedan wants to merge 1 commit into
hurlimann-estimatorfrom
hurlimann-verification
Draft

genedan wants to merge 1 commit into
hurlimann-estimatorfrom
hurlimann-verification

Conversation

@genedan

@genedan genedan commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Summary of Changes

Adds notebook to verify that the HurlimannCLR estimator, introduced in #1553, reproduces the values in the paper.

Related GitHub Issue(s)

#1502

AI/LLM Usage

Claude Opus 5.5

Additional Context for Reviewers

Submitter's Checklist

  • I have reviewed and am adhering to the standards outlined in the project Governing Doc.
  • The PR subject title summarizes the changes, with one proper prefix ([FIX], [FEAT], [DOCS], [TST], [CHORE], or [BRK]).
  • I am a human (not a bot), and this PR form is written by a human.

Reviewer's Checklist

  • The implementation addresses the associated issue(s).
  • The implementation is appropriate, maintainable, and follows ARCHITECTURE.md.
  • PR subject title has the proper prefix and the subject is appropriate.
  • Relevant issue(s) are linked.
  • AI/LLM usage is disclosed and appropriate.
  • Documentation and tests are appropriate.
  • CI tests passed, or any failures are acceptable.
  • Leave a comment with the final recommendation (e.g. approve as is, request a secondary review, or flag an area for more review).

Note

Low Risk
Documentation-only notebook with assertions against published examples; does not modify reserving logic or runtime behavior.

Overview
Adds docs/user_guide/hurlimann_verification.ipynb, a user-guide notebook that checks cl.HurlimannCLR against the numeric tables in Hürlimann (Astin Bulletin 39(1)), for issue #1502.

The notebook rebuilds the paper’s paid triangles (incremental and cumulative), runs the five credibility method variants with exposure via sample_weight, and asserts outputs against published values for parameters (p_, m_, credibility_), IBNR/ultimates, and MSE ratios. Where the CAS Exam 7 errata fixes misprinted ultimates/MSE columns, the expected values use the corrected tables. For Table 7.12 (A.M. Best comparison), it documents that exposures are least-squares reconstructed because the paper omits them, and still checks all method factors to three decimals.

Low documentation-only change; no library API or estimator behavior changes.

Reviewed by Cursor Bugbot for commit 381fd8d. Bugbot is set up for automated code reviews on this repo. Configure here.

@genedan
genedan added this pull request to stack #1555 November 8, 2026 23:00
@codecov

codecov Bot commented Nov 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.46%. Comparing base (c56cdbd) to head (381fd8d).

Additional details and impacted files
@@                 Coverage Diff                  @@
##           hurlimann-estimator    #1554   +/-   ##
====================================================
  Coverage                94.46%   94.46%           
====================================================
  Files                      100      100           
  Lines                     6307     6307           
  Branches                   803      803           
====================================================
  Hits                      5958     5958           
  Misses                     225      225           
  Partials                   124      124           
Flag Coverage Δ
unittests 94.46% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

Pyright Type Completeness

View the full pyright --verifytypes output for this commit

Project (full chainladder package, at this PR's head): 16.1% of exported symbols fully typed (264 / 1636)

Known Ambiguous Unknown Total
Project (head) 264 105 1267 1636

Other symbols referenced but not exported by chainladder: 24

Known Ambiguous Unknown Total
Other (head) 11 1 12 24

Symbols without documentation:

  • Functions without docstring: 347
  • Functions without default param: 0
  • Classes without docstring: 10

Patch (exported symbols added or changed by this PR): no exported symbol type-completeness changes detected.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

"# The paper prints whole numbers or five decimals; tolerance for comparing against its tables.\n",
"def close(actual, printed, atol):\n",
" assert np.allclose(actual, printed, atol=atol), (np.round(actual, 5), printed)"
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verification helper uses default rtol

Medium Severity

close calls np.allclose with only atol, so the default rtol=1e-5 is still applied. For the large whole-number totals in Tables 7.8 and 7.9 that intended tolerance of 1 becomes tens or hundreds of units, so the notebook can accept values that do not match the paper’s rounding.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 381fd8d. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant