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

Validate XIRR inputs and return correct error values #1177

Closed
wants to merge 2 commits into from

Conversation

blacknell
Copy link
Contributor

@blacknell blacknell commented Sep 26, 2019

Fix: Return #NUM! if values and dates contain a different number of values
Fix: Return #NUM! if there is not at least one positive cash flow and one negative cash flow
Fix: Return #NUM! if any number in dates precedes the starting date fixes #1120
Fix: Return #NUM! if a result that works cannot be found after max iteration tries
Fix: Correct DocBlocks for XIRR & XNPV
Add: Validate XIRR with unit tests

This is:

- [X] a bugfix
- [ ] a new feature

Checklist:

Why this change is needed?

If the date order is non ascending then numerous warnings are generated and the wrong result returned. In addition, a number of input cases result in the wrong error value being returned.

Fix: Return #NUM! if values and dates contain a different number of values
Fix: Return #NUM! if there is not at least one positive cash flow and one negative cash flow
Fix: Return #NUM! if any number in dates precedes the starting date
Fix: Return #NUM! if a result that works cannot be found after max iteration tries
Fix: Correct DocBlocks for XIRR & XNPV
Add: Validate XIRR with unit tests
@PowerKiKi PowerKiKi closed this in 788f79c Nov 17, 2019
@PowerKiKi
Copy link
Member

Thanks !

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

Successfully merging this pull request may close these issues.

XIRR returning warnings and incorrect result
2 participants