28 const Date& valueDate,
29 const Date& maturityDate,
36 const ext::shared_ptr<Bond>& bond,
39 :
Forward(dayCounter, calendar, businessDayConvention, settlementDays,
41 valueDate, maturityDate, discountCurve), bond_(bond) {
73 if (!i->hasOccurred(settlement,
false)) {
87 return bond_->dirtyPrice();
forward contract on a bond
Base class for cash flows.
void performCalculations() const override
BondForward(const Date &valueDate, const Date &maturityDate, Position::Type type, Real strike, Natural settlementDays, const DayCounter &dayCounter, const Calendar &calendar, BusinessDayConvention businessDayConvention, const ext::shared_ptr< Bond > &bond, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const Handle< YieldTermStructure > &incomeDiscountCurve=Handle< YieldTermStructure >())
Real forwardPrice() const
(dirty) forward bond price
Real cleanForwardPrice() const
(dirty) forward bond price minus accrued on bond at delivery
Real spotValue() const override
NPV of underlying bond.
Real spotIncome(const Handle< YieldTermStructure > &incomeDiscountCurve) const override
NPV of bond coupons discounted using incomeDiscountCurve.
ext::shared_ptr< Bond > bond_
Abstract base forward class.
void performCalculations() const override
Real underlyingSpotValue_
virtual Real forwardValue() const
forward value/price of underlying, discounting income/dividends
virtual Date settlementDate() const
Date maturityDate_
maturityDate of the forward contract or delivery date of underlying
Handle< YieldTermStructure > incomeDiscountCurve() const
term structure that discounts the underlying's income cash flows
Handle< YieldTermStructure > incomeDiscountCurve_
Class for forward type payoffs.
Shared handle to an observable.
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
Abstract base class for option payoffs.
BusinessDayConvention
Business Day conventions.
unsigned QL_INTEGER Natural
positive integer
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.
Interest-rate term structure.