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

#include <qle/termstructures/spreadedoptionletvolatility.hpp>

+ Inheritance diagram for SpreadedOptionletVolatility:
+ Collaboration diagram for SpreadedOptionletVolatility:

Public Member Functions

 SpreadedOptionletVolatility (const Handle< OptionletVolatilityStructure > &baseVol, const Handle< Quote > &spread)
 

Protected Member Functions

OptionletVolatilityStructure interface
QuantLib::ext::shared_ptr< SmileSection > smileSectionImpl (const Date &d) const override
 
QuantLib::ext::shared_ptr< SmileSection > smileSectionImpl (Time optionT) const override
 
Volatility volatilityImpl (Time optionTime, Rate strike) const override
 

Detailed Description

Definition at line 39 of file spreadedoptionletvolatility.hpp.

Constructor & Destructor Documentation

◆ SpreadedOptionletVolatility()

SpreadedOptionletVolatility ( const Handle< OptionletVolatilityStructure > &  baseVol,
const Handle< Quote > &  spread 
)

Definition at line 24 of file spreadedoptionletvolatility.cpp.

26 : QuantLib::SpreadedOptionletVolatility(baseVol, spread) {}

Member Function Documentation

◆ smileSectionImpl() [1/2]

QuantLib::ext::shared_ptr< SmileSection > smileSectionImpl ( const Date &  d) const
overrideprotected

Definition at line 28 of file spreadedoptionletvolatility.cpp.

28 {
29 QuantLib::ext::shared_ptr<QuantLib::SpreadedSmileSection> section =
30 QuantLib::ext::dynamic_pointer_cast<QuantLib::SpreadedSmileSection>(
31 QuantLib::SpreadedOptionletVolatility::smileSectionImpl(d));
32
33 return QuantLib::ext::make_shared<SpreadedSmileSection>(section);
34}

◆ smileSectionImpl() [2/2]

QuantLib::ext::shared_ptr< SmileSection > smileSectionImpl ( Time  optionT) const
overrideprotected

Definition at line 36 of file spreadedoptionletvolatility.cpp.

36 {
37 QuantLib::ext::shared_ptr<QuantLib::SpreadedSmileSection> section =
38 QuantLib::ext::dynamic_pointer_cast<QuantLib::SpreadedSmileSection>(
39 QuantLib::SpreadedOptionletVolatility::smileSectionImpl(optionTime));
40
41 return QuantLib::ext::make_shared<SpreadedSmileSection>(section);
42}

◆ volatilityImpl()

Volatility volatilityImpl ( Time  optionTime,
Rate  strike 
) const
overrideprotected

Definition at line 44 of file spreadedoptionletvolatility.cpp.

44 {
45 Volatility spreadedVol = QuantLib::SpreadedOptionletVolatility::volatilityImpl(t, s);
46 return std::max(spreadedVol, 0.0);
47}