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

"Could not converge" for anything more than a few cashflows #6

Closed
michaelbridge opened this issue May 23, 2018 · 2 comments
Closed
Labels

Comments

@michaelbridge
Copy link

michaelbridge commented May 23, 2018

Running on a local app, tests with shorter cashflow histories (i.e., below) succeed.

d = [{1985, 1, 1}, {1990, 1, 1}, {1995, 1, 1}]
v = [1000, -600, -200]
IO.inspect Finance.xirr(d,v)

But longer cashflow inputs that are known to converge in Ruby, Javascript, and Excel always return {:error, "Could not converge"}.

Any insights/tips as to why this occurs with the current implementation? I would consider opening a PR with improvements if I can get to the bottom of this.

@elionaz @tubedude

@tubedude
Copy link
Owner

tubedude commented Jun 8, 2018

@michaelbridge Can you send me an example of a cashflow that fails?

@tubedude tubedude added the bug label Jun 8, 2018
@michaelbridge
Copy link
Author

Almost any input with >30 cashflows.

Thank you, but I ended up writing my own xirr library for Node.js, which turns out to be substantially faster for our purposes than elixir (notwithstanding elixir's concurrency benefits).

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

No branches or pull requests

2 participants