- QuantLib
- ForwardRateStructure
Forward-rate term structure More...
#include <ql/termstructures/yield/forwardstructure.hpp>
Public Member Functions | |
Constructors | |
See the TermStructure documentation for issues regarding constructors. | |
ForwardRateStructure (const DayCounter &dayCounter=DayCounter(), const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >()) | |
ForwardRateStructure (const Date &referenceDate, const Calendar &cal=Calendar(), const DayCounter &dayCounter=DayCounter(), const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >()) | |
ForwardRateStructure (Natural settlementDays, const Calendar &cal, const DayCounter &dayCounter=DayCounter(), const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >()) | |
Protected Member Functions | |
Calculations | |
These methods must be implemented in derived classes to perform the actual calculations. When they are called, range check has already been performed; therefore, they must assume that extrapolation is required. | |
virtual Rate | forwardImpl (Time) const =0 |
instantaneous forward-rate calculation | |
virtual Rate | zeroYieldImpl (Time) const |
YieldTermStructure implementation | |
DiscountFactor | discountImpl (Time) const |
Forward-rate term structure
This abstract class acts as an adapter to YieldTermStructure allowing the programmer to implement only the forwardImpl(Time)
method in derived classes.
Zero yields and discounts are calculated from forwards.
Forward rates are assumed to be annual continuous compounding.
virtual Rate zeroYieldImpl | ( | Time | ) | const [protected, virtual] |
Returns the zero yield rate for the given date calculating it from the instantaneous forward rate as
Reimplemented in InterpolatedForwardCurve< Interpolator >, and ForwardSpreadedTermStructure.
DiscountFactor discountImpl | ( | Time | t | ) | const [protected, virtual] |
Returns the discount factor for the given date calculating it from the zero rate as
Implements YieldTermStructure.