Table of Contents

Class ZeroCouponSwapResults

Namespace
NanoQL.Instruments
Assembly
NanoQL.dll

The results an engine returns for a ZeroCouponSwap: the swap's, with the fixed payment that gives it a zero NPV.

public sealed record ZeroCouponSwapResults : SwapResults, IEquatable<InstrumentResults>, IEquatable<SwapResults>, IEquatable<ZeroCouponSwapResults>
Inheritance
ZeroCouponSwapResults
Implements
Inherited Members

Remarks

QuantLib's swap derives the fair payment from its results on each call (fairFixedPayment); here it is a member of the results, which DiscountingSwapEngine's ZeroCouponSwap overload gives, null, QuantLib's "result not available", from another engine. QuantLib's fairFixedRate, which takes a day counter, is FairFixedRate(ZeroCouponSwapResults, DayCounter). Equality compares the swap's results and the fair payment.

Constructors

ZeroCouponSwapResults()

Initializes a new instance of the ZeroCouponSwapResults class.

public ZeroCouponSwapResults()

Properties

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

FairFixedPayment

Gets the fixed payment that gives the swap a zero NPV.

public double? FairFixedPayment { get; init; }

Property Value

double?

FixedLegNPV

Gets the fixed leg's NPV, signed by whether it is paid.

public double? FixedLegNPV { get; }

Property Value

double?

FloatingLegNPV

Gets the floating leg's NPV, signed by whether it is paid.

public double? FloatingLegNPV { get; }

Property Value

double?

Methods

Equals(SwapResults?)

public override sealed bool Equals(SwapResults? other)

Parameters

other SwapResults

Returns

bool

Equals(ZeroCouponSwapResults?)

public bool Equals(ZeroCouponSwapResults? other)

Parameters

other ZeroCouponSwapResults

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(ZeroCouponSwapResults?, ZeroCouponSwapResults?)

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

Parameters

left ZeroCouponSwapResults
right ZeroCouponSwapResults

Returns

bool

operator !=(ZeroCouponSwapResults?, ZeroCouponSwapResults?)

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

Parameters

left ZeroCouponSwapResults
right ZeroCouponSwapResults

Returns

bool