Net present value

Applies to: finance, python

Net present value discounts future cash flows to today and sums them.

npv = sum(cf / (1+r)**t for t, cf in enumerate(cashflows))

See also: irr, root-finding