Class SwapCashFlows
- Namespace
- NanoQL.Experimental
- Assembly
- NanoQL.dll
A fixed-versus-floating swap mapped to deterministic cash flows under a tenor basis: the floating leg's
(IborLegCashFlows) and the fixed coupons that start on or after the discount curve's reference date,
with their annuity weights: QuantLib's SwapCashFlows.
[Experimental("NQL0001")]
public class SwapCashFlows : IborLegCashFlows
- Inheritance
-
SwapCashFlows
- Derived
- Inherited Members
Remarks
An extension point, as QuantLib's: SwaptionCashFlows derives from it. QuantLib reads each fixed flow as a coupon unchecked, undefined for one that isn't; here it is refused.
Constructors
SwapCashFlows()
Initializes a new instance of the SwapCashFlows class, with no flows: QuantLib's default constructor.
public SwapCashFlows()
SwapCashFlows(FixedVsFloatingSwap, YieldTermStructure, EvaluationContext, bool)
Initializes a new instance of the SwapCashFlows class.
public SwapCashFlows(FixedVsFloatingSwap swap, YieldTermStructure discountCurve, EvaluationContext context, bool contTenorSpread = true)
Parameters
swapFixedVsFloatingSwapThe swap.
discountCurveYieldTermStructureThe discount curve, whose reference date the times start from.
contextEvaluationContextThe evaluation context, whose fixings and forecasts the floating coupons' rates read.
contTenorSpreadboolWhether the floating spreads are continuously compounded and paid at each coupon's start; otherwise simply compounded and paid at its payment date.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentException
The floating leg is empty.
- NanoQLException
A flow isn't a coupon, or a rate can't be read.
Properties
AnnuityWeights
Gets the fixed coupons' annuity weights, each nominal times accrual period.
public ImmutableArray<double> AnnuityWeights { get; }
Property Value
FixedLeg
Gets the fixed coupons that start on or after the reference date.
public ImmutableArray<CashFlow> FixedLeg { get; }
Property Value
FixedTimes
Gets the fixed coupons' times from the reference date, Actual/365 (Fixed).
public ImmutableArray<double> FixedTimes { get; }
Property Value
FixedWeights
Gets the fixed coupons' amounts.
public ImmutableArray<double> FixedWeights { get; }