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

#include <qle/termstructures/parametricvolatilitysmilesection.hpp>

+ Inheritance diagram for ParametricVolatilitySmileSection:
+ Collaboration diagram for ParametricVolatilitySmileSection:

Public Member Functions

 ParametricVolatilitySmileSection (const Real optionTime, const Real swapLength, const Real atmLevel, const boost::shared_ptr< ParametricVolatility > parametricVolatility, const ParametricVolatility::MarketQuoteType outputMarketQuoteType)
 
Real minStrike () const override
 
Real maxStrike () const override
 
Real atmLevel () const override
 

Private Member Functions

Volatility volatilityImpl (Rate strike) const override
 

Private Attributes

Real optionTime_
 
Real swapLength_
 
Real atmLevel_
 
boost::shared_ptr< ParametricVolatilityparametricVolatility_
 
ParametricVolatility::MarketQuoteType outputMarketQuoteType_
 
std::map< Real, Real > cache_
 

Detailed Description

Definition at line 34 of file parametricvolatilitysmilesection.hpp.

Constructor & Destructor Documentation

◆ ParametricVolatilitySmileSection()

ParametricVolatilitySmileSection ( const Real  optionTime,
const Real  swapLength,
const Real  atmLevel,
const boost::shared_ptr< ParametricVolatility parametricVolatility,
const ParametricVolatility::MarketQuoteType  outputMarketQuoteType 
)

Member Function Documentation

◆ minStrike()

Real minStrike ( ) const
override

Definition at line 39 of file parametricvolatilitysmilesection.hpp.

39{ return -QL_MAX_REAL; }

◆ maxStrike()

Real maxStrike ( ) const
override

Definition at line 40 of file parametricvolatilitysmilesection.hpp.

40{ return QL_MAX_REAL; }

◆ atmLevel()

Real atmLevel ( ) const
override

Definition at line 30 of file parametricvolatilitysmilesection.cpp.

30{ return atmLevel_; }

◆ volatilityImpl()

Real volatilityImpl ( Rate  strike) const
overrideprivate

Definition at line 32 of file parametricvolatilitysmilesection.cpp.

32 {
33 if (auto v = cache_.find(strike); v != cache_.end())
34 return v->second;
36 cache_[strike] = tmp;
37 return tmp;
38}

Member Data Documentation

◆ optionTime_

Real optionTime_
private

Definition at line 45 of file parametricvolatilitysmilesection.hpp.

◆ swapLength_

Real swapLength_
private

Definition at line 45 of file parametricvolatilitysmilesection.hpp.

◆ atmLevel_

Real atmLevel_
private

Definition at line 45 of file parametricvolatilitysmilesection.hpp.

◆ parametricVolatility_

boost::shared_ptr<ParametricVolatility> parametricVolatility_
private

Definition at line 46 of file parametricvolatilitysmilesection.hpp.

◆ outputMarketQuoteType_

ParametricVolatility::MarketQuoteType outputMarketQuoteType_
private

Definition at line 47 of file parametricvolatilitysmilesection.hpp.

◆ cache_

std::map<Real, Real> cache_
mutableprivate

Definition at line 48 of file parametricvolatilitysmilesection.hpp.