Wrapper class for a BlackVolTermStructure that easily exposes ATM vols. More...
#include <qle/termstructures/blackvolsurfacewithatm.hpp>
Public Member Functions | |
BlackVolatilityWithATM (const boost::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) | |
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 | |
boost::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.