Class Collar
- Namespace
- NanoQL.Instruments
- Assembly
- NanoQL.dll
A collar: long a cap and short a floor on the same floating leg.
public sealed class Collar : CapFloor
- Inheritance
-
Collar
- Inherited Members
Remarks
As in QuantLib, cap rates below the floor rates aren't refused.
Constructors
Collar(ImmutableArray<CashFlow>, IEnumerable<double>, IEnumerable<double>)
Initializes a new instance of the Collar class.
public Collar(ImmutableArray<CashFlow> floatingLeg, IEnumerable<double> capRates, IEnumerable<double> floorRates)
Parameters
floatingLegImmutableArray<CashFlow>The floating leg.
capRatesIEnumerable<double>The cap rates, extended to the leg's length with the last one.
floorRatesIEnumerable<double>The floor rates, extended to the leg's length with the last one.
Exceptions
- ArgumentException
The leg is
defaultor holds a null cash flow, or there are no cap rates or no floor rates.- ArgumentNullException
A rate sequence is null.