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
referenceDateDateThe reference date.
calCalendarThe calendar of the option dates, or null, QuantLib's empty calendar, with which option dates can't be computed from lengths.
bdcBusinessDayConventionThe convention adjusting option dates computed from lengths.
volatilitydoubleThe volatility.
dcDayCounterThe day counter.
Exceptions
- ArgumentNullException
dcis null.- ArgumentOutOfRangeException
bdcisn'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
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
settlementDaysintThe business days from the evaluation date to the reference date.
calCalendarThe calendar of the business days and of the option dates.
bdcBusinessDayConventionThe convention adjusting option dates computed from lengths.
volatilitydoubleThe volatility.
dcDayCounterThe day counter.
contextEvaluationContextThe evaluation context.
Returns
- ConstantCapFloorTermVolatility
The structure, with a fixed reference date.
Exceptions
- ArgumentNullException
cal,dcorcontextis null.- ArgumentOutOfRangeException
settlementDaysis negative, orbdcisn'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
Returns
- double
The volatility.