Table of Contents

Class SwapTenorThreshold

Namespace
NanoQL.Instruments
Assembly
NanoQL.dll

A currency's fixed leg tenor at the swap tenors on one side of a threshold: QuantLib's GBP swaps take a 1Y fixed leg at most a year long, and its AUD swaps a 6M one at least four years long.

public sealed record SwapTenorThreshold : IEquatable<SwapTenorThreshold>
Inheritance
SwapTenorThreshold
Implements
Inherited Members

Constructors

SwapTenorThreshold(SwapTenorComparison, Period, Period)

A currency's fixed leg tenor at the swap tenors on one side of a threshold: QuantLib's GBP swaps take a 1Y fixed leg at most a year long, and its AUD swaps a 6M one at least four years long.

public SwapTenorThreshold(SwapTenorComparison Comparison, Period SwapTenor, Period FixedLegTenor)

Parameters

Comparison SwapTenorComparison

How the swap's tenor compares with the threshold.

SwapTenor Period

The threshold.

FixedLegTenor Period

The fixed leg's tenor where the comparison holds.

Properties

Comparison

How the swap's tenor compares with the threshold.

public SwapTenorComparison Comparison { get; init; }

Property Value

SwapTenorComparison

FixedLegTenor

The fixed leg's tenor where the comparison holds.

public Period FixedLegTenor { get; init; }

Property Value

Period

SwapTenor

The threshold.

public Period SwapTenor { get; init; }

Property Value

Period

Methods

Deconstruct(out SwapTenorComparison, out Period, out Period)

public void Deconstruct(out SwapTenorComparison Comparison, out Period SwapTenor, out Period FixedLegTenor)

Parameters

Comparison SwapTenorComparison
SwapTenor Period
FixedLegTenor Period

Equals(SwapTenorThreshold?)

public bool Equals(SwapTenorThreshold? other)

Parameters

other SwapTenorThreshold

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Holds(Period)

Whether a swap's tenor is on the threshold's side, by QuantLib's comparison of periods.

public bool Holds(Period tenor)

Parameters

tenor Period

The swap's tenor.

Returns

bool

Whether the comparison holds.

Exceptions

NanoQLException

The two periods can't be compared (days with months).

ToString()

public override string ToString()

Returns

string

Operators

operator ==(SwapTenorThreshold?, SwapTenorThreshold?)

public static bool operator ==(SwapTenorThreshold? left, SwapTenorThreshold? right)

Parameters

left SwapTenorThreshold
right SwapTenorThreshold

Returns

bool

operator !=(SwapTenorThreshold?, SwapTenorThreshold?)

public static bool operator !=(SwapTenorThreshold? left, SwapTenorThreshold? right)

Parameters

left SwapTenorThreshold
right SwapTenorThreshold

Returns

bool