Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Describe the bug
while calculating manually my chainladder development factors, I do not have the same results with the .ldf_

To Reproduce

import chainladder as cl

print("pandas: " + pd.version)
print("numpy: " + np.version)
print("chainladder: " + cl.version)

sinistres = pd.read_csv("sinistres.csv",sep='\t')
sinistres.head()

sinistreINC = cl.Triangle(sinistres,origin="origin",development="development",columns="values", cumulative=False)
sinistreINC = sinistreINC.grain("OYDY")
sinistreINC

dev = cl.Development().fit(sinistreINC)
dev

sinistreINC.link_ratio
sinistreINC.age_to_age.heatmap()

dev.ldf_


**Expected behavior**

```Manually CL factors
CL | 0,975521243 | 0,976456299 | 0,995125914 | 0,997399783 | 1


**Desktop (please complete the following information):**
pandas: 2.2.3
numpy: 2.0.2
chainladder: 0.8.23

[ExemplePartrat-1.xlsx](https://github.com/user-attachments/files/19008174/ExemplePartrat-1.xlsx)
You must be logged in to vote

Replies: 2 comments

Comment options

Hi @cynthiatchetagni, welcome and thanks so much for the question!

I looked at the sample data set that you posted, which is super helpful, it makes debugging so much easier.

The cl.Development() estimator by default estimates LDFs/CDFs using volume-weighted averages. If you want the estimate to reconcile to the numbers you calculated in your excel workbook, you will need to pass in an additional parameter. More details here.

Try this:

cl.Development(average = "simple").fit(sinistreINC)

Does this help? Do you get the numbers you expect now?

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #552 on June 27, 2025 16:49.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.