Closed askmedov closed 1 year ago
Hi, @askmedov, It looks like a use case for a specific application, and I'm not sure if it would be useful for other users. The library is focused on a basic financial functions.
If you're experiencing performance issues with pandas, I'll be happy to help. If you know similar function in excel, I will implement it in PyXIRR.
Currently XIRR calculates IRR (or YTM) for a single date. But it would be awesome if I could provide it (or a different function) with a pd.Series of a bond's or bill's prices across time to calculate XIRR for every point.
For example if we have:
then I would need to create a new arguments for dates and amounts for every date/price, i.e. ['2020-01-01', '2020-07-01'] and [-100, 10, 110] , ['2020-08-01', '2021-01-01'] and [-103, 110]. And it could be that I have not 2, but hundreds of dates. As you can see here, as date/prices grow newer, some of the amounts aren't relevant anymore as well. Would be awesome if it's implemented!