Class FixedRateCoupon
A coupon paying a fixed interest rate.
public sealed class FixedRateCoupon : Coupon
- Inheritance
-
FixedRateCoupon
- Inherited Members
Remarks
The amount is computed on each call, in place of QuantLib's cached lazy calculation.
Constructors
FixedRateCoupon(Date, double, InterestRate, Date, Date, Date?, Date?, Date?)
Initializes a new instance of the FixedRateCoupon class from an interest rate.
public FixedRateCoupon(Date paymentDate, double nominal, InterestRate interestRate, Date accrualStartDate, Date accrualEndDate, Date? refPeriodStart = null, Date? refPeriodEnd = null, Date? exCouponDate = null)
Parameters
paymentDateDateThe payment date, which must already be a business day.
nominaldoubleThe nominal.
interestRateInterestRateThe interest rate, with its day counter and compounding.
accrualStartDateDateThe start of the accrual period.
accrualEndDateDateThe end of the accrual period.
refPeriodStartDate?The reference period's start; the accrual start when null.
refPeriodEndDate?The reference period's end; the accrual end when null.
exCouponDateDate?The ex-coupon date, if any.
FixedRateCoupon(Date, double, double, DayCounter, Date, Date, Date?, Date?, Date?)
Initializes a new instance of the FixedRateCoupon class from a simple annual rate.
public FixedRateCoupon(Date paymentDate, double nominal, double rate, DayCounter dayCounter, Date accrualStartDate, Date accrualEndDate, Date? refPeriodStart = null, Date? refPeriodEnd = null, Date? exCouponDate = null)
Parameters
paymentDateDateThe payment date, which must already be a business day.
nominaldoubleThe nominal.
ratedoubleThe rate, simply compounded and annual.
dayCounterDayCounterThe day counter.
accrualStartDateDateThe start of the accrual period.
accrualEndDateDateThe end of the accrual period.
refPeriodStartDate?The reference period's start; the accrual start when null.
refPeriodEndDate?The reference period's end; the accrual end when null.
exCouponDateDate?The ex-coupon date, if any.
Properties
DayCounter
Gets the day counter used for accrual.
public override DayCounter DayCounter { get; }
Property Value
InterestRate
Gets the interest rate.
public InterestRate InterestRate { get; }
Property Value
Methods
AccruedAmount(Date, EvaluationContext)
The amount accrued up to a date.
public override double AccruedAmount(Date d, EvaluationContext context)
Parameters
dDateThe date.
contextEvaluationContextThe evaluation context.
Returns
- double
The accrued amount.
Amount(EvaluationContext)
The amount of the cash flow, not discounted: the amount paid at the cash-flow date.
public override double Amount(EvaluationContext context)
Parameters
contextEvaluationContextThe evaluation context, which a cash flow whose amount depends on fixings or the evaluation date reads; one that knows its amount checks it and reads nothing.
Returns
- double
The amount.
Rate(EvaluationContext)
The coupon's rate.
public override double Rate(EvaluationContext context)
Parameters
contextEvaluationContextThe evaluation context.
Returns
- double
The rate.