[Numpy-discussion] add xirr to numpy financial functions?

josef.pktd@gmai... josef.pktd@gmai...
Mon May 25 18:27:46 CDT 2009


> The advantage of Skippers implementation using actual dates instead of
> just an array of numbers is that it is possible to directly calculate
> the annual irr, since the time units are well specified. The only
> problem is the need for an equation solver in numpy. Just using a date
> tuple would remove the problem of string parsing, and it might be
> possible to extend it later to a date array.
>
> So, I think it would be possible to include Skippers solution, with
> some cleanup and testing, if an equation solver can be found or if
> np.roots can handle high order (sparse) polynomials.
>

I looked a bit more: the current implementation of ``rate`` uses it's
own iterative (Newton) solver, and in a similar way this could be done
for a more general xirr.

So with a bit of work this doesn't seem to be a problem and the only
question that remains is the specification of the dates.

Josef


More information about the Numpy-discussion mailing list