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
AtmAdjustedSmileSection Class Reference

#include <qle/termstructures/atmadjustedsmilesection.hpp>

+ Inheritance diagram for AtmAdjustedSmileSection:
+ Collaboration diagram for AtmAdjustedSmileSection:

Public Member Functions

 AtmAdjustedSmileSection (const QuantLib::ext::shared_ptr< QuantLib::SmileSection > &base, const QuantLib::Real baseAtmLevel, const QuantLib::Real targetAtmLevel)
 
QuantLib::Real minStrike () const override
 
QuantLib::Real maxStrike () const override
 
QuantLib::Real atmLevel () const override
 
const QuantLib::Date & exerciseDate () const override
 
QuantLib::VolatilityType volatilityType () const override
 
QuantLib::Rate shift () const override
 
const QuantLib::Date & referenceDate () const override
 
QuantLib::Time exerciseTime () const override
 
const QuantLib::DayCounter & dayCounter () const override
 

Private Member Functions

QuantLib::Volatility volatilityImpl (QuantLib::Rate strike) const override
 

Private Attributes

QuantLib::ext::shared_ptr< QuantLib::SmileSection > base_
 
QuantLib::Real baseAtmLevel_
 
QuantLib::Real targetAtmLevel_
 

Detailed Description

Definition at line 25 of file atmadjustedsmilesection.hpp.

Constructor & Destructor Documentation

◆ AtmAdjustedSmileSection()

AtmAdjustedSmileSection ( const QuantLib::ext::shared_ptr< QuantLib::SmileSection > &  base,
const QuantLib::Real  baseAtmLevel,
const QuantLib::Real  targetAtmLevel 
)

Definition at line 27 of file atmadjustedsmilesection.hpp.

29 : SmileSection(), base_(base), baseAtmLevel_(baseAtmLevel), targetAtmLevel_(targetAtmLevel) {}
QuantLib::ext::shared_ptr< QuantLib::SmileSection > base_

Member Function Documentation

◆ minStrike()

QuantLib::Real minStrike ( ) const
override

Definition at line 30 of file atmadjustedsmilesection.hpp.

30{ return base_->minStrike(); }

◆ maxStrike()

QuantLib::Real maxStrike ( ) const
override

Definition at line 31 of file atmadjustedsmilesection.hpp.

31{ return base_->maxStrike(); }

◆ atmLevel()

QuantLib::Real atmLevel ( ) const
override

Definition at line 32 of file atmadjustedsmilesection.hpp.

32{ return targetAtmLevel_; }

◆ exerciseDate()

const QuantLib::Date & exerciseDate ( ) const
override

Definition at line 33 of file atmadjustedsmilesection.hpp.

33{ return base_->exerciseDate(); }

◆ volatilityType()

QuantLib::VolatilityType volatilityType ( ) const
override

Definition at line 34 of file atmadjustedsmilesection.hpp.

34{ return base_->volatilityType(); }

◆ shift()

QuantLib::Rate shift ( ) const
override

Definition at line 35 of file atmadjustedsmilesection.hpp.

35{ return base_->shift(); }

◆ referenceDate()

const QuantLib::Date & referenceDate ( ) const
override

Definition at line 36 of file atmadjustedsmilesection.hpp.

36{ return base_->referenceDate(); }

◆ exerciseTime()

QuantLib::Time exerciseTime ( ) const
override

Definition at line 37 of file atmadjustedsmilesection.hpp.

37{ return base_->exerciseTime(); }

◆ dayCounter()

const QuantLib::DayCounter & dayCounter ( ) const
override

Definition at line 38 of file atmadjustedsmilesection.hpp.

38{ return base_->dayCounter(); }

◆ volatilityImpl()

QuantLib::Volatility volatilityImpl ( QuantLib::Rate  strike) const
overrideprivate

Definition at line 41 of file atmadjustedsmilesection.hpp.

41 {
42 if (strike == QuantLib::Null<QuantLib::Real>()) {
43 return base_->volatility(baseAtmLevel_);
44 }
45 // just a moneyness, but no vol adjustment, so this is only suitable for normal vols
46 return base_->volatility(strike + baseAtmLevel_ - targetAtmLevel_);
47 };

Member Data Documentation

◆ base_

QuantLib::ext::shared_ptr<QuantLib::SmileSection> base_
private

Definition at line 49 of file atmadjustedsmilesection.hpp.

◆ baseAtmLevel_

QuantLib::Real baseAtmLevel_
private

Definition at line 50 of file atmadjustedsmilesection.hpp.

◆ targetAtmLevel_

QuantLib::Real targetAtmLevel_
private

Definition at line 51 of file atmadjustedsmilesection.hpp.