Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XIRR for non-periodic cash flows? #29

Open
xuhdev opened this issue Apr 6, 2020 · 3 comments
Open

XIRR for non-periodic cash flows? #29

xuhdev opened this issue Apr 6, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@xuhdev
Copy link

xuhdev commented Apr 6, 2020

Both Excel and LibreOffice provide XIRR to calculate the IRR for non-periodic cash flows. Do we have a plan to add this feature?

@WarrenWeckesser WarrenWeckesser added the enhancement New feature or request label Apr 9, 2020
@WarrenWeckesser
Copy link
Member

FYI: This was discussed on the NumPy mailing list back in 2009: https://mail.python.org/pipermail/numpy-discussion/2009-May/042645.html

I don't know of a plan to add it. (Although I had a big role in creating this repo, I don't have a lot of time to work on it these days, and I personally have no specific plans for new additions.) If there is agreement on the xirr API, I don't think there would be any objections to adding it. It might require poking folks who have expressed interest in numpy-financial to work out a correct API, and then get someone to create a pull request.

@garfieldthecat
Copy link

It is very easy to build your own XIRR function. This stackoverflow answer is a good example: https://stackoverflow.com/a/66069439/4045275

If instead you have very specific needs with respect to day count conventions, using an explicit library like QuantLib might be better (but it's a bit overkill to use it just for an NPV / IRR calculation)

@yellowbean
Copy link

yellowbean commented Dec 21, 2023

I tried with https://pypi.org/project/pyxirr/ which supports xirr .

The issue I encountered with was that it is using rust under the hood.

If I'm trying to run with PyScript which doesn't support such library. It would be great to have an implementation without dependency of rust

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants