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

Wrong IRR at a specific threshold #22

Open
vidarh opened this issue Apr 19, 2021 · 0 comments
Open

Wrong IRR at a specific threshold #22

vidarh opened this issue Apr 19, 2021 · 0 comments

Comments

@vidarh
Copy link

vidarh commented Apr 19, 2021

I've not yet been able to pinpoint what is going on here. Will try to narrow it down further when I get a chance.

But this gives the right results:

[5] pry(#<IRR>)> both
=> [T(-627752.0,2017-02-23), T(-75167.0,2017-11-07), T(6.9,2020-03-01)]
[6] pry(#<IRR>)> both.xirr
=> -0.984602e0

This does not:

=> [T(-627752.0,2017-02-23), T(-75167.0,2017-11-07), T(6.8,2020-03-01)]
[3] pry(#<IRR>)> both.xirr
=> 0.0

The expected value would be converging towards -1 as the positive amount in the last transaction converges on 0. As far as I can tell, somewhere between 6.9 and 6.8 is the last point where it gets the correct results.

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

No branches or pull requests

1 participant