Proposed new feature or change:
I've just merged #118, this PR reproduced the behaviour of nper in Cython as closely as possible. However there are several ZeroDivisionErrors that are currently handled poorly (they return NANs).
|
z = pmt_ * (1.0 + rate_ * when_) / rate_ |
|
return log((-fv_ + z) / (pv_ + z)) / log(1.0 + rate_) |
In each case, we should carefully evaluate each code path and return a financially sensible result.
Proposed new feature or change:
I've just merged #118, this PR reproduced the behaviour of
nperin Cython as closely as possible. However there are severalZeroDivisionErrors that are currently handled poorly (they returnNANs).numpy-financial/numpy_financial/_cfinancial.pyx
Lines 21 to 22 in 8583586
In each case, we should carefully evaluate each code path and return a financially sensible result.