CallableFixedRateBond Class Reference

callable/puttable fixed rate bond More...

#include <ql/experimental/callablebonds/callablebond.hpp>

Inheritance diagram for CallableFixedRateBond:

Public Member Functions

 CallableFixedRateBond (Natural settlementDays, Real faceAmount, const Schedule &schedule, const std::vector< Rate > &coupons, const DayCounter &accrualDayCounter, BusinessDayConvention paymentConvention=Following, Real redemption=100.0, const Date &issueDate=Date(), const CallabilitySchedule &putCallSchedule=CallabilitySchedule())
 
virtual void setupArguments (PricingEngine::arguments *args) const
 
- Public Member Functions inherited from CallableBond
const CallabilitySchedule & callability () const
 return the bond's put/call schedule
 
Volatility impliedVolatility (Real targetValue, const Handle< YieldTermStructure > &discountCurve, Real accuracy, Size maxEvaluations, Volatility minVol, Volatility maxVol) const
 returns the Black implied forward yield volatility
 
- Public Member Functions inherited from Bond
 Bond (Natural settlementDays, const Calendar &calendar, const Date &issueDate=Date(), const Leg &coupons=Leg())
 constructor for amortizing or non-amortizing bonds.
 
 Bond (Natural settlementDays, const Calendar &calendar, Real faceAmount, const Date &maturityDate, const Date &issueDate=Date(), const Leg &cashflows=Leg())
 old constructor for non amortizing bonds.
 
virtual Rate nextCouponRate (Date d=Date()) const
 
Rate previousCouponRate (Date d=Date()) const
 Previous coupon already paid at a given date.
 
Date nextCashFlowDate (Date d=Date()) const
 
Date previousCashFlowDate (Date d=Date()) const
 
bool isExpired () const
 returns whether the instrument might have value greater than zero.
 
Natural settlementDays () const
 
const Calendarcalendar () const
 
const std::vector< Real > & notionals () const
 
virtual Real notional (Date d=Date()) const
 
const Legcashflows () const
 
const Legredemptions () const
 
const boost::shared_ptr
< CashFlow > & 
redemption () const
 
Date startDate () const
 
Date maturityDate () const
 
Date issueDate () const
 
bool isTradable (Date d=Date()) const
 
Date settlementDate (Date d=Date()) const
 
Real cleanPrice () const
 theoretical clean price
 
Real dirtyPrice () const
 theoretical dirty price
 
Real settlementValue () const
 theoretical settlement value
 
Rate yield (const DayCounter &dc, Compounding comp, Frequency freq, Real accuracy=1.0e-8, Size maxEvaluations=100) const
 theoretical bond yield
 
Real cleanPrice (Rate yield, const DayCounter &dc, Compounding comp, Frequency freq, Date settlementDate=Date()) const
 clean price given a yield and settlement date
 
Real dirtyPrice (Rate yield, const DayCounter &dc, Compounding comp, Frequency freq, Date settlementDate=Date()) const
 dirty price given a yield and settlement date
 
Real settlementValue (Real cleanPrice) const
 settlement value as a function of the clean price
 
Rate yield (Real cleanPrice, const DayCounter &dc, Compounding comp, Frequency freq, Date settlementDate=Date(), Real accuracy=1.0e-8, Size maxEvaluations=100) const
 yield given a (clean) price and settlement date
 
virtual Real accruedAmount (Date d=Date()) const
 accrued amount at a given date
 
- Public Member Functions inherited from Instrument
Real NPV () const
 returns the net present value of the instrument.
 
Real errorEstimate () const
 returns the error estimate on the NPV when available.
 
const DatevaluationDate () const
 returns the date the net present value refers to.
 
template<typename T >
result (const std::string &tag) const
 returns any additional result returned by the pricing engine.
 
const std::map< std::string,
boost::any > & 
additionalResults () const
 returns all additional result returned by the pricing engine.
 
void setPricingEngine (const boost::shared_ptr< PricingEngine > &)
 set the pricing engine to be used.
 
- Public Member Functions inherited from LazyObject
void update ()
 
void recalculate ()
 
void freeze ()
 
void unfreeze ()
 
- Public Member Functions inherited from Observable
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
void notifyObservers ()
 
- Public Member Functions inherited from Observer
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
std::pair< std::set
< boost::shared_ptr
< Observable > >::iterator,
bool > 
registerWith (const boost::shared_ptr< Observable > &)
 
Size unregisterWith (const boost::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 

Additional Inherited Members

- Protected Member Functions inherited from CallableBond
 CallableBond (Natural settlementDays, const Schedule &schedule, const DayCounter &paymentDayCounter, const Date &issueDate=Date(), const CallabilitySchedule &putCallSchedule=CallabilitySchedule())
 
- Protected Attributes inherited from CallableBond
DayCounter paymentDayCounter_
 
Frequency frequency_
 
CallabilitySchedule putCallSchedule_
 
boost::shared_ptr< PricingEngineblackEngine_
 must be set by derived classes for impliedVolatility() to work
 
RelinkableHandle< QuoteblackVolQuote_
 Black fwd yield volatility quote handle to internal blackEngine_.
 
RelinkableHandle
< YieldTermStructure
blackDiscountCurve_
 Black fwd yield volatility quote handle to internal blackEngine_.
 

Detailed Description

callable/puttable fixed rate bond

Callable fixed rate bond class.

   <b> Example: </b>
   \link CallableBonds.cpp
   \endlink
Examples:
CallableBonds.cpp.

Member Function Documentation

virtual void setupArguments ( PricingEngine::arguments *  ) const
virtual

When a derived argument structure is defined for an instrument, this method should be overridden to fill it. This is mandatory in case a pricing engine is used.

Reimplemented from CallableBond.