When I calculate the Internal Rate of Return (irr) using the numpy method irr
, I receive nan
as return.
In [45]: numpy.irr([-10, 2, 2, 2, 2])
Out[45]: nan
Shouldn't the results be at least negative? Let's say -8%? When I tried to understand the implementation better, I looked at the master branch of the NumPy repository, but the implementation did not make any sense to me.
The comments and the given literature do not help to understand under which condition nan
is issued. When I calculate the irr with another program, I get -8% returned.
Why is NumPy returning nan
for the array above?