New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ODP IBNR bug #219
Comments
Hi @rbreen2, can you provide more info on what "samples" is if it is not from 'clrd'? If we can reproduce the issue, we can resolve it, but I'm unable to replicate the issue currently. |
Hello @jbogaardt , But when reading RAA from the package it self: Both triangles 'raa' are the same and when I run: Let me know if I'm missing something or need to explain further, thank you! |
This feels like the two versions of RAA are subtlely different, though I am not sure why. Can you possibly share the version of RAA from Excel by doing |
Ah thank you, you're right by checking the json I realized I have do cumulative=True: Here's what the json looked like before when I pulled it from excel: |
Oh, thank you for finding the root cause. I'll keep this one open since we should coerce a triangle to cumulative upon fit rather than have it just fail like this. Similar to how we do in the |
Another bug I found has to do with the Mack Standard Error, it works when RAA is used but if you delete the lastest origin period being 1990 and Dev year 1990. Version 0.8.8 creates a much larger standard error compared to 0.8.2. I’m not sure why but I’m assuming it has to do with the triangle not being a perfect nxn, Here’s the code that I used after putting RAA data on excel and deleting Origin 1990: raa_df = table.range('A1').options(pd.Series,index=False, header=True, expand='table').value |
I don't quite grasp the triangle censoring you're describing. It sounds like this, but I get a different answer: >>> import chainladder as cl
>>> cl.__version__
'0.8.8'
>>> raa = cl.load_sample('raa').iloc[..., :-1, :-1]
>>> cl.MackChainladder().fit(raa).total_mack_std_err_.values[0,0]
9859.53887525988 At a high level, it sounds like you're trying to remove the >>> import chainladder as cl
>>> cl.__version__
'0.8.8'
>>> raa = cl.load_sample('raa')
>>> raa = raa[raa.valuation<raa.valuation_date]
>>> cl.MackChainladder().fit(raa).total_mack_std_err_.values[0,0]
35505.59688575841 Can you clarify the what RAA looks like, even if a pic? |
Sorry, let me know if you can open this link to the pic of what I mean: |
It seems that starting in version 0.8.5 after creating the samples for the ODP bootstrap, when you go to run cl.Chainladder().fit(samples).ibnr_.sum("origin").mean()
it would produce an oddly large negative number. However running this on data from the tutorial clrd it works. So i'm not to sure what the issue is but when I do the same thing on a lower version like 0.8.4 it works.
Thanks,
The text was updated successfully, but these errors were encountered: