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
referenceDateDateThe reference date.
calendarCalendarThe calendar, or null for QuantLib's empty one.
bdcBusinessDayConventionThe business-day convention of the option dates; QuantLib's default is
Following.dayCounterDayCounterThe day counter.
settlementDaysint?The settlement days the reference date was moved by, or null.
Exceptions
- ArgumentNullException
dayCounteris null.- ArgumentException
The reference date is
default(Date).- ArgumentOutOfRangeException
bdcisn'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
date1DateThe first date.
date2DateThe second date, after the first.
extrapolateboolWhether 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
time1doubleThe first time.
time2doubleThe second time, after the first.
extrapolateboolWhether 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
date1DateThe first date.
date2DateThe second date, after the first.
extrapolateboolWhether 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
time1doubleThe first time.
time2doubleThe second time, after the first.
extrapolateboolWhether 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").