Skip to content

Friedland chapter 13 recreation - #1327

Draft
kennethshsu wants to merge 58 commits into
mainfrom
#588_ch13_BS_method
Draft

kennethshsu wants to merge 58 commits into
mainfrom
#588_ch13_BS_method

Conversation

@kennethshsu

@kennethshsu kennethshsu commented Sep 10, 2026

Copy link
Copy Markdown
Member

Summary of Changes

Friedland recreation of chapter 13

Related GitHub Issue(s)

#588

Additional Context for Reviewers

There's quite a bit of rounding errors, which I had already added to #1215

Checklist

  • I passed tests locally for both code (uv run pytest) and documentation changes (uv run --directory docs jb build . --builder=custom --custom-builder=doctest)

Note

Low Risk
Documentation and sample-data additions only; reserving math runs through existing APIs with no apparent changes to core adjustment logic.

Overview
Adds a Friedland Chapter 13 Jupyter Book notebook that walks through Berquist–Sherman case-adequacy and disposal-rate adjustments and checks outputs against the textbook exhibits (Med Mal Exhibit I, Auto Exhibit II).

The notebook drives existing chainladder pieces—Development, DevelopmentConstant, Chainladder, and BerquistSherman—on new load_sample datasets friedland_med_mal and friedland_berq_sher_auto (registered in the data manifest). Inline assert cells reconcile triangles, LDFs/CDFs, adjusted incurred, ultimates, and IBNR to Friedland PDF pages; the author flags rounding drift vs. the text (tracked in #1215), including one CDF table that does not tie out even with rounded values.

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

@github-actions

github-actions Bot commented Sep 10, 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): 15.1% of exported symbols fully typed (208 / 1380)

Known Ambiguous Unknown Total
Project (head) 208 111 1061 1380

Other symbols referenced but not exported by chainladder: 13

Known Ambiguous Unknown Total
Other (head) 3 1 9 13

Symbols without documentation:

  • Functions without docstring: 327
  • 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.

@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.96%. Comparing base (ba25a42) to head (b5c108e).
⚠️ Report is 56 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1327      +/-   ##
==========================================
+ Coverage   91.76%   93.96%   +2.19%     
==========================================
  Files          96       98       +2     
  Lines        5475     7784    +2309     
  Branches      706     1258     +552     
==========================================
+ Hits         5024     7314    +2290     
- Misses        327      333       +6     
- Partials      124      137      +13     
Flag Coverage Δ
unittests 93.91% <ø> (+2.14%) ⬆️

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.

@kennethshsu kennethshsu changed the title #588 ch13 bs method Friedland chapter 13 recreation Sep 10, 2026

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

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 b5c108e. Configure here.

" origin Age (2) Reported (3) CDF to Ultimate(4) \\\n",
"0 1969 96 7821.0 1.000 \n",
"1 1970 84 8682.0 1.000 \n",
"2 1971 72

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale assert column after rename

Medium Severity

The Exhibit II Sheet 4 DataFrame now stores ultimates in Projected Ultimate CLaim Counts (5), but the Friedland reconciliation still indexes Ult (5). Those asserts raise KeyError instead of checking the projected counts, so the notebook fails on execute.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b5c108e. 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