-
Notifications
You must be signed in to change notification settings - Fork 153
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
[IRR-Question] Excel can generate result and finance.js can't #30
Comments
Did you ever figure out a solution for this issue ? I am facing the same issue when we have the first years (-neg) value still greater(i.e. not above 0) then addition for the rest of the years (Just as shown in your example). The excel gives value of IRR in -neg like -15.33% but the finance.js does not return anything and it is empty. Let me know if you have fixed in with tweak or anything. Thanks |
Yes @parikhishan we fixed with tweaks in the cashflow data creating a wrapper around the Explanations:
Checkout the code below for more details.
|
If you find anything else to make it more reliable please let me know @parikhishan =) |
Thanks for your prompt response. I see you have included a lot of lib apart from Finance. // Try with custom guess
} return Number(irr) && !isNaN(irr) && isFinite(irr) ? Number(Math.round(irr + 'e4') + 'e-4') : null Is it possible to just edit the existing version of Finance.IRR function and include the above, without much importing new libraries? Thanks |
This is my code at the moment in Javascript function. |
Was setting |
Hi @essamjoubori nice effort to write this package!
Pretty awesome!
I'm a bit new to this world and I'm having some difficult to understand why excel can do IRR with some values and finance.js can't. I'm guessing it's because javascript itself can't deal with imaginary numbers.
finance.js
excel
Please let me know your thoughts on how to overcome that.
Thank you!
The text was updated successfully, but these errors were encountered: