Friedland Chapter 9 Bornhuetter-Ferguson Technique#1109
Conversation
playing around with rst
adding the rst to toc
* Improved docstring and added examples * Added the link ratios * docs: add doctest examples for correlation classes Adds Sphinx doctest Examples sections to DevelopmentCorrelation and ValuationCorrelation. Each example opens with the Mack chain-ladder assumption being tested, prints the full decision signal (statistic, confidence band, and boolean) rather than a single boolean, and ties the result back to the chain-ladder workflow. Refs casact#704 * docs: add BootstrapODPSample doctest examples Adds Sphinx doctest Examples section to the BootstrapODPSample class showing basic fit (resampled_triangles_.shape and scale_), downstream stochastic IBNR via Chainladder, and the effect of drop_high on scale_. Uses random_state=42 and n_sims=100 for deterministic, fast output. Refs casact#704 * docs: reframe drop_high example as sensitivity check Rewords the paragraph introducing the drop_high=True example to describe it as a leave-one-out sensitivity check on the column maxima rather than outlier removal, since drop_high mechanically removes the column max without any outlier test. Addresses review feedback on casact#836. * docs: move per-diagonal vs total mode note between testcode blocks Per @henrydingliu review on casact#844: opening paragraph now scoped to the calendar-effect concept; the per-diagonal vs whole-triangle distinction is introduced as a transition between the two testcode blocks. Refs casact#704 * docs: add README documenting docs build sources and outputs (refs casact#845) * Added the transformed link ratio triangle using fit_transform to examples * Removed the multiple testouputs * docs: address review feedback on docs README (refs casact#845) - Drop the jb build internals + duplicate warnings note (kennethshsu) - Rename 'tutorial notebooks' to 'onboarding and Quickstart notebooks' (kennethshsu) - Drop the 'What to edit for which part of the site' table and 'Known issues' section as redundant with the Source files table and casact#841 (kennethshsu) * [REFACTOR]: Remove repetitive code. Remove dead Python 3.8 code. Add missing unit tests. * [FIX]: Limit test to only those values meant to be changed. Use realistic values for changed options. * [DOCS]: Finish updating Options docstring. * [FIX]: Fix ending state of test. * [FIX]: Reset backend after sparse-only run. * [REFACTOR] Create template fixture for sample data sets. * [Fix]: Remove duplicate fixture. * [REFACTOR]: Move datetime defaults out of Options. Add validation to option getters and setters. Deprecate cl.array_backend() and cl.auto_sparse() * FIX: Apply Bugbot fix. * FIX: Apply Bugbot fix. * FIX: Apply Bugbot fix. * DOCS: Add docstring, clean up test. * DOCS: Update docstring. * Friedland Chapter 6 and half of Chapter 7 (casact#837) first batch of deliverables for friedland reconstruction * Delete docs/library/generated/chainladder.Development.rst --------- Co-authored-by: Kenneth Hsu <kennethshsu@gmail.com> Co-authored-by: priyam0k <87162535+priyam0k@users.noreply.github.com> Co-authored-by: Gene Dan <genedan@gmail.com>
Recreate the XYZ Insurer Auto BI BF exhibits (ultimate claims projection and unpaid claim estimate) as a notebook, computed in-package and reconciled to Friedland via hidden asserts. Add an Earned Premium column to the friedland_xyz_auto_bi sample (CSV + load_sample) so premium is read natively, and wire chapter_9 into the docs TOC. Refs casact#588
|
@priyam0k experimental is backed up. i created a clean experimental to prioritize your work. please resolve conflicts |
…hapter-9-bf # Conflicts: # chainladder/core/pandas.py # chainladder/development/incremental.py # chainladder/utils/data/friedland_xyz_auto_bi.csv # chainladder/utils/utility_functions.py # docs/_templates/autosummary/class.rst # docs/_templates/autosummary/class_inherited.rst # docs/user_guide/methods.ipynb
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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## experimental #1109 +/- ##
=============================================
Coverage 90.50% 90.50%
=============================================
Files 91 91
Lines 5289 5289
Branches 671 671
=============================================
Hits 4787 4787
Misses 359 359
Partials 143 143
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:
|
Summary of Changes
Adds a first draft of Chapter 9 – Bornhuetter-Ferguson Technique, recreating the XYZ Insurer Auto BI exhibits from Friedland Chapter 9. Like Chapters 8 and 11, it's a notebook with reconciliation asserts built in.
Everything is computed in-package (
Development+TailConstant+BornhuetterFerguson), reusing the Chapter 7 XYZ selection (volume-weighted 2-period; 1.000 reported / 1.010 paid tail; age-to-age factors rounded to 3 decimals per the text). It recreates both exhibits — Ultimate Claims Projection and Development of Unpaid Claim Estimate — and reconciles exactly: ultimate 513,145 / 554,543 and IBNR 63,519 / 104,917 (reported / paid).misc:
Earned Premiumcolumn to thefriedland_xyz_auto_bisample (CSV +load_sample) so the a priori premium is read natively instead of hardcoded (same approach as Friedland Chapter 11 #1079).Related GitHub Issue(s)
refers #588
Additional Context for Reviewers
The
Earned Premiumchange is additive; Chapters 6 and 7 only selectReported Claims/Paid Claims, and their doctests still pass (35/35 and 76/76).Chapter 9 is a notebook, so its asserts run at build (
execute_notebooks: force) and a failure surfaces as a warning, per the Chapter 11 convention.Note: Friedland Chapter 11 #1079 is separately adding XYZ premium to the freq-sev sample — worth reconciling once it merges so premium isn't carried twice.
I passed tests locally for code (
pytest) and documentation (jb build docs --builder=custom --custom-builder=doctest)Note
Low Risk
Documentation-only change (notebook + TOC); no application or library code in this diff.
Overview
Adds Friedland Chapter 9 to the docs as a new Jupyter notebook and links it in
docs/_toc.ymlunder the Friedland section.The notebook walks through the XYZ Insurer Auto BI Bornhuetter–Ferguson example using in-package
Development,TailConstant, andBornhuetterFerguson(Chapter 7 development selection, a priori viasample_weight, reported CDF cap at 1.0). It rebuilds the ultimate projection and unpaid-claims exhibits and ends withnumpyasserts that lock CDFs, ultimates, and IBNR to the printed Chapter 9 values.Reviewed by Cursor Bugbot for commit 599e826. Bugbot is set up for automated code reviews on this repo. Configure here.