Class FloatingRateBond
- Namespace
- NanoQL.Instruments
- Assembly
- NanoQL.dll
A floating-rate bond, possibly capped or floored: Ibor coupons on a schedule, and a single redemption.
public class FloatingRateBond : Bond
- Inheritance
-
FloatingRateBond
- Derived
- Inherited Members
Remarks
Unsealed, an extension point, as in QuantLib, where the Italian CCTEU derives from it. Its coupons are built by IborLeg when the bond is, so the bond takes the context: a leg with no caps, floors or in-arrears fixing gets QuantLib's default pricer, which reads the context's at-par switch then, and the bond keeps that choice. A capped, floored or in-arrears bond gets no pricer, and prices only once one is set with SetCouponPricer<T>(T, FloatingRateCouponPricer?).
It is built through Bond's construction contract, so its issue date isn't checked against the first payment, as in QuantLib. Its schedule's calendar is its settlement and payment calendar.
Constructors
FloatingRateBond(int, double, Schedule, IborIndex, DayCounter?, EvaluationContext, BusinessDayConvention, int?, IEnumerable<double>?, IEnumerable<double>?, IEnumerable<double?>?, IEnumerable<double?>?, bool, double, Date?, Period, Calendar?, BusinessDayConvention, bool, BusinessDayConvention)
Initializes a new instance of the FloatingRateBond class.
public FloatingRateBond(int settlementDays, double faceAmount, Schedule schedule, IborIndex iborIndex, DayCounter? accrualDayCounter, EvaluationContext context, BusinessDayConvention paymentConvention = BusinessDayConvention.Following, int? fixingDays = null, IEnumerable<double>? gearings = null, IEnumerable<double>? spreads = null, IEnumerable<double?>? caps = null, IEnumerable<double?>? floors = null, bool inArrears = false, double redemption = 100, Date? issueDate = null, Period exCouponPeriod = default, Calendar? exCouponCalendar = null, BusinessDayConvention exCouponConvention = BusinessDayConvention.Unadjusted, bool exCouponEndOfMonth = false, BusinessDayConvention fixingConvention = BusinessDayConvention.Preceding)
Parameters
settlementDaysintThe settlement days.
faceAmountdoubleThe notional.
scheduleScheduleThe coupons' schedule, whose calendar is the bond's.
iborIndexIborIndexThe coupons' index.
accrualDayCounterDayCounterThe coupons' day counter, or null for the index's.
contextEvaluationContextThe evaluation context, whose at-par switch the coupons' default pricer reads.
paymentConventionBusinessDayConventionThe business-day convention of the payment dates.
fixingDaysint?The fixing days, or null for the index's.
gearingsIEnumerable<double>The gearings; null for QuantLib's default, 1.
spreadsIEnumerable<double>The spreads; null for QuantLib's default, 0.
capsIEnumerable<double?>floorsIEnumerable<double?>inArrearsboolWhether the coupons fix in arrears.
redemptiondoubleThe redemption price, in base 100.
issueDateDate?The issue date, or null for none.
exCouponPeriodPeriodThe ex-coupon period; a zero-length one, the default, means no ex-coupon dates.
exCouponCalendarCalendarThe calendar the ex-coupon period is counted on, or null, QuantLib's empty calendar.
exCouponConventionBusinessDayConventionThe business-day convention of the ex-coupon dates.
exCouponEndOfMonthboolWhether the ex-coupon dates stay at month end.
fixingConventionBusinessDayConventionThe business-day convention adjusting the fixing dates.
Exceptions
- ArgumentNullException
context,scheduleoriborIndexis null.- ArgumentOutOfRangeException
settlementDaysorfixingDaysis negative, or a convention isn't a member of its enum.- ArgumentException
The issue date is
default(Date), or there are more gearings, spreads, caps or floors than coupons.- NanoQLException
The schedule is empty, or a date is computed on QuantLib's empty calendar where it can't give one.