Logo Search packages:      
Sourcecode: quantlib version File versions  Download package

QuantLib::CallableFixedRateBond Class Reference

#include <callablebond.hpp>

Inheritance diagram for QuantLib::CallableFixedRateBond:

QuantLib::CallableBond QuantLib::Bond QuantLib::Instrument QuantLib::LazyObject QuantLib::Observable QuantLib::Observer QuantLib::CallableZeroCouponBond

List of all members.


Detailed Description

callable/puttable fixed rate bond

Callable fixed rate bond class.

Example: CallableBonds.cpp

Definition at line 153 of file callablebond.hpp.


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 Rate nextCoupon (Date d=Date()) const
void notifyObservers ()
Rate previousCoupon (Date d=Date()) const
 Previous coupon already paid at a given date.
void registerWith (const boost::shared_ptr< Observable > &)
virtual void setupArguments (PricingEngine::arguments *args) const
void unregisterWith (const boost::shared_ptr< Observable > &)
Calculations
virtual Real accruedAmount (Date d=Date()) const
 accrued amount at a given date
Real cleanPrice (Rate yield, const DayCounter &dc, Compounding comp, Frequency freq, Date settlementDate=Date()) const
 clean price given a yield and settlement date
Real cleanPrice () const
 theoretical clean price
Real cleanPriceFromZSpread (Spread zSpread, const DayCounter &dc, Compounding comp, Frequency freq, Date settlementDate=Date()) const
 clean price given Z-spread
Real dirtyPrice (Rate yield, const DayCounter &dc, Compounding comp, Frequency freq, Date settlementDate=Date()) const
 dirty price given a yield and settlement date
Real dirtyPrice () const
 theoretical dirty price
Real dirtyPriceFromZSpread (Spread zSpread, const DayCounter &dc, Compounding comp, Frequency freq, Date settlementDate=Date()) const
 dirty price given Z-spread
bool isExpired () const
 returns whether the instrument is still tradable.
Real settlementValue (Real cleanPrice) const
 settlement value as a function of the clean price
Real settlementValue () const
 theoretical settlement value
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
Rate yield (const DayCounter &dc, Compounding comp, Frequency freq, Real accuracy=1.0e-8, Size maxEvaluations=100) const
 theoretical bond yield
Inspectors
const std::map< std::string,
boost::any > & 
additionalResults () const
 returns all additional result returned by the pricing engine.
Real errorEstimate () const
 returns the error estimate on the NPV when available.
Real NPV () const
 returns the net present value of the instrument.
template<typename T>
result (const std::string &tag) const
 returns any additional result returned by the pricing engine.
Inspectors
const Calendarcalendar () const
const Leg & cashflows () const
Real faceAmount () const
Date issueDate () const
Date maturityDate () const
virtual Real notional (Date d=Date()) const
const std::vector< Real > & notionals () const
const boost::shared_ptr
< CashFlow > & 
redemption () const
const Leg & redemptions () const
Date settlementDate (const Date &d=Date()) const
Natural settlementDays () const
Inspectors
const CallabilitySchedule & callability () const
 return the bond's put/call schedule
Calculations
These methods do not modify the structure of the object and are therefore declared as const. Data members which will be calculated on demand need to be declared as mutable.

void freeze ()
void recalculate ()
void unfreeze ()
Calculations
Volatility impliedVolatility (Real targetValue, const Handle< YieldTermStructure > &discountCurve, Real accuracy, Size maxEvaluations, Volatility minVol, Volatility maxVol) const
 returns the Black implied forward yield volatility
Modifiers
void setPricingEngine (const boost::shared_ptr< PricingEngine > &)
 set the pricing engine to be used.
Observer interface
void update ()

Protected Member Functions

void addRedemptionsToCashflows (const std::vector< Real > &redemptions=std::vector< Real >())
void calculateNotionalsFromCashflows ()
void fetchResults (const PricingEngine::results *) const
void setSingleRedemption (Real notional, Real redemption, const Date &date)
void setupExpired () const
Calculations
void calculate () const
virtual void performCalculations () const

Protected Attributes

RelinkableHandle
< YieldTermStructure
blackDiscountCurve_
 Black fwd yield volatility quote handle to internal blackEngine_.
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_.
bool calculated_
Calendar calendar_
Leg cashflows_
boost::shared_ptr< PricingEngineengine_
Frequency frequency_
bool frozen_
Date issueDate_
Date maturityDate_
std::vector< Realnotionals_
std::vector< DatenotionalSchedule_
DayCounter paymentDayCounter_
CallabilitySchedule putCallSchedule_
Leg redemptions_
Natural settlementDays_
Real settlementValue_
Results
The value of this attribute and any other that derived classes might declare must be set during calculation.

std::map< std::string, boost::any > additionalResults_
Real errorEstimate_
Real NPV_

Private Member Functions

Real accrued (Date settlement) const
 accrued interest used internally, where includeToday = false

Friends

class ImpliedVolHelper

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index