Table of Contents

Class ConstantCapFloorTermVolatility

Namespace
NanoQL.TermStructures
Assembly
NanoQL.dll

A constant cap and floor term volatility, for every length and strike.

public sealed class ConstantCapFloorTermVolatility : CapFloorTermVolatilityStructure
Inheritance
ConstantCapFloorTermVolatility
Inherited Members
Extension Methods

Remarks

QuantLib's four constructors collapse into two: its quote overloads are the double ones, and the settlement-days form, whose reference date moves with the evaluation date, is Create(int, Calendar, BusinessDayConvention, double, DayCounter, EvaluationContext).

Constructors

ConstantCapFloorTermVolatility(Date, Calendar?, BusinessDayConvention, double, DayCounter)

Initializes a new instance of the ConstantCapFloorTermVolatility class with a fixed reference date.

public ConstantCapFloorTermVolatility(Date referenceDate, Calendar? cal, BusinessDayConvention bdc, double volatility, DayCounter dc)

Parameters

referenceDate Date

The reference date.

cal Calendar

The calendar of the option dates, or null, QuantLib's empty calendar, with which option dates can't be computed from lengths.

bdc BusinessDayConvention

The convention adjusting option dates computed from lengths.

volatility double

The volatility.

dc DayCounter

The day counter.

Exceptions

ArgumentNullException

dc is null.

ArgumentOutOfRangeException

bdc isn't a member of its type.

Properties

MaxDate

Gets the latest date for which the curve can return values.

public override Date MaxDate { get; }

Property Value

Date

Methods

Create(int, Calendar, BusinessDayConvention, double, DayCounter, EvaluationContext)

A constant volatility whose reference date is the given number of business days after the evaluation date.

public static ConstantCapFloorTermVolatility Create(int settlementDays, Calendar cal, BusinessDayConvention bdc, double volatility, DayCounter dc, EvaluationContext context)

Parameters

settlementDays int

The business days from the evaluation date to the reference date.

cal Calendar

The calendar of the business days and of the option dates.

bdc BusinessDayConvention

The convention adjusting option dates computed from lengths.

volatility double

The volatility.

dc DayCounter

The day counter.

context EvaluationContext

The evaluation context.

Returns

ConstantCapFloorTermVolatility

The structure, with a fixed reference date.

Exceptions

ArgumentNullException

cal, dc or context is null.

ArgumentOutOfRangeException

settlementDays is negative, or bdc isn't a member of its type.

MaxStrike()

The maximum strike for which the structure returns values.

public override double MaxStrike()

Returns

double

The strike.

MinStrike()

The minimum strike for which the structure returns values.

public override double MinStrike()

Returns

double

The strike.

VolatilityImpl(double, double)

The volatility calculation, after the range and strike checks.

protected override double VolatilityImpl(double length, double strike)

Parameters

length double

The time, from the reference date.

strike double

The strike.

Returns

double

The volatility.