Table of Contents

Class ExerciseAdapter

Namespace
NanoQL.Models
Assembly
NanoQL.dll

An exercise value as a product: stepped at the exercise value's times, it pays the exercise value at its first exercise time and is done there.

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

Remarks

A working type: it steps its own clone of the exercise value. A call-specified product's rebate in QuantLib's callable cases.

Constructors

ExerciseAdapter(MarketModelExerciseValue, int)

Initializes a new instance of the ExerciseAdapter class.

public ExerciseAdapter(MarketModelExerciseValue exercise, int numberOfProducts = 1)

Parameters

exercise MarketModelExerciseValue

The exercise value, cloned.

numberOfProducts int

The number of products, the first paid.

Exceptions

ArgumentException

The exercise value's rate times are fewer than two.

Properties

Evolution

Gets the exercise value's evolution.

public override EvolutionDescription Evolution { get; }

Property Value

EvolutionDescription

ExerciseValue

Gets the exercise value the adapter steps: its own clone, which reading doesn't change.

public MarketModelExerciseValue ExerciseValue { get; }

Property Value

MarketModelExerciseValue

MaxNumberOfCashFlowsPerProductPerStep

Gets 1.

public override int MaxNumberOfCashFlowsPerProductPerStep { get; }

Property Value

int

NumberOfProducts

Gets the number of products.

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 exercise value's cash-flow times.

public override ImmutableArray<double> PossibleCashFlowTimes()

Returns

ImmutableArray<double>

The times.

Reset()

Puts the product at the start of a path.

public override void Reset()