QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | List of all members
FixedRateBondForward Class Reference

Forward contract on a fixed-rate bond More...

#include <fixedratebondforward.hpp>

+ Inheritance diagram for FixedRateBondForward:
+ Collaboration diagram for FixedRateBondForward:

Public Member Functions

 FixedRateBondForward (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< FixedRateBond > &fixedRateBond, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const Handle< YieldTermStructure > &incomeDiscountCurve=Handle< YieldTermStructure >())
 
- Public Member Functions inherited from BondForward
 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 More...
 
Real cleanForwardPrice () const
 (dirty) forward bond price minus accrued on bond at delivery More...
 
Real spotIncome (const Handle< YieldTermStructure > &incomeDiscountCurve) const override
 NPV of bond coupons discounted using incomeDiscountCurve. More...
 
Real spotValue () const override
 NPV of underlying bond. More...
 
- Public Member Functions inherited from Forward
virtual Date settlementDate () const
 
const Calendarcalendar () const
 
BusinessDayConvention businessDayConvention () const
 
const DayCounterdayCounter () const
 
Handle< YieldTermStructurediscountCurve () const
 term structure relevant to the contract (e.g. repo curve) More...
 
Handle< YieldTermStructureincomeDiscountCurve () const
 term structure that discounts the underlying's income cash flows More...
 
bool isExpired () const override
 returns whether the instrument is still tradable. More...
 
virtual Real forwardValue () const
 forward value/price of underlying, discounting income/dividends More...
 
InterestRate impliedYield (Real underlyingSpotValue, Real forwardValue, Date settlementDate, Compounding compoundingConvention, const DayCounter &dayCounter)
 
- Public Member Functions inherited from Instrument
 Instrument ()
 
Real NPV () const
 returns the net present value of the instrument. More...
 
Real errorEstimate () const
 returns the error estimate on the NPV when available. More...
 
const DatevaluationDate () const
 returns the date the net present value refers to. More...
 
template<typename T >
T result (const std::string &tag) const
 returns any additional result returned by the pricing engine. More...
 
const std::map< std::string, ext::any > & additionalResults () const
 returns all additional result returned by the pricing engine. More...
 
void setPricingEngine (const ext::shared_ptr< PricingEngine > &)
 set the pricing engine to be used. More...
 
virtual void setupArguments (PricingEngine::arguments *) const
 
virtual void fetchResults (const PricingEngine::results *) const
 
- Public Member Functions inherited from LazyObject
 LazyObject ()
 
 ~LazyObject () override=default
 
void update () override
 
bool isCalculated () const
 
void forwardFirstNotificationOnly ()
 
void alwaysForwardNotifications ()
 
void recalculate ()
 
void freeze ()
 
void unfreeze ()
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (const ext::shared_ptr< Observable > &)
 
void registerWithObservables (const ext::shared_ptr< Observer > &)
 
Size unregisterWith (const ext::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 
virtual void update ()=0
 
virtual void deepUpdate ()
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Member Functions inherited from BondForward
void performCalculations () const override
 
- Protected Member Functions inherited from Forward
 Forward (DayCounter dayCounter, Calendar calendar, BusinessDayConvention businessDayConvention, Natural settlementDays, ext::shared_ptr< Payoff > payoff, const Date &valueDate, const Date &maturityDate, Handle< YieldTermStructure > discountCurve=Handle< YieldTermStructure >())
 
void performCalculations () const override
 
- Protected Member Functions inherited from Instrument
void calculate () const override
 
virtual void setupExpired () const
 
- Protected Member Functions inherited from LazyObject
- Protected Attributes inherited from BondForward
ext::shared_ptr< Bondbond_
 
- Protected Attributes inherited from Forward
Real underlyingIncome_
 
Real underlyingSpotValue_
 
DayCounter dayCounter_
 
Calendar calendar_
 
BusinessDayConvention businessDayConvention_
 
Natural settlementDays_
 
ext::shared_ptr< Payoffpayoff_
 
Date valueDate_
 
Date maturityDate_
 maturityDate of the forward contract or delivery date of underlying More...
 
Handle< YieldTermStructurediscountCurve_
 
Handle< YieldTermStructureincomeDiscountCurve_
 
- Protected Attributes inherited from Instrument
Real NPV_
 
Real errorEstimate_
 
Date valuationDate_
 
std::map< std::string, ext::any > additionalResults_
 
ext::shared_ptr< PricingEngineengine_
 
- Protected Attributes inherited from LazyObject
bool calculated_ = false
 
bool frozen_ = false
 
bool alwaysForward_
 

Detailed Description

Forward contract on a fixed-rate bond

Deprecated:
Use BondForward instead.

Definition at line 35 of file fixedratebondforward.hpp.

Constructor & Destructor Documentation

◆ FixedRateBondForward()

FixedRateBondForward ( 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< FixedRateBond > &  fixedRateBond,
const Handle< YieldTermStructure > &  discountCurve = Handle<YieldTermStructure>(),
const Handle< YieldTermStructure > &  incomeDiscountCurve = Handle<YieldTermStructure>() 
)

Definition at line 37 of file fixedratebondforward.hpp.