Table of Contents

Class CmsRateBond

Namespace
NanoQL.Instruments
Assembly
NanoQL.dll

A CMS-rate bond, possibly capped or floored: CMS coupons on a schedule, and a single redemption.

public sealed class CmsRateBond : Bond
Inheritance
CmsRateBond
Inherited Members

Remarks

Its coupons are built by CmsLeg, which gives them no pricer: the bond prices once one is set with SetCouponPricer<T>(T, FloatingRateCouponPricer?), as QuantLib's setCouponPricer on its cash flows. 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

CmsRateBond(int, double, Schedule, SwapIndex, DayCounter?, BusinessDayConvention, int?, IEnumerable<double>?, IEnumerable<double>?, IEnumerable<double?>?, IEnumerable<double?>?, bool, double, Date?)

Initializes a new instance of the CmsRateBond class.

public CmsRateBond(int settlementDays, double faceAmount, Schedule schedule, SwapIndex index, DayCounter? paymentDayCounter, 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)

Parameters

settlementDays int

The settlement days.

faceAmount double

The notional.

schedule Schedule

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

index SwapIndex

The coupons' swap index.

paymentDayCounter DayCounter

The coupons' day counter.

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.

Exceptions

ArgumentNullException

schedule or index is null.

ArgumentOutOfRangeException

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