Closed brunoyb closed 4 years ago
Hi! I found your library and it is very useful, thank you! I also needed the XIRR function, so I decided to contribute it, so here is my implementation.
Feel free to comment on anything you think should be changed.
Thanks again for creating this library!
Thank you so much @brunoyb ! I'll be taking a look in the next couple of days :+1:
Oh, and I forgot to mention, I based this implementation on this Rust version: https://github.com/cskr/xirr/blob/master/src/lib.rs I tried to make the necessary changes to follow the patterns of your project.
+1
Hey! Awesome! Glad I could help!
This is the implementation of Excel's XIRR function. It is very similar to IRR, the only difference being that this one takes payment dates into account.
I also took the opportunity to make a small simplification to dNetPresentValue's formula.
See: https://support.office.com/en-us/article/xirr-function-de1242ec-6477-445b-b11b-a303ad9adc9d See: https://support.office.com/en-us/article/xnpv-function-1b42bbf6-370f-4532-a0eb-d67c16b664b7