Spreaded Black volatility curve modeled as variance curve.
More...
#include <qle/termstructures/spreadedblackvolatilitycurve.hpp>
Spreaded Black volatility curve modeled as variance curve.
Definition at line 35 of file spreadedblackvolatilitycurve.hpp.
◆ SpreadedBlackVolatilityCurve()
- times should be consistent with reference ts day counter
- if useAtmReferenceVolsOnly, only vols with strike Null<Real>() are read from the referenceVol, otherwise the full reference vol surface (if it is one) is used
Definition at line 25 of file spreadedblackvolatilitycurve.cpp.
29 : BlackVolatilityTermStructure(referenceVol->businessDayConvention(), referenceVol->dayCounter()),
33 QL_REQUIRE(
times_.size() >= 2,
"at least two times required");
34 QL_REQUIRE(
times_.size() ==
volSpreads_.size(),
"size of time and quote vectors do not match");
38 QuantLib::ext::make_shared<LinearInterpolation>(
times_.begin(),
times_.end(),
data_.begin()));
40}
Handle< BlackVolTermStructure > referenceVol_
std::vector< Time > times_
bool useAtmReferenceVolsOnly_
QuantLib::ext::shared_ptr< Interpolation > interpolation_
std::vector< Handle< Quote > > volSpreads_
std::vector< Real > data_
◆ maxDate()
◆ referenceDate()
const Date & referenceDate |
( |
| ) |
const |
|
override |
◆ calendar()
Calendar calendar |
( |
| ) |
const |
|
override |
◆ settlementDays()
Natural settlementDays |
( |
| ) |
const |
|
override |
◆ minStrike()
◆ maxStrike()
◆ update()
◆ performCalculations()
void performCalculations |
( |
| ) |
const |
|
overrideprivate |
◆ blackVolImpl()
Real blackVolImpl |
( |
Time |
t, |
|
|
Real |
k |
|
) |
| const |
|
overrideprivate |
◆ referenceVol_
◆ times_
◆ volSpreads_
std::vector<Handle<Quote> > volSpreads_ |
|
private |
◆ useAtmReferenceVolsOnly_
bool useAtmReferenceVolsOnly_ |
|
private |
◆ data_
◆ interpolation_
QuantLib::ext::shared_ptr<Interpolation> interpolation_ |
|
private |