23 const QuantLib::ext::shared_ptr<OptionletVolatilityStructure>& source, Natural settlementDays,
const Calendar& calendar,
25 : OptionletVolatilityStructure(settlementDays, calendar, source->businessDayConvention(), source->dayCounter()),
26 source_(source), decayMode_(decayMode), originalReferenceDate_(source->referenceDate()),
27 volatilityType_(source->volatilityType()), displacement_(source->displacement()) {
29 "ForwardVariance not yet supported for DynamicOptionletVolatilityStructure");
30 enableExtrapolation(source->allowsExtrapolation());
43 return Date(std::min(Date::maxDate().serialNumber(), referenceDate().serialNumber() -
45 source_->maxDate().serialNumber()));
48 QL_FAIL(
"unexpected decay mode (" <<
decayMode_ <<
")");
54 return source_->smileSection(optionTime);
58 return source_->volatility(optionTime, strike);
const QuantLib::ext::shared_ptr< OptionletVolatilityStructure > source_
Rate maxStrike() const override
Rate minStrike() const override
Volatility volatilityImpl(Time optionTime, Rate strike) const override
DynamicOptionletVolatilityStructure(const QuantLib::ext::shared_ptr< OptionletVolatilityStructure > &source, Natural settlementDays, const Calendar &calendar, ReactionToTimeDecay decayMode=ConstantVariance)
ReactionToTimeDecay decayMode_
Date maxDate() const override
const Date originalReferenceDate_
QuantLib::ext::shared_ptr< SmileSection > smileSectionImpl(Time optionTime) const override
dynamic optionlet volatility structure
ReactionToTimeDecay
Reaction to Time Decay.