Irregular internal rate of return (xirr) and net present value (npv) calculations.
Based on https://stackoverflow.com/questions/8919718/financial-python-library-that-has-xirr-and-xnpv-function with some handling for special cases from https://github.com/RayDeCampo/java-xirr/
See the Documentation.