Logo Search packages:      
Sourcecode: quantlib version File versions  Download package

QuantLib::BlackVolTermStructure Class Reference

#include <voltermstructure.hpp>

Inheritance diagram for QuantLib::BlackVolTermStructure:

QuantLib::TermStructure QuantLib::Extrapolator QuantLib::Observer QuantLib::Observable QuantLib::BlackVarianceTermStructure QuantLib::BlackVolatilityTermStructure QuantLib::BlackVarianceCurve QuantLib::BlackVarianceSurface QuantLib::ImpliedVolTermStructure QuantLib::BlackConstantVol

List of all members.


Detailed Description

Black-volatility term structure.

This abstract class defines the interface of concrete Black-volatility term structures which will be derived from this one.

Volatilities are assumed to be expressed on an annual basis.

Definition at line 43 of file voltermstructure.hpp.


Public Member Functions

void notifyObservers ()
template<class T>
void registerWith (const boost::shared_ptr< T > &h)
template<class T>
void unregisterWith (const boost::shared_ptr< T > &h)
Visitability
virtual void accept (AcyclicVisitor &)
inspectors
bool allowsExtrapolation () const
 tells whether extrapolation is enabled
Black Volatility
Real blackForwardVariance (Time time1, Time time2, Real strike, bool extrapolate=false) const
 future (a.k.a. forward) variance
Real blackForwardVariance (const Date &date1, const Date &date2, Real strike, bool extrapolate=false) const
 future (a.k.a. forward) variance
Volatility blackForwardVol (Time time1, Time time2, Real strike, bool extrapolate=false) const
 future (a.k.a. forward) volatility
Volatility blackForwardVol (const Date &date1, const Date &date2, Real strike, bool extrapolate=false) const
 future (a.k.a. forward) volatility
Real blackVariance (Time maturity, Real strike, bool extrapolate=false) const
 present (a.k.a spot) variance
Real blackVariance (const Date &maturity, Real strike, bool extrapolate=false) const
 present (a.k.a spot) variance
Volatility blackVol (Time maturity, Real strike, bool extrapolate=false) const
 present (a.k.a spot) volatility
Volatility blackVol (const Date &maturity, Real strike, bool extrapolate=false) const
 present (a.k.a spot) volatility
Constructors
See the TermStructure documentation for issues regarding constructors.

 BlackVolTermStructure (Integer settlementDays, const Calendar &)
 calculate the reference date based on the global evaluation date
 BlackVolTermStructure (const Date &referenceDate)
 initialize with a fixed reference date
 BlackVolTermStructure ()
 default constructor
Dates
virtual Calendar calendar () const
 the calendar used for reference date calculation
virtual DayCounter dayCounter () const =0
 the day counter used for date/time conversion
virtual const DatereferenceDate () const
 the reference date, i.e., the date at which discount = 1
modifiers
void disableExtrapolation ()
 disable extrapolation in subsequent calls
void enableExtrapolation ()
 enable extrapolation in subsequent calls
Limits
virtual Date maxDate () const =0
 the latest date for which the term structure can return vols
virtual Real maxStrike () const =0
 the maximum strike for which the term structure can return vols
Time maxTime () const
 the latest time for which the term structure can return vols
virtual Real minStrike () const =0
 the minimum strike for which the term structure can return vols
Observer interface
void update ()

Protected Member Functions

Time timeFromReference (const Date &date) const
 date/time conversion
Calculations
These methods must be implemented in derived classes to perform the actual volatility calculations. When they are called, range check has already been performed; therefore, they must assume that extrapolation is required.

virtual Real blackVarianceImpl (Time t, Real strike) const =0
 Black variance calculation.
virtual Volatility blackVolImpl (Time t, Real strike) const =0
 Black volatility calculation.

Private Member Functions

void checkRange (Time, Real strike, bool extrapolate) const

Static Private Attributes

static const Time dT = 1.0/365.0

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index