Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
NegativeCorrelationTermStructure Class Reference

Wrapper class that inverts the correlation. More...

#include <qle/termstructures/correlationtermstructure.hpp>

+ Inheritance diagram for NegativeCorrelationTermStructure:
+ Collaboration diagram for NegativeCorrelationTermStructure:

Public Member Functions

 NegativeCorrelationTermStructure (const Handle< CorrelationTermStructure > &c)
 
Date maxDate () const override
 
const Date & referenceDate () const override
 
Calendar calendar () const override
 
Natural settlementDays () const override
 
- 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...
 

Private Member Functions

virtual Real correlationImpl (Time t, Real strike) const override
 Correlation calculation. More...
 

Private Attributes

Handle< CorrelationTermStructurec_
 

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

Wrapper class that inverts the correlation.

Definition at line 73 of file correlationtermstructure.hpp.

Constructor & Destructor Documentation

◆ NegativeCorrelationTermStructure()

Definition at line 61 of file correlationtermstructure.cpp.

62 : CorrelationTermStructure(c->dayCounter()), c_(c) {
63 registerWith(c_);
64}
CorrelationTermStructure(const DayCounter &dc=DayCounter())

Member Function Documentation

◆ maxDate()

Date maxDate ( ) const
override

Definition at line 76 of file correlationtermstructure.hpp.

76{ return c_->maxDate(); }

◆ referenceDate()

const Date & referenceDate ( ) const
override

Definition at line 77 of file correlationtermstructure.hpp.

77{ return c_->referenceDate(); }

◆ calendar()

Calendar calendar ( ) const
override

Definition at line 78 of file correlationtermstructure.hpp.

78{ return c_->calendar(); }

◆ settlementDays()

Natural settlementDays ( ) const
override

Definition at line 79 of file correlationtermstructure.hpp.

79{ return c_->settlementDays(); }

◆ correlationImpl()

Real correlationImpl ( Time  t,
Real  strike 
) const
overrideprivatevirtual

Correlation calculation.

Implements CorrelationTermStructure.

Definition at line 66 of file correlationtermstructure.cpp.

66 {
67 return -c_->correlation(t, strike);
68}

Member Data Documentation

◆ c_

Handle<CorrelationTermStructure> c_
private

Definition at line 83 of file correlationtermstructure.hpp.