/irr

Better implementation of numpy.irr

Primary LanguagePythonMIT LicenseMIT

Travis status

This repo contains a custom implementation of numpy.irr built from scratch. It is used to compute the internal rate of return, also called APR, which is useful in a wide range of financial circumstances.

What's wrong with numpy.irr? It's extremely slow and usually returns nan.

Installing

The easiest way to install is probably to run this:

pip install -e git://github.com/better/irr#egg=irr

More info

There are two implementations available in this package. irr.irr defaults to irr.irr_binary_search which is slower but more stable. There is also irr.irr_newton which is much faster but sometimes doesn't converge.

Binary Search

binary search

Newton's method

newton

Misc

This repo uses the MIT License