FixedRateBond Class Reference
Financial instruments

fixed-rate bond More...

`#include <ql/instruments/bonds/fixedratebond.hpp>`

Inheritance diagram for FixedRateBond:
[legend]

## Public Member Functions

FixedRateBond (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 Calendar &paymentCalendar=Calendar(), const Period &exCouponPeriod=Period(), const Calendar &exCouponCalendar=Calendar(), const BusinessDayConvention exCouponConvention=Unadjusted, bool exCouponEndOfMonth=false)

| simple annual compounding coupon rates

FixedRateBond (Natural settlementDays, const Calendar &couponCalendar, Real faceAmount, const Date &startDate, const Date &maturityDate, const Period &tenor, const std::vector< Rate > &coupons, const DayCounter &accrualDayCounter, BusinessDayConvention accrualConvention=Following, BusinessDayConvention paymentConvention=Following, Real redemption=100.0, const Date &issueDate=Date(), const Date &stubDate=Date(), DateGeneration::Rule rule=DateGeneration::Backward, bool endOfMonth=false, const Calendar &paymentCalendar=Calendar(), const Period &exCouponPeriod=Period(), const Calendar &exCouponCalendar=Calendar(), const BusinessDayConvention exCouponConvention=Unadjusted, bool exCouponEndOfMonth=false)

FixedRateBond (Natural settlementDays, Real faceAmount, const Schedule &schedule, const std::vector< InterestRate > &coupons, BusinessDayConvention paymentConvention=Following, Real redemption=100.0, const Date &issueDate=Date(), const Calendar &paymentCalendar=Calendar(), const Period &exCouponPeriod=Period(), const Calendar &exCouponCalendar=Calendar(), const BusinessDayConvention exCouponConvention=Unadjusted, bool exCouponEndOfMonth=false)

| generic compounding and frequency InterestRate coupons
Frequency | frequency () const
const DayCounter & | dayCounter () const
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. More...
| 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. More...
virtual Rate | nextCouponRate (Date d=Date()) const
Rate | previousCouponRate (Date d=Date()) const
| Previous coupon already paid at a given date. More...
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 Calendar & | calendar () const
const std::vector< Real > & | notionals () const
virtual Real | notional (Date d=Date()) const
const Leg & | cashflows () const
const Leg & | redemptions () 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 More...
Real | dirtyPrice () const
| theoretical dirty price More...
Real | settlementValue () const
| theoretical settlement value More...
Rate | yield (const DayCounter &dc, Compounding comp, Frequency freq, Real accuracy=1.0e-8, Size maxEvaluations=100) const
| theoretical bond yield More...
Real | cleanPrice (Rate yield, const DayCounter &dc, Compounding comp, Frequency freq, Date settlementDate=Date()) const
| clean price given a yield and settlement date More...
Real | dirtyPrice (Rate yield, const DayCounter &dc, Compounding comp, Frequency freq, Date settlementDate=Date()) const
| dirty price given a yield and settlement date More...
Real | settlementValue (Real cleanPrice) const
| settlement value as a function of the clean price More...
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 More...
virtual Real | accruedAmount (Date d=Date()) const
| accrued amount at a given date More...
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 Date & | valuationDate () const
| returns the date the net present value refers to.
template<typename T >
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. More...
Public Member Functions inherited from LazyObject
void | update ()
void | recalculate ()
void | freeze ()
void | unfreeze ()
Public Member Functions inherited from Observable
| Observable (const Observable &)
Observable & | operator= (const Observable &)
void | notifyObservers ()
Public Member Functions inherited from Observer
| Observer (const Observer &)
Observer & | operator= (const Observer &)
std::pair< std::set< boost::shared_ptr< Observable > >::iterator, bool > | registerWith (const boost::shared_ptr< Observable > &)
void | registerWithObservables (const boost::shared_ptr< Observer > &)
Size | unregisterWith (const boost::shared_ptr< Observable > &)
void | unregisterWithAll ()

## Protected Attributes

Frequency | frequency_
DayCounter | dayCounter_
Protected Attributes inherited from Bond
Natural | settlementDays_
Calendar | calendar_
std::vector< Date > | notionalSchedule_
std::vector< Real > | notionals_
Leg | cashflows_
Leg | redemptions_
Date | maturityDate_
Date | issueDate_
Real | settlementValue_
Protected Attributes inherited from Instrument
boost::shared_ptr< PricingEngine > | engine_
Real | NPV_
Real | errorEstimate_
Date | valuationDate_
std::map< std::string, boost::any > | additionalResults_
Protected Attributes inherited from LazyObject
bool | calculated_
bool | frozen_

## Additional Inherited Members

Protected Member Functions inherited from Bond
void | setupExpired () const
void | setupArguments (PricingEngine::arguments *) const
void | fetchResults (const PricingEngine::results *) const
void | addRedemptionsToCashflows (const std::vector< Real > &redemptions=std::vector< Real >())
void | setSingleRedemption (Real notional, Real redemption, const Date &date)
void | setSingleRedemption (Real notional, const boost::shared_ptr< CashFlow > &redemption)
void | calculateNotionalsFromCashflows ()
Protected Member Functions inherited from Instrument
void | calculate () const
virtual void | performCalculations () const
Protected Member Functions inherited from LazyObject

## Detailed Description

fixed-rate bond

Tests:
  calculations are tested by checking results against cached values.

Examples:
  Bonds.cpp, and Repo.cpp.

## Constructor & Destructor Documentation

FixedRateBond | ( | Natural | settlementDays,
|  | const Calendar & | couponCalendar,
|  | Real | faceAmount,
|  | const Date & | startDate,
|  | const Date & | maturityDate,
|  | const Period & | tenor,
|  | const std::vector< Rate > & | coupons,
|  | const DayCounter & | accrualDayCounter,
|  | BusinessDayConvention | accrualConvention = `Following`,
|  | BusinessDayConvention | paymentConvention = `Following`,
|  | Real | redemption = `100.0`,
|  | const Date & | issueDate = `Date()`,
|  | const Date & | stubDate = `Date()`,
|  | DateGeneration::Rule | rule = `DateGeneration::Backward`,
|  | bool | endOfMonth = `false`,
|  | const Calendar & | paymentCalendar = `Calendar()`,
|  | const Period & | exCouponPeriod = `Period()`,
|  | const Calendar & | exCouponCalendar = `Calendar()`,
|  | const BusinessDayConvention | exCouponConvention = `Unadjusted`,
|  | bool | exCouponEndOfMonth = `false`
| ) |  |

simple annual compounding coupon rates with internal schedule calculation