Internal rate of return

Applies to: finance, python

IRR is the discount rate that makes NPV equal zero.

solve(lambda r: npv(cashflows, r))

See also: npv, root-finding