Wrapper class for a BlackVolTermStructure that easily exposes ATM vols. More...
#include <qle/termstructures/blackvolsurfacewithatm.hpp>
Public Member Functions | |
BlackVolatilityWithATM (const QuantLib::ext::shared_ptr< BlackVolTermStructure > &surface, const Handle< Quote > &spot, const Handle< YieldTermStructure > &yield1=Handle< YieldTermStructure >(), const Handle< YieldTermStructure > &yield2=Handle< YieldTermStructure >()) | |
Constructor. This is a floating term structure (settlement days is zero) More... | |
TermStructure interface | |
DayCounter | dayCounter () const override |
Date | maxDate () const override |
Time | maxTime () const override |
const Date & | referenceDate () const override |
Calendar | calendar () const override |
Natural | settlementDays () const override |
VolatilityTermStructure interface | |
Rate | minStrike () const override |
Rate | maxStrike () const override |
Inspectors | |
QuantLib::ext::shared_ptr< BlackVolTermStructure > | surface_ |
Handle< Quote > | spot_ |
Handle< YieldTermStructure > | yield1_ |
Handle< YieldTermStructure > | yield2_ |
QuantLib::ext::shared_ptr< BlackVolTermStructure > | surface () const |
Handle< Quote > | spot () const |
Handle< YieldTermStructure > | yield1 () const |
Handle< YieldTermStructure > | yield2 () const |
Volatility | blackVolImpl (Time t, Real strike) const override |
Wrapper class for a BlackVolTermStructure that easily exposes ATM vols.
This class implements BlackVolatilityTermStructure and takes a surface (well, any BlackVolTermStructure) as an input. If asked for a volatility with strike=Null<Real>() or 0 it will calculate the forward value and use this as the strike, this makes it easy to access ATMF values.
The forward value is calculated using the input spot and yield curves, so can be used for both FX and Equity vols.
For FX markets, one should set the spot to be the FX spot rate, yield1 to be the base discount curve and yield2 to be the reference discount curve (e.g. EURUSD, yield1 = EUR).
For Equity markets, one should set the spot to be the equity price, yield1 to be the discount curve and yield2 to be the dividend curve.
Definition at line 50 of file blackvolsurfacewithatm.hpp.
BlackVolatilityWithATM | ( | const QuantLib::ext::shared_ptr< BlackVolTermStructure > & | surface, |
const Handle< Quote > & | spot, | ||
const Handle< YieldTermStructure > & | yield1 = Handle<YieldTermStructure>() , |
||
const Handle< YieldTermStructure > & | yield2 = Handle<YieldTermStructure>() |
||
) |
Constructor. This is a floating term structure (settlement days is zero)
Definition at line 23 of file blackvolsurfacewithatm.cpp.
|
override |
Definition at line 59 of file blackvolsurfacewithatm.hpp.
|
override |
Definition at line 60 of file blackvolsurfacewithatm.hpp.
|
override |
Definition at line 61 of file blackvolsurfacewithatm.hpp.
|
override |
Definition at line 62 of file blackvolsurfacewithatm.hpp.
|
override |
Definition at line 63 of file blackvolsurfacewithatm.hpp.
|
override |
Definition at line 64 of file blackvolsurfacewithatm.hpp.
|
override |
Definition at line 69 of file blackvolsurfacewithatm.hpp.
|
override |
Definition at line 70 of file blackvolsurfacewithatm.hpp.
QuantLib::ext::shared_ptr< BlackVolTermStructure > surface | ( | ) | const |
Definition at line 75 of file blackvolsurfacewithatm.hpp.
Handle< Quote > spot | ( | ) | const |
Definition at line 76 of file blackvolsurfacewithatm.hpp.
Handle< YieldTermStructure > yield1 | ( | ) | const |
Definition at line 77 of file blackvolsurfacewithatm.hpp.
Handle< YieldTermStructure > yield2 | ( | ) | const |
Definition at line 78 of file blackvolsurfacewithatm.hpp.
|
overrideprotected |
Definition at line 40 of file blackvolsurfacewithatm.cpp.
|
private |
Definition at line 86 of file blackvolsurfacewithatm.hpp.
|
private |
Definition at line 87 of file blackvolsurfacewithatm.hpp.
|
private |
Definition at line 88 of file blackvolsurfacewithatm.hpp.
|
private |
Definition at line 88 of file blackvolsurfacewithatm.hpp.