-
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
finance.IRR causes "Cannot convert undefined or null to object" error #43
Comments
I'm having the same issue. |
@SethConnell @noff The example in the README.md for IRR won't work. In the image of the IRR function that noff provided, you see that it wants an object with two keys named "depth" and "cashFlow". For the sake of familiarity I'll use the numbers given in the readme. Try I'm not really sure what "depth" is, but from the code, its a limiter on how many times the internal NPV function is ran. For cashFlow it needs to be an array of the integers you want you want to run the function against. I haven't given this library a good looking at, but just from this function I'd either write your own or go somewhere else. When it comes to financing or other peoples money you want to be 100% accurate and understand what is happening. |
The example:
finance.IRR(-500000, 200000, 300000, 200000);
Result:
Here:
The text was updated successfully, but these errors were encountered: