Issue with development date in triangle #545
Replies: 3 comments
-
Hi @andrichviljoen, welcome! I'd love to help take a look if you would be willing to share the dataset you used? Can you try updating your You can verify the version of your import pandas as pd
pd.__version__ |
Beta Was this translation helpful? Give feedback.
-
Hi @kennethshsu! Thanks for the willingness to help! I have attached an example of the dataset that I used (unfortunately I can't upload original due to privacy issues). I have updated pandas to the latest version and still get the same issue. Thanks for the help! Data: |
Beta Was this translation helpful? Give feedback.
-
Sorry for the delay, I did play around with it and I do see what you are describing. I do think that the package doesn't handle the quarterly origins well for month ends. So for example, if your origin is 2025Q1, you will want your origins as I'll look at this more in the coming weeks. |
Beta Was this translation helpful? Give feedback.
-
Hi, I am relatively new to using this amazing package. I am getting some weird development and valuation dates in the triangles that I create! The development dates in the Triangle are 3 months later than the development dates in the original data, and I can't figure out why this is happening. I have updated pandas to 1.5.3 as I saw other users having issues with pandas > 2.0.
Create triangle:
actuals_tri = cl.Triangle(data = actuals_df, origin = 'Origin', development = 'Development', columns = 'Paid', index = 'Source', cumulative = True ,development_format = 'yyyy-mm-dd',origin_format = 'yyyy-mm-dd')
The data types in the actuals_df for both Origin and Development are datetime64[ns].
actuals_df:
![image](https://private-user-images.githubusercontent.com/68428087/401533741-1ce04cd7-6b3c-405a-ad85-7625d8532da2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NjgxMDMsIm5iZiI6MTczOTU2NzgwMywicGF0aCI6Ii82ODQyODA4Ny80MDE1MzM3NDEtMWNlMDRjZDctNmIzYy00MDVhLWFkODUtNzYyNWQ4NTMyZGEyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDIxMTY0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUwMDQ0YmU2OTNkNmMxYWRhYzY5ZGRhODMzZWM2ZGM1YWZmNjZlODdiODhhOWFkN2Q5MTZhZTFjYWQ5ODc3ZDQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.aLV_SKu3WKsVfCYFXted5JeE8dZkxYJFvmmhbusuO5w)
actuals_tri.dev_to_val().to_frame()
As you can see, the developement dates in the actuals_tri Triangle are 3 months later than the development dates in the original data (i.e., actuals_df). Note that all the dates in the original data are either end of June or end of December.
Can you please provide guidance on why this may be happening?
Beta Was this translation helpful? Give feedback.
All reactions