Table of Contents

Class EquityFXVolSurface

Namespace
NanoQL.Experimental
Assembly
NanoQL.dll

The base of equity and FX volatility (smile) surfaces, with the at-the-money forward volatility and variance between two times. Volatilities are on an annual basis; only without a smile does the at-the-money forward volatility make sense.

[Experimental("NQL0001")]
public abstract class EquityFXVolSurface : BlackVolSurface
Inheritance
EquityFXVolSurface
Inherited Members
Extension Methods

Remarks

An extension point, as in QuantLib. QuantLib's acyclic visitor isn't ported.

Constructors

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

Initializes a new instance of the EquityFXVolSurface class at a reference date.

protected EquityFXVolSurface(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

AtmForwardVariance(Date, Date, bool)

The at-the-money forward variance between two dates.

public double AtmForwardVariance(Date date1, Date date2, bool extrapolate = false)

Parameters

date1 Date

The first date.

date2 Date

The second date, after the first.

extrapolate bool

Whether to allow extrapolation.

Returns

double

The forward variance.

Exceptions

ArgumentException

A date is default(Date).

NanoQLException

The dates aren't increasing ("wrong dates"), a date is out of range, or the variances aren't increasing.

AtmForwardVariance(double, double, bool)

The at-the-money forward variance between two times.

public double AtmForwardVariance(double time1, double time2, bool extrapolate = false)

Parameters

time1 double

The first time.

time2 double

The second time, after the first.

extrapolate bool

Whether to allow extrapolation.

Returns

double

The forward variance.

Exceptions

NanoQLException

The times aren't increasing ("wrong times"), a time is out of range, or the variances aren't increasing ("non-increasing variances").

AtmForwardVol(Date, Date, bool)

The at-the-money forward volatility between two dates.

public double AtmForwardVol(Date date1, Date date2, bool extrapolate = false)

Parameters

date1 Date

The first date.

date2 Date

The second date, after the first.

extrapolate bool

Whether to allow extrapolation.

Returns

double

The forward volatility.

Exceptions

ArgumentException

A date is default(Date).

NanoQLException

The dates aren't increasing ("wrong dates"), a date is out of range, or the variances aren't increasing.

AtmForwardVol(double, double, bool)

The at-the-money forward volatility between two times.

public double AtmForwardVol(double time1, double time2, bool extrapolate = false)

Parameters

time1 double

The first time.

time2 double

The second time, after the first.

extrapolate bool

Whether to allow extrapolation.

Returns

double

The forward volatility.

Exceptions

NanoQLException

The times aren't increasing ("wrong times"), a time is out of range, or the variances aren't increasing ("non-increasing variances").