Good morning all I have been using the financial functions for a while now, and the npv function has always bothered me. Indeed neither the documentation nor the implementation seem to be correct, and actually are not congruent with each other either.
As stated in the bug report https://github.com/numpy/numpy/issues/649 : the documentation states that the summation is from 0 to M (should be M-1, if the input data is of size M by the way) which is the correct definition, but the implementation computes a summation from 1 to M, which is known to be wrong, and a mimic of Excel's NPV behavior. So basically, we would have the following : RealNPV(data) = data[0] + CurrentNPV(data[1:]) Both behaviors are fine to me, as long as the documentation is clear about it. Ideally the implementation should be corrected, but in any case there should be a documentation fix at least. I'd be glad to have your opinion about it.
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion