Table of Contents

Class MultiStepCoterminalSwaps

Namespace
NanoQL.Models
Assembly
NanoQL.dll

The coterminal payer swaps, one product a rate: swap i, from rate i to the last, pays at each of its rates' resets the fixed coupon −K τᶠⁱˣ and the floating coupon f τᶠˡᵒᵃᵗ, at the period's payment time.

[WorkingType]
public sealed class MultiStepCoterminalSwaps : MultiProductMultiStep
Inheritance
MultiStepCoterminalSwaps
Inherited Members

Remarks

A working type. Fewer accruals or payment times than rates are refused, where QuantLib reads past them.

Constructors

MultiStepCoterminalSwaps(ReadOnlySpan<double>, ReadOnlySpan<double>, ReadOnlySpan<double>, ReadOnlySpan<double>, double)

Initializes a new instance of the MultiStepCoterminalSwaps class.

public MultiStepCoterminalSwaps(ReadOnlySpan<double> rateTimes, ReadOnlySpan<double> fixedAccruals, ReadOnlySpan<double> floatingAccruals, ReadOnlySpan<double> paymentTimes, double fixedRate)

Parameters

rateTimes ReadOnlySpan<double>

The rate times, at least two.

fixedAccruals ReadOnlySpan<double>

The fixed leg's accruals, one a rate at least.

floatingAccruals ReadOnlySpan<double>

The floating leg's accruals, one a rate at least.

paymentTimes ReadOnlySpan<double>

The payment times, increasing, one a rate at least.

fixedRate double

The fixed rate.

Exceptions

ArgumentException

The times aren't increasing, or the inputs are shorter than the rates.

Properties

MaxNumberOfCashFlowsPerProductPerStep

Gets 2: the fixed and the floating coupon.

public override int MaxNumberOfCashFlowsPerProductPerStep { get; }

Property Value

int

NumberOfProducts

Gets the number of rates: a swap from each.

public override int NumberOfProducts { get; }

Property Value

int

Methods

Clone()

A deep copy of the product, its state included.

public override MarketModelMultiProduct Clone()

Returns

MarketModelMultiProduct

A new product.

NextTimeStep(CurveState, Span<int>, MarketModelMultiProductCashFlow[][])

Moves the product a step: writes each product's number of cash flows at this step and the cash flows.

public override bool NextTimeStep(CurveState currentState, Span<int> numberCashFlowsThisStep, MarketModelMultiProductCashFlow[][] cashFlowsGenerated)

Parameters

currentState CurveState

The state of the curve at the step's end.

numberCashFlowsThisStep Span<int>

Each product's number of cash flows, written; one entry a product.

cashFlowsGenerated MarketModelMultiProductCashFlow[][]

Each product's cash flows, written from the first; NumberOfProducts rows of at least MaxNumberOfCashFlowsPerProductPerStep.

Returns

bool

Whether the path is finished for the product.

PossibleCashFlowTimes()

The times the product can pay at, which its cash flows' time indices index.

public override ImmutableArray<double> PossibleCashFlowTimes()

Returns

ImmutableArray<double>

The times.

Reset()

Puts the product at the start of a path.

public override void Reset()