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
Our tests for many of the functions are very sparse, this should be updated to include more tests for each of the functions in numpy-financial. In particular, I think we need more thorough testing of edge cases.
Financial math functions are very amenable to property based testing, which excels at finding edge cases. Would it be acceptable to add a dev/test dependency on hypothesis? If so, I can give a hand at designing sampling strategies and property based tests.
Hypothesis looks like a great addition. I'm happy to add it as a dev dependency. I don't have much experience with hypothesis, although I've been meaning to try it out for a while. So I might need a wile to get up to speed
@Kai-Striega Hi! I’d like to help improve the test coverage for numpy-financial. Is anyone currently working on this, or can I get started?
If you have any specific functions or edge cases you’d like me to focus on, please let me know. Thanks!
Hi my name is Eshan, I’d like to work on this issue. I’ll begin by adding edge‑case tests for npv, irr, and pmt (e.g. zero discount rates, all‑negative cash flows, no sign change in cash flows, zero interest rates). Once those are in place I’ll look at the other functions. I’ll open a draft PR once the first set of tests is ready, and I’m happy to take feedback on which edge cases matter most.
Activity
Kai-Striega commentedon Oct 23, 2022
@jdilanzo I think you might be interested in this
jlopezpena commentedon Mar 13, 2023
Financial math functions are very amenable to property based testing, which excels at finding edge cases. Would it be acceptable to add a dev/test dependency on hypothesis? If so, I can give a hand at designing sampling strategies and property based tests.
Kai-Striega commentedon Mar 14, 2023
Hypothesis looks like a great addition. I'm happy to add it as a dev dependency. I don't have much experience with hypothesis, although I've been meaning to try it out for a while. So I might need a wile to get up to speed
Kai-Striega commentedon Jul 12, 2023
@kalicialopez You might be interested in this :)
Kai-Striega commentedon Nov 13, 2023
I've been thinking about this some more and, at a minimum, I'd like to confirm each function:
decimal.DecimaltypeI'm also amicable to using hypothesis as suggested earlier
0xs1d commentedon May 24, 2025
Hi, is this issue still active? Can I help with this?
immortal71 commentedon Nov 16, 2025
@Kai-Striega Hi! I’d like to help improve the test coverage for numpy-financial. Is anyone currently working on this, or can I get started?
If you have any specific functions or edge cases you’d like me to focus on, please let me know. Thanks!
tylerdegroff commentedon Nov 17, 2025
@Kai-Striega Also happy to contribute to test coverage.
Eshan-kumar-jain commentedon Sep 24, 2026
Hi my name is Eshan, I’d like to work on this issue. I’ll begin by adding edge‑case tests for npv, irr, and pmt (e.g. zero discount rates, all‑negative cash flows, no sign change in cash flows, zero interest rates). Once those are in place I’ll look at the other functions. I’ll open a draft PR once the first set of tests is ready, and I’m happy to take feedback on which edge cases matter most.
Eshan-kumar-jain commentedon Sep 24, 2026
Opened #155 with edge case tests for npv and irr