CompoundForward Class Reference#include <ql/TermStructures/compoundforward.hpp>
Inheritance diagram for CompoundForward:
[legend]List of all members.
Detailed Description
- Tests:
- a) the correctness of the curve is tested by reproducing the input data.
b) the correctness of the curve is tested by checking the consistency between returned rates and swaps priced on the curve.
|
Public Member Functions |
| CompoundForward (const Date &todaysDate, 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) |
Date | todaysDate () const |
| today's date
|
Date | referenceDate () const |
| the reference date, i.e., the date at which discount = 1
|
Calendar | calendar () const |
BusinessDayConvention | roll () const |
BusinessDayConvention | businessDayConvention () const |
DayCounter | dayCounter () const |
| the day counter used for date/time conversion
|
Integer | compounding () 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
|
const std::vector< Time > & | times () const |
const std::vector< Date > & | dates () const |
const std::vector< Rate > & | forwards () const |
boost::shared_ptr< TermStructure > | discountCurve () const |
|
void | update () |
Protected Member Functions |
void | calibrateNodes () const |
boost::shared_ptr< TermStructure > | bootstrap () const |
Rate | zeroYieldImpl (Time) const |
DiscountFactor | discountImpl (Time) const |
Size | referenceNode (Time) const |
Rate | forwardImpl (Time) const |
| instantaneous forward-rate calculation
|
Rate | compoundForwardImpl (Time, Integer) const |
Member Function Documentation
void update |
( |
|
) |
[virtual] |
|
|
This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.
Implements Observer. |
Rate zeroYieldImpl |
( |
Time |
|
) |
const [protected, virtual] |
|
|
Returns the zero yield rate for the given date calculating it from the instantaneous forward rate. - Warning:
- This is just a default, highly inefficient implementation. Derived classes should implement their own zeroYield method.
Reimplemented from ForwardRateStructure. |
|
Returns the discount factor for the given date calculating it from the instantaneous forward rate.
Reimplemented from ForwardRateStructure. |
|
Returns the forward rate at a specified compound frequency for the given date calculating it from the zero yield.
Reimplemented from ForwardRateStructure. |
|