Class CustomIborIndex
A LIBOR-like index that allows specifying custom calendars for value and maturity dates calculations.
public sealed class CustomIborIndex : IborIndex
- Inheritance
-
CustomIborIndex
- Inherited Members
Remarks
- ValueDate(Date) advances on the value calendar and adjusts on the maturity calendar.
- MaturityDate(Date) advances on the maturity calendar.
- FixingDate(Date) goes back on the value calendar.
Typical LIBOR indexes use fixing calendar = value calendar = UK, maturity calendar = JoinHolidays(UK, currency calendar) for non-EUR currencies; fixing calendar = JoinHolidays(UK, TARGET), value calendar = maturity calendar = TARGET for EUR.
Constructors
CustomIborIndex(string, Period, int, Currency?, Calendar, Calendar, Calendar, BusinessDayConvention, bool, DayCounter, YieldTermStructure?)
Initializes a new instance of the CustomIborIndex class.
public CustomIborIndex(string familyName, Period tenor, int settlementDays, Currency? currency, Calendar fixingCalendar, Calendar valueCalendar, Calendar maturityCalendar, BusinessDayConvention convention, bool endOfMonth, DayCounter dayCounter, YieldTermStructure? h = null)
Parameters
familyNamestringThe family name.
tenorPeriodThe tenor.
settlementDaysintThe settlement days.
currencyCurrencyThe currency, or null, QuantLib's empty currency.
fixingCalendarCalendarThe calendar of the fixing dates.
valueCalendarCalendarThe calendar on which value dates advance.
maturityCalendarCalendarThe calendar on which value dates adjust and maturity dates advance.
conventionBusinessDayConventionThe business-day convention.
endOfMonthboolWhether the end-of-month rule applies.
dayCounterDayCounterThe day counter.
hYieldTermStructureThe forwarding curve, or null for none.
Exceptions
- ArgumentNullException
A calendar is null.
Properties
MaturityCalendar
Gets the calendar on which value dates adjust and maturity dates advance.
public Calendar MaturityCalendar { get; }
Property Value
ValueCalendar
Gets the calendar on which value dates advance.
public Calendar ValueCalendar { get; }
Property Value
Methods
Clone(YieldTermStructure?)
A copy of the index on another forwarding curve: a CustomIborIndex with the same conventions and calendars, as QuantLib's.
public override IborIndex Clone(YieldTermStructure? forwarding)
Parameters
forwardingYieldTermStructureThe forwarding curve, or null for none.
Returns
- IborIndex
The copy.
FixingDate(Date)
The fixing date of a value date: the fixing days before it on the value calendar, adjusted to the preceding fixing day.
public override Date FixingDate(Date valueDate)
Parameters
valueDateDateThe value date.
Returns
- Date
The fixing date.
MaturityDate(Date)
The maturity date of a value date, advanced by the tenor on the maturity calendar.
public override Date MaturityDate(Date valueDate)
Parameters
valueDateDateThe value date.
Returns
- Date
The maturity date.
ValueDate(Date)
The value date of a fixing: the fixing days after it on the value calendar, adjusted on the maturity calendar.
public override Date ValueDate(Date fixingDate)
Parameters
fixingDateDateThe fixing date.
Returns
- Date
The value date.
Exceptions
- ArgumentException
fixingDateis not a valid fixing date.