quantlib.mlab.fixed_income.bndprice

bndprice(bond_yield, coupon_rate, pricing_date, maturity_date, period, basis, compounding_frequency=None)

Calculate price and accrued interest

Args:

bond_yield: compound yield to maturity coupon_rate: coupon rate in decimal form (5% = .05) pricing_date: the date where market data is observed. Settlement

is by default 2 days after pricing_date

maturity_date: … bond period: periodicity of coupon payments basis: day count basis for computing accrued interest compounding_frequency: … of yield. By default: annual for ISMA,

semi annual otherwise

Returns: price: clean price ac: accrued interest