Skip to content

[DOC] Example: split the pooled versus standalone IBNR gap by company in the Development groupby example #1657

Open

Description

@scks1

The Development docstring compares groupby="LOB" patterns with standalone patterns on clrd["CumPaidLoss"]. Its othliab row prints standalone IBNR of -14,285,874 against 1,640,597 pooled, and the text says "a handful of small companies with erratic development" cause the negative total. A per-company bridge shows that one company and one origin account for it.

For each company, the bridge multiplies each origin's latest paid by the pooled CDF minus the company's own CDF and sums over origins. The contributions add to the line's IBNR difference. On main at a59efc9, othliab gives these values.

companies 239
industry IBNR 1640597, standalone IBNR -14285874, difference 15926471
sum of per-company contributions 15926471

company              own 12-24   latest paid   contribution   share
Dorinco Rein Co       299.8261         53301       16269828   1.022
State Farm Mut Grp      7.6392       1409719        -487530  -0.031
Grinnell Mut Grp        1.7848        116587          84887   0.005

Dorinco's 12 month paid for 1989 to 1996 sums to 46, and its 24 month paid for the same origins sums to 13,792. That gives an own 12-24 factor of 299.8261 and a 12 to ultimate CDF of about 1,602.5. Its 1997 origin shows paid of -10,225 at 12 months, and the CDF turns that into standalone IBNR of -16,364,285.

The medmal line shows why the bridge helps even without an outlier. Its total gap is -125,553, but Physicians Recip Insurers contributes -510,800 and Scpie Indemnity Co contributes +274,949.

I propose to extend the docstring example with the per-company gap for othliab, (ibnr_industry - ibnr_standalone).sum("origin") on the othliab rows, and to reword the sentence so it names the single company and origin that drive the negative total. The example needs no new API. A two-segment doctest could pin the arithmetic by hand, with 12 month denominators of 80 and 20, factors of 1.40 and 1.80, a pooled factor of 1.48, and segment deltas of -1.76 and +10.56 that sum to 8.8. That fixture reproduces exactly with Development(groupby=...) and TailConstant(1.10).

Would you take this in the docstring, or would you rather see it in a gallery example?

(This issue was written with Árbol, an AI assistant, under my direction.)

Activity

  1. added this to the v1.0.0 milestone on Nov 19, 2026
  2. henrydingliu commented on Nov 19, 2026

    @henrydingliu
    Member

    either docstring or gallery is fine

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Great First Contribution! 🌱Beginner friendly tickets with narrow scope and huge impact. Perfect to get your feet wet!

    Type

    No type

    Fields

    Priority

    Medium

    Scope

    Documentation

    Effort

    Low

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions