Anexen / pyxirr

Rust-powered collection of financial functions.
https://anexen.github.io/pyxirr/
The Unlicense
172 stars 16 forks source link

IRR returns none for this set of values #20

Closed JoshCleaverEmpire closed 2 years ago

JoshCleaverEmpire commented 2 years ago
irr([87.17, 87.17, 87.17, 87.17, 87.17, 87.17, 87.17, 87.17, 87.17, 87.17, 87.17, 87.17, -86.43])

Returns None

numpy_financial returns -0.5020732642263963 for these same values

Similarly if I reverse the signs

irr([-87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, 86.43])

pyxirr's irr returns None

and numpy_financial's IRR (npf.irr) returns -0.5020732642263963 (the same as above)

I'm not 100% sure what the breaking point is, but I have other examples of many more items (up to 180 'deposits') that are returning None from the irr function.

e.g.:

[-87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, -87.17, 5809.3]

Please let me know if I could provide anything else to help troubleshoot!

Anexen commented 2 years ago

@CliveCleaves, please, try v0.6.5.

JoshCleaverEmpire commented 2 years ago

Holy cow dude @Anexen - you solved 100% of my equal payment issues. Thank you!!!