You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In other implementations of the IRR function, one can set the initial guess and the number of iterations.
Here the irr function doesn't receive any parameter and the xirr receives the number of iterations but i don't see the function make use of this value.
On the other hand, you could manually set the tolerance. It would require changing the canned value that every Function object returns. I'll be digging around the code this weekend anyway, so I could submit a pull request to add this functionality if it would be useful to you. Although, the current tolerance is 1.0e-16, which is pretty small, so unless you know you want it to be less accurate than that for speed reasons, there's probably no reason to change it.
Ok. I have been "spamming" about this, but I was able to add a Guess on IRR and XIRR in #30
But, Janther, you are right, I didn't notice XIIR iterations didn't had any use in the formulas. I'll update the pull request to remove it.
arbrown, Indeed the tolerance seems quite low. I've added a Config method to Finance that allows you to set a default Tolerance in the same PR #30.
In other implementations of the IRR function, one can set the initial guess and the number of iterations.
Here the irr function doesn't receive any parameter and the xirr receives the number of iterations but i don't see the function make use of this value.
is there a reason for this?
PS: I'm looking at the https://github.com/wkranec/finance/blob/master/lib/finance/cashflows.rb file
PS2: also the tolerance could be nice. For example tolerance = 0.00000001
The text was updated successfully, but these errors were encountered: