`#include <compoundforward.hpp>`

Inheritance diagram for QuantLib::CompoundForward:

**Test:**- the correctness of the curve is tested by reproducing the input data.
- the correctness of the curve is tested by checking the consistency between returned rates and swaps priced on the curve.

**Bug:**- swap rates are not reproduced exactly when using indexed coupons. Apparently, some assumption about the swap fixings is hard-coded into the bootstrapping algorithm.

Definition at line 45 of file compoundforward.hpp.

## Public Member Functions | |

BusinessDayConvention | businessDayConvention () const |

Calendar | calendar () const |

the calendar used for reference date calculation | |

Rate | compoundForward (Time t1, Integer f, bool extrapolate=false) const |

Rate | compoundForward (const Date &d1, Integer f, bool extrapolate=false) const |

CompoundForward (const Date &referenceDate, const std::vector< Date > &dates, const std::vector< Rate > &forwards, const Calendar &calendar, const BusinessDayConvention conv, const Integer compounding, const DayCounter &dayCounter) | |

Integer | compounding () const |

const std::vector< Date > & | dates () const |

DayCounter | dayCounter () const |

the day counter used for date/time conversion | |

boost::shared_ptr < ExtendedDiscountCurve > | discountCurve () const |

const std::vector< Rate > & | forwards () const |

Date | maxDate () const |

the latest date for which the curve can return rates | |

Time | maxTime () const |

the latest time for which the curve can return rates | |

void | notifyObservers () |

template<class T> | |

void | registerWith (const boost::shared_ptr< T > &h) |

const std::vector< Time > & | times () const |

template<class T> | |

void | unregisterWith (const boost::shared_ptr< T > &h) |

inspectors | |

bool | allowsExtrapolation () const |

tells whether extrapolation is enabled | |

modifiers | |

void | disableExtrapolation () |

disable extrapolation in subsequent calls | |

void | enableExtrapolation () |

enable extrapolation in subsequent calls | |

discount factors | |

These methods return the discount factor for a given date or time. In the former case, the time is calculated as a fraction of year from the reference date. | |

DiscountFactor | discount (Time, bool extrapolate=false) const |

DiscountFactor | discount (const Date &, bool extrapolate=false) const |

forward rates | |

These methods returns the implied forward interest rate between two dates or times. In the former case, times are calculated as fractions of year from the reference date. | |

InterestRate | forwardRate (Time t1, Time t2, Compounding comp, Frequency freq=Annual, bool extrapolate=false) const |

InterestRate | forwardRate (const Date &d1, const Date &d2, const DayCounter &resultDayCounter, Compounding comp, Frequency freq=Annual, bool extrapolate=false) const |

par rates | |

These methods returns the implied par rate for a given sequence of payments at the given dates or times. In the former case, times are calculated as fractions of year from the reference date.
**Warning:**- though somewhat related to a swap rate, this method is not to be used for the fair rate of a real swap, since it does not take into account all the market conventions' details. The correct way to evaluate such rate is to instantiate a SimpleSwap with the correct conventions, pass it the term structure and call the swap's fairRate() method.
| |

Rate | parRate (Year tenor, Time t0, Frequency freq=Annual, bool extrapolate=false) const |

Rate | parRate (const std::vector< Time > ×, Frequency freq=Annual, bool extrapolate=false) const |

Rate | parRate (const std::vector< Date > &dates, Frequency freq=Annual, bool extrapolate=false) const |

Rate | parRate (Integer tenor, const Date &startDate, Frequency freq=Annual, bool extrapolate=false) const |

Dates | |

virtual const Date & | referenceDate () const |

the reference date, i.e., the date at which discount = 1 | |

Observer interface | |

void | update () |

zero-yield rates | |

These methods return the implied zero-yield rate for a given date or time. In the former case, the time is calculated as a fraction of year from the reference date. | |

InterestRate | zeroRate (Time t, Compounding comp, Frequency freq=Annual, bool extrapolate=false) const |

InterestRate | zeroRate (const Date &d, const DayCounter &resultDayCounter, Compounding comp, Frequency freq=Annual, bool extrapolate=false) const |

## Protected Member Functions | |

boost::shared_ptr < YieldTermStructure > | bootstrap () const |

void | calibrateNodes () const |

Rate | compoundForwardImpl (Time, Integer) const |

DiscountFactor | discountImpl (Time) const |

Rate | forwardImpl (Time) const |

instantaneous forward-rate calculation | |

Size | referenceNode (Time) const |

Time | timeFromReference (const Date &date) const |

date/time conversion | |

Rate | zeroYieldImpl (Time) const |

## Private Attributes | |

Calendar | calendar_ |

Integer | compounding_ |

BusinessDayConvention | conv_ |

std::vector< Date > | dates_ |

DayCounter | dayCounter_ |

boost::shared_ptr < ExtendedDiscountCurve > | discountCurve_ |

std::vector< Rate > | forwards_ |

Interpolation | fwdinterp_ |

bool | needsBootstrap_ |

std::vector< Time > | times_ |

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

- QuantLib-0.3.11/ql/TermStructures/compoundforward.hpp
- QuantLib-0.3.11/ql/TermStructures/compoundforward.cpp

Generated by Doxygen 1.6.0 Back to index