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

QuantLib::AmortizingFloatingRateBond Class Reference

amortizing floating-rate bond (possibly capped and/or floored) More...

#include <amortizingfloatingratebond.hpp>

Inheritance diagram for QuantLib::AmortizingFloatingRateBond:
Collaboration diagram for QuantLib::AmortizingFloatingRateBond:

List of all members.

Public Member Functions

 AmortizingFloatingRateBond (Natural settlementDays, const std::vector< Real > &notional, const Schedule &schedule, const boost::shared_ptr< IborIndex > &index, const DayCounter &accrualDayCounter, BusinessDayConvention paymentConvention=Following, Natural fixingDays=Null< Natural >(), const std::vector< Real > &gearings=std::vector< Real >(1, 1.0), const std::vector< Spread > &spreads=std::vector< Spread >(1, 0.0), const std::vector< Rate > &caps=std::vector< Rate >(), const std::vector< Rate > &floors=std::vector< Rate >(), bool inArrears=false, const Date &issueDate=Date())
Date nextCashFlowDate (Date d=Date()) const
virtual Rate nextCouponRate (Date d=Date()) const
void notifyObservers ()
Date previousCashFlowDate (Date d=Date()) const
Rate previousCouponRate (Date d=Date()) const
 Previous coupon already paid at a given date.
void registerWith (const boost::shared_ptr< Observable > &)
void unregisterWith (const boost::shared_ptr< Observable > &)
Instrument interface
bool isExpired () const
 returns whether the instrument might have value greater than zero.
Inspectors
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 maturityDate () const
Date issueDate () const
bool isTradable (Date d=Date()) const
Date settlementDate (Date d=Date()) const
Calculations
Real cleanPrice () const
 theoretical clean price
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 () const
 theoretical dirty price
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 () const
 theoretical settlement value
Real settlementValue (Real cleanPrice) const
 settlement value as a function of the clean price
Rate yield (const DayCounter &dc, Compounding comp, Frequency freq, Real accuracy=1.0e-8, Size maxEvaluations=100) const
 theoretical bond yield
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
Inspectors
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.
Modifiers
void setPricingEngine (const boost::shared_ptr< PricingEngine > &)
 set the pricing engine to be used.
Observer interface
void update ()
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 recalculate ()
void freeze ()
void unfreeze ()

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 setSingleRedemption (Real notional, const boost::shared_ptr< CashFlow > &redemption)
void setupArguments (PricingEngine::arguments *) const
void setupExpired () const
Calculations
void calculate () const
virtual void performCalculations () const

Protected Attributes

bool calculated_
Calendar calendar_
Leg cashflows_
boost::shared_ptr< PricingEngineengine_
bool frozen_
Date issueDate_
Date maturityDate_
std::vector< Realnotionals_
std::vector< DatenotionalSchedule_
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.

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

Detailed Description

amortizing floating-rate bond (possibly capped and/or floored)

Definition at line 35 of file amortizingfloatingratebond.hpp.


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

Generated by  Doxygen 1.6.0   Back to index