-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Control Xirr accuracy #57
Comments
Hello, @rogerleung This is not possible at the moment because PyXIRR uses several optimization algorithms to find a solution and each algorithm requires its own configuration. In general, PyXIRR has stricter accuracy requirements than Excel. You can compare XIRR using XNPV function and check which one is closer to zero: |
Hi Anexen. Here is one example I would like to give. As you can see the excel is correctly giving a -59% IRR (by starting with initial guess of -.1) however, if i run it on the package it gives me 230.80406113058913% [ I am not sure if that's possible to allow user to make an initial guess. For example for projects with overall cashflow that's negative. It's more likely the IRR being negative Happy to provide more context and thanks for the great work again. Best, |
Thank you for providing the data. This is a complicated case. Just checked GoogleSheets and LibreOffice, they are both return 230.80406 (or 23080%). I agree that -59% seems to be a more accurate rate. I also agree that the rate is more likely to be negative when the overall cashflow is negative. However, the difficult question is "by how much"? In this case, the initial guess of -0.1 isn't sufficient. LibreOffice/GoogleSheets/PyXIRR return -59% when initial guess is approximately -0.4. pyxirr.xirr(cashflow["Date"], cashflow["Cashflow"], guess=-0.4) You may also find the Multiple IRR Problem section in the README useful. |
Hello - I have designed a way to guess the better IRR to use (especially for the negative ones) Wanna run you through and see what do you think. It works quite well on my side (on 800+ real Private Equity Deals).
|
Hi Sir,
Is there a way i can set a parameter on how many trials i wanna run? I run some cashflows and cross check with excel numbers and there are some ~<1% differences which i believe it's owing to number of trials. / tolerence
Best,
Roger
The text was updated successfully, but these errors were encountered: