QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
|
#include <ql/experimental/inflation/cpicapfloortermpricesurface.hpp>
Public Member Functions | |
InterpolatedCPICapFloorTermPriceSurface (Real nominal, Rate startRate, const Period &observationLag, const Calendar &cal, const BusinessDayConvention &bdc, const DayCounter &dc, const ext::shared_ptr< ZeroInflationIndex > &zii, CPI::InterpolationType interpolationType, const Handle< YieldTermStructure > &yts, const std::vector< Rate > &cStrikes, const std::vector< Rate > &fStrikes, const std::vector< Period > &cfMaturities, const Matrix &cPrice, const Matrix &fPrice, const Interpolator2D &interpolator2d=Interpolator2D()) | |
Public Member Functions inherited from CPICapFloorTermPriceSurface | |
CPICapFloorTermPriceSurface (Real nominal, Real baseRate, const Period &observationLag, const Calendar &cal, const BusinessDayConvention &bdc, const DayCounter &dc, const ext::shared_ptr< ZeroInflationIndex > &zii, CPI::InterpolationType interpolationType, Handle< YieldTermStructure > yts, const std::vector< Rate > &cStrikes, const std::vector< Rate > &fStrikes, const std::vector< Period > &cfMaturities, const Matrix &cPrice, const Matrix &fPrice) | |
Period | observationLag () const override |
Date | baseDate () const override |
minimum (base) date More... | |
virtual Real | nominal () const |
inspectors More... | |
virtual BusinessDayConvention | businessDayConvention () const |
ext::shared_ptr< ZeroInflationIndex > | zeroInflationIndex () const |
Rate | atmRate (Date maturity) const |
virtual std::vector< Rate > | strikes () const |
virtual std::vector< Rate > | capStrikes () const |
virtual std::vector< Rate > | floorStrikes () const |
virtual std::vector< Period > | maturities () const |
virtual const Matrix & | capPrices () const |
virtual const Matrix & | floorPrices () const |
virtual Rate | minStrike () const |
virtual Rate | maxStrike () const |
virtual Date | minDate () const |
Date | maxDate () const override |
the latest date for which the curve can return values More... | |
virtual Date | cpiOptionDateFromTenor (const Period &p) const |
Public Member Functions inherited from InflationTermStructure | |
InflationTermStructure (Rate baseRate, const Period &observationLag, Frequency frequency, const DayCounter &dayCounter=DayCounter(), ext::shared_ptr< Seasonality > seasonality={}) | |
InflationTermStructure (const Date &referenceDate, Rate baseRate, const Period &observationLag, Frequency frequency, const Calendar &calendar=Calendar(), const DayCounter &dayCounter=DayCounter(), ext::shared_ptr< Seasonality > seasonality={}) | |
InflationTermStructure (Natural settlementDays, const Calendar &calendar, Rate baseRate, const Period &observationLag, Frequency frequency, const DayCounter &dayCounter=DayCounter(), ext::shared_ptr< Seasonality > seasonality={}) | |
virtual Frequency | frequency () const |
virtual Rate | baseRate () const |
void | setSeasonality (const ext::shared_ptr< Seasonality > &seasonality={}) |
Functions to set and get seasonality. More... | |
ext::shared_ptr< Seasonality > | seasonality () const |
bool | hasSeasonality () const |
Public Member Functions inherited from TermStructure | |
TermStructure (DayCounter dc=DayCounter()) | |
default constructor More... | |
TermStructure (const Date &referenceDate, Calendar calendar=Calendar(), DayCounter dc=DayCounter()) | |
initialize with a fixed reference date More... | |
TermStructure (Natural settlementDays, Calendar, DayCounter dc=DayCounter()) | |
calculate the reference date based on the global evaluation date More... | |
~TermStructure () override=default | |
virtual DayCounter | dayCounter () const |
the day counter used for date/time conversion More... | |
Time | timeFromReference (const Date &date) const |
date/time conversion More... | |
virtual Time | maxTime () const |
the latest time for which the curve can return values More... | |
virtual const Date & | referenceDate () const |
the date at which discount = 1.0 and/or variance = 0.0 More... | |
virtual Calendar | calendar () const |
the calendar used for reference and/or option date calculation More... | |
virtual Natural | settlementDays () const |
the settlementDays used for reference date calculation More... | |
void | update () override |
Public Member Functions inherited from Observer | |
Observer ()=default | |
Observer (const Observer &) | |
Observer & | operator= (const Observer &) |
virtual | ~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 | update ()=0 |
virtual void | deepUpdate () |
Public Member Functions inherited from Observable | |
Observable () | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
Public Member Functions inherited from Extrapolator | |
Extrapolator ()=default | |
virtual | ~Extrapolator ()=default |
void | enableExtrapolation (bool b=true) |
enable extrapolation in subsequent calls More... | |
void | disableExtrapolation (bool b=true) |
disable extrapolation in subsequent calls More... | |
bool | allowsExtrapolation () const |
tells whether extrapolation is enabled More... | |
LazyObject interface | |
Matrix | cPriceB_ |
Matrix | fPriceB_ |
Interpolation2D | capPrice_ |
Interpolation2D | floorPrice_ |
Interpolator2D | interpolator2d_ |
void | performCalculations () const |
Real | price (const Date &d, Rate k) const override |
remember that the strikes use the quoting convention More... | |
Real | capPrice (const Date &d, Rate k) const override |
remember that the strike uses the quoting convention More... | |
Real | floorPrice (const Date &d, Rate k) const override |
remember that the strike uses the quoting convention More... | |
virtual Real | price (const Period &d, Rate k) const |
required to allow for method hiding More... | |
virtual Real | price (const Date &d, Rate k) const=0 |
required to allow for method hiding More... | |
virtual Real | capPrice (const Period &d, Rate k) const |
virtual Real | capPrice (const Date &d, Rate k) const=0 |
virtual Real | floorPrice (const Period &d, Rate k) const |
virtual Real | floorPrice (const Date &d, Rate k) const=0 |
Additional Inherited Members | |
Public Types inherited from Observer | |
typedef set_type::iterator | iterator |
Protected Member Functions inherited from CPICapFloorTermPriceSurface | |
virtual bool | checkStrike (Rate K) |
virtual bool | checkMaturity (const Date &d) |
Protected Member Functions inherited from InflationTermStructure | |
virtual void | setBaseRate (const Rate &r) |
void | checkRange (const Date &, bool extrapolate) const |
void | checkRange (Time t, bool extrapolate) const |
Protected Member Functions inherited from TermStructure | |
void | checkRange (const Date &d, bool extrapolate) const |
date-range check More... | |
void | checkRange (Time t, bool extrapolate) const |
time-range check More... | |
Protected Attributes inherited from CPICapFloorTermPriceSurface | |
ext::shared_ptr< ZeroInflationIndex > | zii_ |
CPI::InterpolationType | interpolationType_ |
Handle< YieldTermStructure > | nominalTS_ |
std::vector< Rate > | cStrikes_ |
std::vector< Rate > | fStrikes_ |
std::vector< Period > | cfMaturities_ |
std::vector< Real > | cfMaturityTimes_ |
Matrix | cPrice_ |
Matrix | fPrice_ |
std::vector< Rate > | cfStrikes_ |
Protected Attributes inherited from InflationTermStructure | |
ext::shared_ptr< Seasonality > | seasonality_ |
Period | observationLag_ |
Frequency | frequency_ |
Rate | baseRate_ |
Protected Attributes inherited from TermStructure | |
bool | moving_ = false |
bool | updated_ = true |
Calendar | calendar_ |
Definition at line 146 of file cpicapfloortermpricesurface.hpp.
InterpolatedCPICapFloorTermPriceSurface | ( | Real | nominal, |
Rate | startRate, | ||
const Period & | observationLag, | ||
const Calendar & | cal, | ||
const BusinessDayConvention & | bdc, | ||
const DayCounter & | dc, | ||
const ext::shared_ptr< ZeroInflationIndex > & | zii, | ||
CPI::InterpolationType | interpolationType, | ||
const Handle< YieldTermStructure > & | yts, | ||
const std::vector< Rate > & | cStrikes, | ||
const std::vector< Rate > & | fStrikes, | ||
const std::vector< Period > & | cfMaturities, | ||
const Matrix & | cPrice, | ||
const Matrix & | fPrice, | ||
const Interpolator2D & | interpolator2d = Interpolator2D() |
||
) |
void performCalculations |
set up the interpolations for capPrice_ and floorPrice_ since we know ATM, and we have single flows, we can use put/call parity to extend the surfaces across all strikes
Definition at line 229 of file cpicapfloortermpricesurface.hpp.
remember that the strikes use the quoting convention
remember that the strike uses the quoting convention
Implements CPICapFloorTermPriceSurface.
Definition at line 303 of file cpicapfloortermpricesurface.hpp.
remember that the strike uses the quoting convention
Implements CPICapFloorTermPriceSurface.
Definition at line 312 of file cpicapfloortermpricesurface.hpp.
remember that the strike uses the quoting convention
Implements CPICapFloorTermPriceSurface.
Definition at line 320 of file cpicapfloortermpricesurface.hpp.
required to allow for method hiding
Reimplemented from CPICapFloorTermPriceSurface.
Definition at line 94 of file cpicapfloortermpricesurface.cpp.
required to allow for method hiding
Implements CPICapFloorTermPriceSurface.
Reimplemented from CPICapFloorTermPriceSurface.
Definition at line 95 of file cpicapfloortermpricesurface.cpp.
Implements CPICapFloorTermPriceSurface.
Reimplemented from CPICapFloorTermPriceSurface.
Definition at line 96 of file cpicapfloortermpricesurface.cpp.
Implements CPICapFloorTermPriceSurface.
|
mutableprotected |
Definition at line 187 of file cpicapfloortermpricesurface.hpp.
|
mutableprotected |
Definition at line 188 of file cpicapfloortermpricesurface.hpp.
|
mutableprotected |
Definition at line 189 of file cpicapfloortermpricesurface.hpp.
|
protected |
Definition at line 189 of file cpicapfloortermpricesurface.hpp.
|
mutableprotected |
Definition at line 190 of file cpicapfloortermpricesurface.hpp.