Table of Contents

Class LogNormalCotSwapRatePc

Namespace
NanoQL.Models
Assembly
NanoQL.dll

The predictor-corrector evolver of a displaced log-normal coterminal swap market model: the model's rates are the coterminal swap rates, each step predicted with the drifts at its start and corrected with the average of those and the drifts on the predicted curve.

[WorkingType]
public sealed class LogNormalCotSwapRatePc : MarketModelEvolver
Inheritance
LogNormalCotSwapRatePc
Inherited Members

Remarks

A working type, copying each step's pseudo-root at construction; one step allocates nothing after a path's warm-up.

SetInitialState(CurveState) reads any curve state's coterminal swap rates, through the base's virtual read, where QuantLib's casts the state to its own type and dereferences a null pointer for any other (an access violation; lognormalcotswapratepc.cpp:92-93; Divergences/SwapRatePcInitialStateTests.cs).

Constructors

LogNormalCotSwapRatePc(MarketModel, BrownianGeneratorFactory, ReadOnlySpan<int>, int)

Initializes a new instance of the LogNormalCotSwapRatePc class.

public LogNormalCotSwapRatePc(MarketModel marketModel, BrownianGeneratorFactory factory, ReadOnlySpan<int> numeraires, int initialStep = 0)

Parameters

marketModel MarketModel

The model evolved, its rates the coterminal swap rates.

factory BrownianGeneratorFactory

The factory of the Brownian generator.

numeraires ReadOnlySpan<int>

The numeraires, one per step, compatible with the evolution.

initialStep int

The step each path starts from, below the number of steps.

Exceptions

ArgumentException

The numeraires aren't compatible with the evolution.

ArgumentOutOfRangeException

initialStep isn't a step.

Properties

CurrentState

Gets the curve state after the last step: the evolver's own, valid until its next step.

public override CurveState CurrentState { get; }

Property Value

CurveState

CurrentStep

Gets the step the next AdvanceStep() takes.

public override int CurrentStep { get; }

Property Value

int

Numeraires

Gets the numeraires, one per step.

public override ImmutableArray<int> Numeraires { get; }

Property Value

ImmutableArray<int>

Methods

AdvanceStep()

Evolves the rates over the current step.

public override double AdvanceStep()

Returns

double

The step's weight.

SetInitialState(CurveState)

Sets the state each path starts from.

public override void SetInitialState(CurveState cs)

Parameters

cs CurveState

The curve state whose rates each path starts from.

Remarks

Any curve state's coterminal swap rates, where QuantLib's reads only its own type's.

Exceptions

ArgumentException

The state's swap rates aren't one per rate.

StartNewPath()

Starts a new path.

public override double StartNewPath()

Returns

double

The path's weight.