QuantLib 0.3.8
Getting started
Reference manual
|
PiecewiseFlatForward Class Reference
[Term structures]
#include <ql/TermStructures/piecewiseflatforward.hpp>
Inheritance diagram for PiecewiseFlatForward:
[legend]List of all members.
Detailed Description
Piecewise flat forward term structure.
This term structure is bootstrapped on a number of interest rate instruments which are passed as a vector of handles to RateHelper instances. Their maturities mark the boundaries of the flat forward segments.
The values of the forward rates for each segment are determined sequentially starting from the earliest period to the latest.
The value for each segment is chosen so that the instrument whose maturity marks the end of such segment is correctly repriced on the curve.
Rates are assumed to be annual continuos compounding.
- Warning:
- The bootstrapping algorithm will raise an exception if any two instruments have the same maturity date.
- Tests:
- a) the correctness of the returned values is tested by checking them against the original inputs.
b) the observability of the term structure is tested.
|
Public Member Functions |
|
| PiecewiseFlatForward (const Date &todaysDate, const Date &referenceDate, const std::vector< boost::shared_ptr< RateHelper > > &instruments, const DayCounter &dayCounter, Real accuracy=1.0e-12) |
| PiecewiseFlatForward (const Date &todaysDate, const std::vector< Date > &dates, const std::vector< Rate > &forwards, const DayCounter &dayCounter) |
| PiecewiseFlatForward (const Date &referenceDate, const std::vector< boost::shared_ptr< RateHelper > > &instruments, const DayCounter &dayCounter, Real accuracy=1.0e-12) |
| PiecewiseFlatForward (Integer settlementDays, const Calendar &calendar, const std::vector< boost::shared_ptr< RateHelper > > &instruments, const DayCounter &dayCounter, Real accuracy=1.0e-12) |
| PiecewiseFlatForward (const std::vector< Date > &dates, const std::vector< Rate > &forwards, const DayCounter &dayCounter) |
|
DayCounter | dayCounter () const |
| the day counter used for date/time conversion
|
const std::vector< Date > & | dates () const |
Date | maxDate () const |
| the latest date for which the curve can return rates
|
const std::vector< Time > & | times () const |
Time | maxTime () const |
| the latest time for which the curve can return rates
|
|
void | update () |
Protected Member Functions |
Rate | zeroYieldImpl (Time) const |
| zero-yield calculation
|
DiscountFactor | discountImpl (Time) const |
| discount calculation
|
Rate | forwardImpl (Time) const |
| instantaneous forward-rate calculation
|
Rate | compoundForwardImpl (Time t, Integer compFreq) const |
| compound forward-rate calculation
|
Friends |
class | FFObjFunction |
Constructor & Destructor Documentation
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.
Reimplemented from LazyObject. |
|