quantlib.instruments.bondforward.

BondForward

class BondForward(Date value_date, Date maturity_date, Position position_type, Real strike, Natural settlement_days, DayCounter day_counter, Calendar calendar, BusinessDayConvention convention, Bond bond, HandleYieldTermStructure discount_curve, HandleYieldTermStructure income_discount_curve)

Bases: Forward

Forward contract on a bond

value_date

refers to the settlement date of the bond forward contract.

maturity_date
this is the delivery (or repurchase date) for the underlying bond

(not the bond’s maturity date).

Attributes:
clean_forward_price

(dirty) forward bond price minus accrued on bond at delivery

error_estimate

Instrument.error_estimate: Real

forward_price

(dirty) forward bond price

forward_value

forward value/price of underlying, discounting income/dividends

is_expired

Instrument.is_expired: bool

net_present_value

Instrument net present value.

npv

Shortcut to the net_present_value property.

spot_value

spot value/price of an underlying financial instrument

valuation_date

the date the net present value refers to.

Methods

implied_yield(self, ...)

implied yield

set_pricing_engine(self, PricingEngine engine)

Sets the pricing engine.

spot_income(self, ...)

NPV of income/dividends/storate-cossts etc.

Notes

Relevant formulas used in the calculations (P refers to a price): pomme

  1. Clearn forward price:

    P_{\text{CleanFwd}}(t) = P_{\text{DirtyFwd}}(t) - AI(t=\text{deliveryDate})

    where AI refers to the accrued interest on the underlying bond.

  2. Dirty forward price:

    P_{\text{DirtyFwd}}(t) = \frac{P_{DirtySpot}(t) - \text{SpotIncome}(t)}{\text{discountCurve}\rightarrow \text{discount}(t=\text{deliveryDate})}

  3. Spot income:

    SpotIncome(t) = \sum_i \left( CF_i \times \text{incomeDiscountCurve}\rightarrow \text{discount}(t_i) \right)

    where CF_i represents the ith bond cash flow (coupon payment) associated with the underlying bond falling between the settlementDate and the deliveryDate.

(Note the two different discount curves used in 1. and 2.)