Table of Contents

Class LocalVolTermStructure

Namespace
NanoQL.TermStructures
Assembly
NanoQL.dll

The local-volatility term structure: the base of the structures that give the local volatility at a time and an underlying level. Volatilities are on an annual basis.

public abstract class LocalVolTermStructure : VolatilityTermStructure
Inheritance
LocalVolTermStructure
Derived
Inherited Members
Extension Methods

Remarks

An extension point, as in QuantLib: the local-volatility structures derive from it.

Constructors

LocalVolTermStructure(Date, Calendar?, BusinessDayConvention, DayCounter, int?)

Initializes a new instance of the LocalVolTermStructure class at a reference date; with settlement days, for a structure a factory dates by the context.

protected LocalVolTermStructure(Date referenceDate, Calendar? calendar, BusinessDayConvention bdc, DayCounter dayCounter, int? settlementDays = null)

Parameters

referenceDate Date

The reference date.

calendar Calendar

The calendar, or null for QuantLib's empty one.

bdc BusinessDayConvention

The business-day convention of the option dates; QuantLib's default is Following.

dayCounter DayCounter

The day counter.

settlementDays int?

The settlement days the reference date was moved by, or null.

Exceptions

ArgumentNullException

dayCounter is null.

ArgumentException

The reference date is default(Date).

ArgumentOutOfRangeException

bdc isn't a member of its type.

Methods

LocalVol(Date, double, bool)

The local volatility at a date and underlying level.

public double LocalVol(Date d, double underlyingLevel, bool extrapolate = false)

Parameters

d Date

The date.

underlyingLevel double

The underlying level.

extrapolate bool

Whether to allow extrapolation.

Returns

double

The local volatility.

Exceptions

ArgumentException

d is default(Date).

NanoQLException

The date or level is out of range, or the structure can't compute it.

LocalVol(double, double, bool)

The local volatility at a time and underlying level.

public double LocalVol(double t, double underlyingLevel, bool extrapolate = false)

Parameters

t double

The time.

underlyingLevel double

The underlying level.

extrapolate bool

Whether to allow extrapolation.

Returns

double

The local volatility.

Exceptions

NanoQLException

The time or level is out of range, or the structure can't compute it.

LocalVolImpl(double, double)

The local volatility at a time and level, the range already checked; it must extrapolate.

protected abstract double LocalVolImpl(double t, double strike)

Parameters

t double

The time.

strike double

The underlying level.

Returns

double

The local volatility.