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

Public Member Functions | Protected Member Functions | Protected Attributes

QuantLib::LocalVolTermStructure Class Reference

#include <localvoltermstructure.hpp>

Inheritance diagram for QuantLib::LocalVolTermStructure:
Inheritance graph
[legend]
Collaboration diagram for QuantLib::LocalVolTermStructure:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual BusinessDayConvention businessDayConvention () const
 the business day convention used in tenor to date conversion
virtual Rate maxStrike () const =0
 the maximum strike for which the term structure can return vols
virtual Rate minStrike () const =0
 the minimum strike for which the term structure can return vols
void notifyObservers ()
Date optionDateFromTenor (const Period &) const
 period/date conversion
void registerWith (const boost::shared_ptr< Observable > &)
void unregisterWith (const boost::shared_ptr< Observable > &)
Constructors

See the TermStructure documentation for issues regarding constructors.

 LocalVolTermStructure (const Calendar &cal=Calendar(), BusinessDayConvention bdc=Following, const DayCounter &dc=DayCounter())
 default constructor
 LocalVolTermStructure (const Date &referenceDate, const Calendar &cal=Calendar(), BusinessDayConvention bdc=Following, const DayCounter &dc=DayCounter())
 initialize with a fixed reference date
 LocalVolTermStructure (Natural settlementDays, const Calendar &, BusinessDayConvention bdc=Following, const DayCounter &dc=DayCounter())
 calculate the reference date based on the global evaluation date
Local Volatility
Volatility localVol (const Date &d, Real underlyingLevel, bool extrapolate=false) const
Volatility localVol (Time t, Real underlyingLevel, bool extrapolate=false) const
Visitability
virtual void accept (AcyclicVisitor &)
Dates and Time
virtual DayCounter dayCounter () const
 the day counter used for date/time conversion
Time timeFromReference (const Date &date) const
 date/time conversion
virtual Date maxDate () const =0
 the latest date for which the curve can return values
virtual Time maxTime () const
 the latest time for which the curve can return values
virtual const DatereferenceDate () const
 the date at which discount = 1.0 and/or variance = 0.0
virtual Calendar calendar () const
 the calendar used for reference and/or option date calculation
virtual Natural settlementDays () const
 the settlementDays used for reference date calculation
Observer interface
void update ()
modifiers
void enableExtrapolation (bool b=true)
 enable extrapolation in subsequent calls
void disableExtrapolation (bool b=true)
 disable extrapolation in subsequent calls
inspectors
bool allowsExtrapolation () const
 tells whether extrapolation is enabled

Protected Member Functions

void checkRange (const Date &d, bool extrapolate) const
 date-range check
void checkRange (Time t, bool extrapolate) const
 time-range check
void checkStrike (Rate strike, bool extrapolate) const
 strike-range check
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 Volatility localVolImpl (Time t, Real strike) const =0
 local vol calculation

Protected Attributes

Calendar calendar_
bool moving_

Detailed Description

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

Volatilities are assumed to be expressed on an annual basis.

Definition at line 38 of file localvoltermstructure.hpp.


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

Generated by  Doxygen 1.6.0   Back to index