QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
|
#include <ql/experimental/credit/basecorrelationstructure.hpp>
Public Member Functions | |
BaseCorrelationTermStructure (Natural settlementDays, const Calendar &cal, BusinessDayConvention bdc, const std::vector< Period > &tenors, const std::vector< Real > &lossLevel, const std::vector< std::vector< Handle< Quote > > > &correls, const DayCounter &dc=DayCounter()) | |
Size | correlationSize () const override |
The size of the squared correlation. More... | |
Real | ImplicitCorrelation (Real, Real) |
Implicit correlation for the given loss interval. More... | |
void | checkTrancheTenors () const |
void | checkLosses () const |
void | initializeTrancheTimes () const |
void | checkInputs (Size volRows, Size volsColumns) const |
void | registerWithMarketData () |
void | update () override |
void | updateMatrix () const |
Date | maxDate () const override |
the latest date for which the curve can return values More... | |
Real | correlation (const Date &d, Real lossLevel, bool extrapolate=false) const |
Real | correlation (Time t, Real lossLevel, bool extrapolate=false) const |
Public Member Functions inherited from CorrelationTermStructure | |
CorrelationTermStructure (const Calendar &cal, BusinessDayConvention bdc, const DayCounter &dc=DayCounter()) | |
default constructor More... | |
CorrelationTermStructure (const Date &referenceDate, const Calendar &cal, BusinessDayConvention bdc, const DayCounter &dc=DayCounter()) | |
initialize with a fixed reference date More... | |
CorrelationTermStructure (Natural settlementDays, const Calendar &cal, BusinessDayConvention bdc, const DayCounter &dc=DayCounter()) | |
calculate the reference date based on the global evaluation date More... | |
BusinessDayConvention | businessDayConvention () const |
Date | dateFromTenor (const Period &) const |
period/date conversion More... | |
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... | |
Private Member Functions | |
virtual void | setupInterpolation () |
void | setupInterpolation () |
void | setupInterpolation () |
Private Attributes | |
std::vector< std::vector< Handle< Quote > > > | correlHandles_ |
Matrix | correlations_ |
Interpolation2D | interpolation_ |
Size | nTrancheTenors_ |
Size | nLosses_ |
std::vector< Period > | tenors_ |
std::vector< Real > | lossLevel_ |
std::vector< Date > | trancheDates_ |
std::vector< Time > | trancheTimes_ |
Additional Inherited Members | |
Public Types inherited from Observer | |
typedef set_type::iterator | iterator |
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 TermStructure | |
bool | moving_ = false |
bool | updated_ = true |
Calendar | calendar_ |
Matrix based Base Correlation Term Structure
Definition at line 51 of file basecorrelationstructure.hpp.
BaseCorrelationTermStructure | ( | Natural | settlementDays, |
const Calendar & | cal, | ||
BusinessDayConvention | bdc, | ||
const std::vector< Period > & | tenors, | ||
const std::vector< Real > & | lossLevel, | ||
const std::vector< std::vector< Handle< Quote > > > & | correls, | ||
const DayCounter & | dc = DayCounter() |
||
) |
Definition at line 60 of file basecorrelationstructure.hpp.
|
privatevirtual |
|
overridevirtual |
The size of the squared correlation.
Implements CorrelationTermStructure.
Definition at line 93 of file basecorrelationstructure.hpp.
void checkTrancheTenors |
Definition at line 131 of file basecorrelationstructure.hpp.
void checkLosses |
Definition at line 143 of file basecorrelationstructure.hpp.
void initializeTrancheTimes |
Definition at line 160 of file basecorrelationstructure.hpp.
Definition at line 166 of file basecorrelationstructure.hpp.
void registerWithMarketData |
Definition at line 179 of file basecorrelationstructure.hpp.
|
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.
Definition at line 187 of file basecorrelationstructure.hpp.
void updateMatrix |
Definition at line 193 of file basecorrelationstructure.hpp.
|
overridevirtual |
the latest date for which the curve can return values
Implements TermStructure.
Definition at line 107 of file basecorrelationstructure.hpp.
Definition at line 108 of file basecorrelationstructure.hpp.
Definition at line 111 of file basecorrelationstructure.hpp.
|
private |
Definition at line 30 of file basecorrelationstructure.cpp.
|
private |
Definition at line 42 of file basecorrelationstructure.cpp.
Definition at line 117 of file basecorrelationstructure.hpp.
|
mutableprivate |
Definition at line 118 of file basecorrelationstructure.hpp.
|
private |
Definition at line 119 of file basecorrelationstructure.hpp.
|
private |
Definition at line 120 of file basecorrelationstructure.hpp.
|
private |
Definition at line 121 of file basecorrelationstructure.hpp.
|
private |
Definition at line 122 of file basecorrelationstructure.hpp.
|
mutableprivate |
Definition at line 123 of file basecorrelationstructure.hpp.
|
mutableprivate |
Definition at line 124 of file basecorrelationstructure.hpp.
|
mutableprivate |
Definition at line 125 of file basecorrelationstructure.hpp.