Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
List of all members
FlatCorrelation Class Reference

Flat correlation structure. More...

#include <qle/termstructures/flatcorrelation.hpp>

+ Inheritance diagram for FlatCorrelation:
+ Collaboration diagram for FlatCorrelation:

Public Member Functions

Constructors
 FlatCorrelation (const Date &referenceDate, const Handle< Quote > &correlation, const DayCounter &)
 
 FlatCorrelation (const Date &referenceDate, Real correlation, const DayCounter &)
 
 FlatCorrelation (Natural settlementDays, const Calendar &calendar, const Handle< Quote > &correlation, const DayCounter &)
 
 FlatCorrelation (Natural settlementDays, const Calendar &calendar, Real correlation, const DayCounter &)
 
TermStructure interface
Date maxDate () const override
 
Time maxTime () const override
 
Inspectors
const Handle< Quote > & quote () const
 
- Public Member Functions inherited from CorrelationTermStructure
 CorrelationTermStructure (const DayCounter &dc=DayCounter())
 
 CorrelationTermStructure (const Date &referenceDate, const Calendar &cal=Calendar(), const DayCounter &dc=DayCounter())
 
 CorrelationTermStructure (Natural settlementDays, const Calendar &cal, const DayCounter &dc=DayCounter())
 
Real correlation (Time t, Real strike=Null< Real >(), bool extrapolate=false) const
 
Real correlation (const Date &d, Real strike=Null< Real >(), bool extrapolate=false) const
 
virtual Time minTime () const
 The minimum time for which the curve can return values. More...
 

CorrelationTermStructure interface

Handle< Quote > correlation_
 
Real correlationImpl (Time, Real) const override
 Correlation calculation. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CorrelationTermStructure
virtual void checkRange (Time t, Real strike, bool extrapolate) const
 Extra time range check for minimum time, then calls TermStructure::checkRange. More...
 

Detailed Description

Flat correlation structure.

Definition at line 37 of file flatcorrelation.hpp.

Constructor & Destructor Documentation

◆ FlatCorrelation() [1/4]

FlatCorrelation ( const Date &  referenceDate,
const Handle< Quote > &  correlation,
const DayCounter &  dayCounter 
)

Definition at line 26 of file flatcorrelation.cpp.

28 : CorrelationTermStructure(referenceDate, NullCalendar(), dayCounter), correlation_(correlation) {
29 registerWith(correlation_);
30}
Real correlation(Time t, Real strike=Null< Real >(), bool extrapolate=false) const
CorrelationTermStructure(const DayCounter &dc=DayCounter())

◆ FlatCorrelation() [2/4]

FlatCorrelation ( const Date &  referenceDate,
Real  correlation,
const DayCounter &  dayCounter 
)

Definition at line 32 of file flatcorrelation.cpp.

33 : CorrelationTermStructure(referenceDate, NullCalendar(), dayCounter),
34 correlation_(QuantLib::ext::shared_ptr<Quote>(new SimpleQuote(correlation))) {}

◆ FlatCorrelation() [3/4]

FlatCorrelation ( Natural  settlementDays,
const Calendar &  calendar,
const Handle< Quote > &  correlation,
const DayCounter &  dayCounter 
)

Definition at line 36 of file flatcorrelation.cpp.

38 : CorrelationTermStructure(settlementDays, calendar, dayCounter), correlation_(correlation) {
39 registerWith(correlation_);
40}

◆ FlatCorrelation() [4/4]

FlatCorrelation ( Natural  settlementDays,
const Calendar &  calendar,
Real  correlation,
const DayCounter &  dayCounter 
)

Definition at line 42 of file flatcorrelation.cpp.

44 : CorrelationTermStructure(settlementDays, calendar, dayCounter),
45 correlation_(QuantLib::ext::shared_ptr<Quote>(new SimpleQuote(correlation))) {}

Member Function Documentation

◆ maxDate()

Date maxDate ( ) const
override

Definition at line 49 of file flatcorrelation.hpp.

49{ return Date::maxDate(); }

◆ maxTime()

Time maxTime ( ) const
override

Definition at line 50 of file flatcorrelation.hpp.

50{ return QL_MAX_REAL; }

◆ quote()

const Handle< Quote > & quote ( ) const

Definition at line 54 of file flatcorrelation.hpp.

54{ return correlation_; }

◆ correlationImpl()

Real correlationImpl ( Time  t,
Real  strike 
) const
overrideprivatevirtual

Correlation calculation.

Implements CorrelationTermStructure.

Definition at line 60 of file flatcorrelation.hpp.

60{ return correlation_->value(); }

Member Data Documentation

◆ correlation_

Handle<Quote> correlation_
private

Definition at line 63 of file flatcorrelation.hpp.