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

Wrapper class that extracts a value at a given time from the term structure. More...

#include <qle/termstructures/correlationtermstructure.hpp>

+ Inheritance diagram for CorrelationValue:
+ Collaboration diagram for CorrelationValue:

Public Member Functions

 CorrelationValue (const Handle< CorrelationTermStructure > &correlation, const Time t, const Real strike=Null< Real >())
 
Real value () const override
 
bool isValid () const override
 
void update () override
 

Private Attributes

Handle< CorrelationTermStructurecorrelation_
 
const Time t_
 
const Real strike_
 

Detailed Description

Wrapper class that extracts a value at a given time from the term structure.

Definition at line 87 of file correlationtermstructure.hpp.

Constructor & Destructor Documentation

◆ CorrelationValue()

CorrelationValue ( const Handle< CorrelationTermStructure > &  correlation,
const Time  t,
const Real  strike = Null<Real>() 
)

Definition at line 70 of file correlationtermstructure.cpp.

71 : correlation_(correlation), t_(t), strike_(strike) {
72 registerWith(correlation_);
73}
Handle< CorrelationTermStructure > correlation_

Member Function Documentation

◆ value()

Real value ( ) const
override

Definition at line 75 of file correlationtermstructure.cpp.

75 {
76 QL_REQUIRE(!correlation_.empty(), "no source correlation term structure given");
77 return correlation_->correlation(t_, strike_);
78}

◆ isValid()

bool isValid ( ) const
override

Definition at line 80 of file correlationtermstructure.cpp.

80{ return !correlation_.empty(); }

◆ update()

void update ( )
override

Definition at line 82 of file correlationtermstructure.cpp.

82{ notifyObservers(); }

Member Data Documentation

◆ correlation_

Handle<CorrelationTermStructure> correlation_
private

Definition at line 96 of file correlationtermstructure.hpp.

◆ t_

const Time t_
private

Definition at line 97 of file correlationtermstructure.hpp.

◆ strike_

const Real strike_
private

Definition at line 98 of file correlationtermstructure.hpp.