Replies: 4 comments
-
|
The dataset as given is not a triangle, and not suitable for analysis. Please refer to the tutorial for examples of chainladder-ready, triangle-shaped data. |
Beta Was this translation helpful? Give feedback.
-
|
It is true, I have not shared my data and used a dummy data. My real data is industry data and was used for reserving in ResQ The point is that my development period is in months whereas the Underwriting period is a year. So I am getting the same error |
Beta Was this translation helpful? Give feedback.
-
|
Apologies for closing the issue inadvertently.
You can mask your original data by multiplying against a random vector.
Please refer to the tutorial for examples of chainladder-ready data. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @henrydingliu. And to add on more, @Coomaren you may want to try this: import chainladder as cl
import pandas as pd
data = {
'origin': [2018, 2018, 2018, 2018, 2019, 2019, 2019, 2019],
'dev': [2018, 2019, 2020, 2021, 2019, 2020, 2021, 2022], # <-- these should be valuation dates
'value': [100, 80, 60, 40, 120, 90, 70, 50]
}
df = pd.DataFrame(data)
tri = cl.Triangle(df, origin='origin', development='dev', columns='value', cumulative = False)
triBut yes, I would recommend following the tutorial @henrydingliu shared if you haven't. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Are you on the latest chainladder version?
Describe the bug in words
I already have my development in months. and I am trying to create a triangle as below. But I am getting an error.
It seems that this issue was discussed before. I apologise if I have missed this. I have just installed chainladder and so have the latest version
How can the bug be reproduced?
data = {
'origin': [2018, 2018, 2018, 2018, 2019, 2019, 2019, 2019],
'dev': [1, 2, 3, 4, 1, 2, 3, 4], # months
'value': [100, 80, 60, 40, 120, 90, 70, 50]
}
df = pd.DataFrame(data)
tri = cl.Triangle(df, origin='origin', development='dev', columns='value')
What is the expected behavior?
I would expect the triangle with the years plus the value at months 1-4
Beta Was this translation helpful? Give feedback.
All reactions