23#ifndef quantext_correlation_term_structure_hpp
24#define quantext_correlation_term_structure_hpp
26#include <ql/math/comparison.hpp>
27#include <ql/quote.hpp>
28#include <ql/termstructure.hpp>
45 const DayCounter& dc = DayCounter());
51 Real
correlation(Time t, Real strike = Null<Real>(),
bool extrapolate =
false)
const;
52 Real
correlation(
const Date& d, Real strike = Null<Real>(),
bool extrapolate =
false)
const;
69 virtual void checkRange(Time t, Real strike,
bool extrapolate)
const;
76 Date
maxDate()
const override {
return c_->maxDate(); }
78 Calendar
calendar()
const override {
return c_->calendar(); }
83 Handle<CorrelationTermStructure>
c_;
89 CorrelationValue(
const Handle<CorrelationTermStructure>& correlation,
const Time t,
90 const Real strike = Null<Real>());
91 Real
value()
const override;
Correlation term structure.
virtual Time minTime() const
The minimum time for which the curve can return values.
virtual Real correlationImpl(Time t, Real strike) const =0
Correlation calculation.
Real correlation(Time t, Real strike=Null< Real >(), bool extrapolate=false) const
virtual void checkRange(Time t, Real strike, bool extrapolate) const
Extra time range check for minimum time, then calls TermStructure::checkRange.
Wrapper class that extracts a value at a given time from the term structure.
Real value() const override
Handle< CorrelationTermStructure > correlation_
bool isValid() const override
Wrapper class that inverts the correlation.
virtual Real correlationImpl(Time t, Real strike) const override
Correlation calculation.
Calendar calendar() const override
const Date & referenceDate() const override
Natural settlementDays() const override
Date maxDate() const override
Handle< CorrelationTermStructure > c_