Yield to maturity

Applies to: finance, python

Yield to maturity is the bond yield that discounts promised cash flows to the current price.

price = sum(cf / (1+y)**t for t, cf in flows)

See also: npv, root-finding