chainladder-python
chainladder-python copied to clipboard
[ENH] How can I vary loss development factors by year?
Is your feature request related to a problem? Please describe. For development constant, how can I vary the loss development factors by year? I would like to know how to do this so the ultimate values vary based on a different loss development pattern by year.
The current docs has this snippet of code
patterns={12: 2, 24: 1.25, 36: 1.1, 48: 1.08, 60: 1.05, 72: 1.02, 84: 1.0, 96: 1.0, 108: 1.0}
cl.DevelopmentConstant(patterns=patterns, style='ldf').fit(triangle).ldf_
12-Ult | 24-Ult | 36-Ult | 48-Ult | 60-Ult | 72-Ult | 84-Ult | 96-Ult | 108-Ult | |
---|---|---|---|---|---|---|---|---|---|
(ALL) | 2.0000 | 1.2500 | 1.1000 | 1.0800 | 1.0500 | 1.0200 | 1.0000 | 1.0000 | 1.0000 |
This is the pattern I would like to create:
12-Ult | 24-Ult | 36-Ult | 48-Ult | 60-Ult | 72-Ult | 84-Ult | 96-Ult | 108-Ult | |
---|---|---|---|---|---|---|---|---|---|
2010 | 1.0000 | ||||||||
2011 | 1.0070 | 1.0000 | |||||||
2012 | 1.4000 | 1.0000 | 1.0400 | ||||||
2013 | 1.0200 | 1.5000 | 1.0600 | 1.0000 | |||||
... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
2019 | 1.0000 | 1.0700 | 1.1000 | 1.0800 | 1.0500 | 1.0200 | 1.5000 | 1.0600 | 1.0000 |
Is your feature request at odds with the scope of the package? No
Describe the solution you'd like Written code example of how I can resolve my issue, or a link to documentation that has an example of how I can do it.
Describe alternatives you've considered Reading documentation