Skip to content

[BUG] Incorrect scale parameter computed with ClarkLDF Cape Cod method #1501

Description

@genedan

Are you on the latest chainladder version?

  • Yes, this bug occurs on the latest version.

Describe the bug in words

ClarkLDF using the Cape Cod method on genins results in a scale parameter of 53,822 instead of 61,577 in the paper (see bottom of page 68)

How can the bug be reproduced?

There is a typo in Clark, so editing one cell to match:

import numpy as np
import pandas as pd
import chainladder as cl

tri = cl.load_sample("genins").copy()
tri.values[0, 0, 0, 3] = 2_182_708

tri["premium"] = tri["values"] * 0 + np.array([10_000_000 + 400_000 * i for i in range(10)])[:, None]
premium = tri["premium"].latest_diagonal

cape_cod = cl.ClarkLDF().fit(tri["values"], sample_weight=premium)
print(cape_cod.scale_)

53821.777605

What is the expected behavior?

assert cape_cod.scale_ == pytest.approx(61,577, abs=atol)

Would you be willing to contribute this ticket?

  • Yes, absolutely!
  • Yes, but I would like some help.
  • No.

Activity

  1. added theissue type on Oct 21, 2026
  2. updated Priority High, Scope Codebase and Effort Low on Oct 21, 2026
  3. scks1 commented on Nov 1, 2026

    @scks1

    Opened #1520 for this. The Cape Cod fitted incrementals were built from the LDF-implied ultimate instead of premium × ELR, which threw off scale_ and norm_resid_. With the fix, the reproduction above gives a scale of 61,577, matching the paper. The regression tests apply the one-cell typo correction from Clark's table, and genins itself is unchanged.

    Disclosure: the fix and this comment were written with Claude Opus 5.5 (Claude Code), working under my direction.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

High

Effort

Low

Scope

Codebase

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions