#include <qle/termstructures/spreadedoptionletvolatility.hpp>
|
|
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 |
|
◆ SpreadedOptionletVolatility()
◆ 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}