Table of Contents

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

settlementDays int

The settlement days.

faceAmount double

The notional.

schedule Schedule

The coupons' schedule, whose calendar is the bond's.

iborIndex IborIndex

The coupons' index.

accrualDayCounter DayCounter

The coupons' day counter, or null for the index's.

context EvaluationContext

The evaluation context, whose at-par switch the coupons' default pricer reads.

paymentConvention BusinessDayConvention

The business-day convention of the payment dates.

fixingDays int?

The fixing days, or null for the index's.

gearings IEnumerable<double>

The gearings; null for QuantLib's default, 1.

spreads IEnumerable<double>

The spreads; null for QuantLib's default, 0.

caps IEnumerable<double?>

The caps, each null for none; null for none at all.

floors IEnumerable<double?>

The floors, each null for none; null for none at all.

inArrears bool

Whether the coupons fix in arrears.

redemption double

The redemption price, in base 100.

issueDate Date?

The issue date, or null for none.

exCouponPeriod Period

The ex-coupon period; a zero-length one, the default, means no ex-coupon dates.

exCouponCalendar Calendar

The calendar the ex-coupon period is counted on, or null, QuantLib's empty calendar.

exCouponConvention BusinessDayConvention

The business-day convention of the ex-coupon dates.

exCouponEndOfMonth bool

Whether the ex-coupon dates stay at month end.

fixingConvention BusinessDayConvention

The business-day convention adjusting the fixing dates.

Exceptions

ArgumentNullException

context, schedule or iborIndex is null.

ArgumentOutOfRangeException

settlementDays or fixingDays is 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.