|
QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
|
Basic term-structure functionality. More...
#include <ql/termstructure.hpp>
Public Member Functions | |
Constructors | |
There are three ways in which a term structure can keep track of its reference date. The first is that such date is fixed; the second is that it is determined by advancing the current date of a given number of business days; and the third is that it is based on the reference date of some other structure. In the first case, the constructor taking a date is to be used; the default implementation of referenceDate() will then return such date. In the second case, the constructor taking a number of days and a calendar is to be used; referenceDate() will return a date calculated based on the current evaluation date, and the term structure and its observers will be notified when the evaluation date changes. In the last case, the referenceDate() method must be overridden in derived classes so that it fetches and return the appropriate date. | |
| TermStructure (DayCounter dc=DayCounter()) | |
| default constructor | |
| TermStructure (const Date &referenceDate, Calendar calendar=Calendar(), DayCounter dc=DayCounter()) | |
| initialize with a fixed reference date | |
| TermStructure (Natural settlementDays, Calendar, DayCounter dc=DayCounter()) | |
| calculate the reference date based on the global evaluation date | |
Dates and Time | |
| virtual DayCounter | dayCounter () const |
| the day counter used for date/time conversion | |
| Time | timeFromReference (const Date &date) const |
| date/time conversion | |
| virtual Date | maxDate () const =0 |
| the latest date for which the curve can return values | |
| virtual Time | maxTime () const |
| the latest time for which the curve can return values | |
| virtual const Date & | referenceDate () const |
| the date at which discount = 1.0 and/or variance = 0.0 | |
| virtual Calendar | calendar () const |
| the calendar used for reference and/or option date calculation | |
| virtual Natural | settlementDays () const |
| the settlementDays used for reference date calculation | |
| Public Member Functions inherited from Observer | |
| Observer (const Observer &) | |
| Observer & | operator= (const Observer &) |
| std::pair< iterator, bool > | registerWith (const ext::shared_ptr< Observable > &) |
| void | registerWithObservables (const ext::shared_ptr< Observer > &) |
| Size | unregisterWith (const ext::shared_ptr< Observable > &) |
| void | unregisterWithAll () |
| virtual void | deepUpdate () |
| Public Member Functions inherited from Observable | |
| Observable (const Observable &) | |
| Observable & | operator= (const Observable &) |
| Observable (Observable &&)=delete | |
| Observable & | operator= (Observable &&)=delete |
| void | notifyObservers () |
| Public Member Functions inherited from Extrapolator | |
| void | enableExtrapolation (bool b=true) |
| enable extrapolation in subsequent calls | |
| void | disableExtrapolation (bool b=true) |
| disable extrapolation in subsequent calls | |
| bool | allowsExtrapolation () const |
| tells whether extrapolation is enabled | |
Observer interface | |
| bool | moving_ = false |
| bool | updated_ = true |
| Calendar | calendar_ |
| void | update () override |
| void | checkRange (const Date &d, bool extrapolate) const |
| date-range check | |
| void | checkRange (Time t, bool extrapolate) const |
| time-range check | |
Additional Inherited Members | |
| Public Types inherited from Observer | |
| typedef set_type::iterator | iterator |
Basic term-structure functionality.
|
explicit |
default constructor
|
virtual |
the day counter used for date/time conversion
Reimplemented in BlackVarianceCurve, BlackVarianceSurface, CallableBondConstantVolatility, ExtendedBlackVarianceCurve, ExtendedBlackVarianceSurface, FactorSpreadedHazardRateCurve, ForwardSpreadedTermStructure, ImpliedTermStructure, ImpliedVolTermStructure, InterpolatedPiecewiseForwardSpreadedTermStructure< Interpolator >, InterpolatedPiecewiseZeroSpreadedTermStructure< Interpolator >, InterpolatedPiecewiseZeroSpreadedTermStructure< Linear >, InterpolatedSpreadDiscountCurve< Interpolator >, InterpolatedSpreadDiscountCurve< LogLinear >, LocalConstantVol, LocalVolCurve, LocalVolSurface, QuantoTermStructure, SabrVolSurface, SpreadedHazardRateCurve, SwaptionVolatilityCube, UltimateForwardTermStructure, and ZeroSpreadedTermStructure.
|
pure virtual |
the latest date for which the curve can return values
Implemented in AbcdAtmVolCurve, BaseCorrelationTermStructure< Interpolator2D_T >, BlackConstantVol, BlackVarianceCurve, BlackVarianceSurface, CallableBondConstantVolatility, CapFloorTermVolCurve, CapFloorTermVolSurface, CommodityCurve, ConstantCapFloorTermVolatility, ConstantCPIVolatility, ConstantOptionletVolatility, ConstantSwaptionVolatility, ConstantYoYOptionletVolatility, CPICapFloorTermPriceSurface, ExtendedBlackVarianceCurve, ExtendedBlackVarianceSurface, FactorSpreadedHazardRateCurve, FittedBondDiscountCurve, FlatForward, FlatHazardRate, ForwardSpreadedTermStructure, ImpliedTermStructure, ImpliedVolTermStructure, InterpolatedAffineHazardRateCurve< Interpolator >, InterpolatedDefaultDensityCurve< Interpolator >, InterpolatedDiscountCurve< Interpolator >, InterpolatedDiscountCurve< LogLinear >, InterpolatedForwardCurve< Interpolator >, InterpolatedForwardCurve< BackwardFlat >, InterpolatedHazardRateCurve< Interpolator >, InterpolatedPiecewiseForwardSpreadedTermStructure< Interpolator >, InterpolatedPiecewiseZeroSpreadedTermStructure< Interpolator >, InterpolatedPiecewiseZeroSpreadedTermStructure< Linear >, InterpolatedSimpleZeroCurve< Interpolator >, InterpolatedSpreadDiscountCurve< Interpolator >, InterpolatedSpreadDiscountCurve< LogLinear >, InterpolatedSurvivalProbabilityCurve< Interpolator >, InterpolatedYoYInflationCurve< Interpolator >, InterpolatedYoYInflationCurve< Linear >, InterpolatedYoYOptionletVolatilityCurve< Interpolator1D >, InterpolatedYoYOptionletVolatilityCurve< Interpolator >, InterpolatedZeroCurve< Interpolator >, InterpolatedZeroCurve< Linear >, InterpolatedZeroInflationCurve< Interpolator >, InterpolatedZeroInflationCurve< Linear >, KInterpolatedYoYOptionletVolatilitySurface< Interpolator1D >, LocalConstantVol, LocalVolCurve, LocalVolSurface, OneFactorAffineSurvivalStructure, PiecewiseYoYInflationCurve< Interpolator, Bootstrap, Traits >, PiecewiseYoYInflationCurve< Interpolator, Bootstrap, Traits >, PiecewiseYoYInflationCurve< Interpolator, IterativeBootstrap, YoYInflationTraits >, PiecewiseYoYOptionletVolatilityCurve< Interpolator, Bootstrap, Traits >, PiecewiseYoYOptionletVolatilityCurve< Interpolator, Bootstrap, Traits >, PiecewiseYoYOptionletVolatilityCurve< Interpolator, IterativeBootstrap, YoYInflationVolatilityTraits >, PiecewiseZeroInflationCurve< Interpolator, Bootstrap, Traits >, PiecewiseZeroInflationCurve< Interpolator, Bootstrap, Traits >, PiecewiseZeroInflationCurve< Interpolator, IterativeBootstrap, ZeroInflationTraits >, QuantoTermStructure, SabrVolSurface, SpreadedHazardRateCurve, StrippedOptionletAdapter, SwaptionVolatilityCube, SwaptionVolatilityMatrix, UltimateForwardTermStructure, and ZeroSpreadedTermStructure.
|
virtual |
the latest time for which the curve can return values
Reimplemented in FactorSpreadedHazardRateCurve, ForwardSpreadedTermStructure, SabrVolSurface, SpreadedHazardRateCurve, SwaptionVolatilityCube, and ZeroSpreadedTermStructure.
|
virtual |
the date at which discount = 1.0 and/or variance = 0.0
Reimplemented in FactorSpreadedHazardRateCurve, ForwardSpreadedTermStructure, InterpolatedPiecewiseForwardSpreadedTermStructure< Interpolator >, InterpolatedPiecewiseZeroSpreadedTermStructure< Interpolator >, InterpolatedPiecewiseZeroSpreadedTermStructure< Linear >, InterpolatedSpreadDiscountCurve< Interpolator >, InterpolatedSpreadDiscountCurve< LogLinear >, LocalVolCurve, LocalVolSurface, QuantoTermStructure, SabrVolSurface, SpreadedHazardRateCurve, SwaptionVolatilityCube, UltimateForwardTermStructure, and ZeroSpreadedTermStructure.
|
virtual |
the calendar used for reference and/or option date calculation
Reimplemented in FactorSpreadedHazardRateCurve, ForwardSpreadedTermStructure, ImpliedTermStructure, InterpolatedPiecewiseForwardSpreadedTermStructure< Interpolator >, InterpolatedPiecewiseZeroSpreadedTermStructure< Interpolator >, InterpolatedPiecewiseZeroSpreadedTermStructure< Linear >, InterpolatedSpreadDiscountCurve< Interpolator >, InterpolatedSpreadDiscountCurve< LogLinear >, LocalVolCurve, QuantoTermStructure, SabrVolSurface, SpreadedHazardRateCurve, SwaptionVolatilityCube, UltimateForwardTermStructure, and ZeroSpreadedTermStructure.
|
virtual |
the settlementDays used for reference date calculation
Reimplemented in ForwardSpreadedTermStructure, ImpliedTermStructure, InterpolatedPiecewiseForwardSpreadedTermStructure< Interpolator >, InterpolatedPiecewiseZeroSpreadedTermStructure< Interpolator >, InterpolatedPiecewiseZeroSpreadedTermStructure< Linear >, InterpolatedSpreadDiscountCurve< Interpolator >, InterpolatedSpreadDiscountCurve< LogLinear >, QuantoTermStructure, SabrVolSurface, SwaptionVolatilityCube, UltimateForwardTermStructure, and ZeroSpreadedTermStructure.
|
overridevirtual |
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.
Reimplemented in UltimateForwardTermStructure, YieldTermStructure, and ZeroSpreadedTermStructure.