Spreaded Correlation Curve.
More...
#include <qle/termstructures/spreadedcorrelationcurve.hpp>
|
| SpreadedCorrelationCurve (const Handle< CorrelationTermStructure > &referenceCorrelation, const std::vector< Time > ×, const std::vector< Handle< Quote > > &corrSpreads, const bool useAtmReferenceVolsOnly=false) |
|
Date | maxDate () const override |
|
const Date & | referenceDate () const override |
|
Calendar | calendar () const override |
|
Natural | settlementDays () const override |
|
Time | minTime () const override |
| The minimum time for which the curve can return values. More...
|
|
void | update () override |
|
| 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 void | checkRange (Time t, Real strike, bool extrapolate) const |
| Extra time range check for minimum time, then calls TermStructure::checkRange. More...
|
|
Spreaded Correlation Curve.
Definition at line 34 of file spreadedcorrelationcurve.hpp.
◆ SpreadedCorrelationCurve()
- times should be consistent with reference ts day counter
- if useAtmReferenceCorrsOnly, only corrs with strike Null<Real>() are read from the referenceVol, otherwise the full reference vol surface (if it is one) is used
Definition at line 26 of file spreadedcorrelationcurve.cpp.
32 QL_REQUIRE(!
times_.empty(),
"SpreadedCorrelationCurve: times are empty");
34 "SpreadedCorrelationCurve: size of times and quote vectors do not match");
35 if (times.size() == 1) {
38 }
41 registerWith(q);
43 QuantLib::ext::make_shared<LinearInterpolation>(
times_.begin(),
times_.end(),
data_.begin()));
46}
CorrelationTermStructure(const DayCounter &dc=DayCounter())
std::vector< Time > times_
bool useAtmReferenceCorrsOnly_
QuantLib::ext::shared_ptr< Interpolation > interpolation_
Handle< CorrelationTermStructure > referenceCorrelation_
std::vector< Real > data_
std::vector< Handle< Quote > > corrSpreads_
◆ maxDate()
◆ referenceDate()
const Date & referenceDate |
( |
| ) |
const |
|
override |
◆ calendar()
Calendar calendar |
( |
| ) |
const |
|
override |
◆ settlementDays()
Natural settlementDays |
( |
| ) |
const |
|
override |
◆ minTime()
◆ update()
◆ correlationImpl()
Real correlationImpl |
( |
Time |
t, |
|
|
Real |
strike |
|
) |
| const |
|
overrideprivatevirtual |
◆ performCalculations()
void performCalculations |
( |
| ) |
const |
|
overrideprivate |
◆ referenceCorrelation_
◆ times_
◆ corrSpreads_
std::vector<Handle<Quote> > corrSpreads_ |
|
private |
◆ useAtmReferenceCorrsOnly_
bool useAtmReferenceCorrsOnly_ |
|
private |
◆ data_
◆ interpolation_
QuantLib::ext::shared_ptr<Interpolation> interpolation_ |
|
private |