-
Notifications
You must be signed in to change notification settings - Fork 76
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
[BUG] Inconsistency in ultimates and full triangle #380
Comments
To clarify, the assert above isn't supposed to be true since the bf a priori is set to .6. my original example was regarding a couple odd values in the bf.full_triangle. this issue appears to have been fixed in 0.8.14. Not sure what did it. I don't think it was any of my changes in 7de2cd7. however, the above assert with apriori = 1 is still failing in 0.8.14 |
the odd values in bf.full_triangle_ was fixed in #330 here is the testing code that shows equality between the three methods. i was incorrect expecting that the same sample_weight should be used for incr and bf. tri = cl.load_sample("ia_sample")
incr_est = cl.IncrementalAdditive().fit(tri['loss'], sample_weight=tri['exposure'].latest_diagonal)
incr_trans = incr_est.transform(tri['loss'])
incr_tri = incr_est.incremental_.incr_to_cum()
incr_ult = incr_tri[incr_tri.development == incr_tri.development.max()]
cl_est = cl.Chainladder().fit(incr_trans)
bf_est = cl.BornhuetterFerguson(apriori=1).fit(incr_trans, sample_weight=incr_ult)
print(incr_est.incremental_)
print(cl_est.full_triangle_.cum_to_incr())
print(bf_est.full_triangle_.cum_to_incr()) Even with equality achieved, I think this can create unexpected results when I want to use different denominators between incr pattern estimation and actual IBNR calculation. For example, if I'm doing an incremental ALAE to ultimate loss analysis, and I want to use countrywide incremental % to apply to individual states ultimate loss. In that example, Chainladder would not produce the right results; and BF would be cumbersome to find the right sample_weight. But this is probably more suitable to address in #377 |
Describe the bug
This shows up when using
IncrementalAdditive
withBornhuetterFerguson
To Reproduce
Steps to reproduce the behavior. Code should be self-contained and runnable against publicly available data. For example:
Expected behavior
The assert should not fail
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: