-
Notifications
You must be signed in to change notification settings - Fork 64
Closed
Labels
bugCode defect in shipping codeCode defect in shipping codereadyFix is ready in a feature branchFix is ready in a feature branch
Description
Description
Microsoft's documentation for the XIRR function states under the Remarks section that they guarantee 1x10^-6 accuracy; however, this library is using 1x10^-7 accuracy in common.fs findRoot function. Removing one zero would align with Microsoft's standards: https://support.microsoft.com/en-us/office/xirr-function-de1242ec-6477-445b-b11b-a303ad9adc9d
Repro steps
Please provide the steps required to reproduce the problem
- Call the financial.XIrr function with the following parameters. These dates are July 3rd, 2020 and Feb 25th, 2021:
DateTime[] dateTimes = { new DateTime(2020,7,3), new DateTime(2021,2,25)};
double[] doubles = {-177900000, 8799805.85};
Financial.XIrr( doubles, dateTimes, 0.1);
Expected behavior
A value should be returned representing the IRR amount, which should be -0.990247691899517.
Actual behavior
Exception is generated saying that the root could not be found.
Known workarounds
N/a
This issue can be fixed by changing the precision value in common.fs's findRoot method from 1x10^-7 to 1x10^-6.
Related information
- Using a Windows 10 OS
- On the Master branch
- .NET Runtime
Metadata
Metadata
Assignees
Labels
bugCode defect in shipping codeCode defect in shipping codereadyFix is ready in a feature branchFix is ready in a feature branch