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
settlementDaysintThe settlement days.
faceAmountdoubleThe notional.
scheduleScheduleThe coupons' schedule, whose calendar is the bond's.
indexSwapIndexThe coupons' swap index.
paymentDayCounterDayCounterThe coupons' day counter.
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.
Exceptions
- ArgumentNullException
scheduleorindexis null.- ArgumentOutOfRangeException
settlementDaysorfixingDaysis 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.