Table of Contents

Class EnergyCommodityResults

Namespace
NanoQL.Experimental
Assembly
NanoQL.dll

The results of an energy commodity's calculation: the NPV, in the base currency, with what QuantLib keeps on the instrument (its pricing errors, secondary cost amounts, daily positions and payment cash flows).

[Experimental("NQL0001")]
public sealed record EnergyCommodityResults : InstrumentResults, IEquatable<InstrumentResults>, IEquatable<EnergyCommodityResults>
Inheritance
EnergyCommodityResults
Implements
Inherited Members

Remarks

QuantLib's EnergyCommodity::results also declares a currency and a unit of measure, which nothing sets, and isn't ported with them. A swap's daily positions are also its additional result dailyPositions, as QuantLib writes it. Equality compares every member by value, the collections element by element, but the payment cash flows, which compare by reference, as every CashFlow does.

Constructors

EnergyCommodityResults()

public EnergyCommodityResults()

Properties

DailyPositions

Gets a swap's daily positions by day; none for a future.

public ImmutableSortedDictionary<Date, EnergyDailyPosition> DailyPositions { get; init; }

Property Value

ImmutableSortedDictionary<Date, EnergyDailyPosition>

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

PaymentCashFlows

Gets a swap's payment cash flows by payment date; none for a future.

public ImmutableSortedDictionary<Date, CommodityCashFlow> PaymentCashFlows { get; init; }

Property Value

ImmutableSortedDictionary<Date, CommodityCashFlow>

PricingErrors

Gets the calculation's pricing errors, warnings among them.

public ImmutableArray<PricingError> PricingErrors { get; init; }

Property Value

ImmutableArray<PricingError>

SecondaryCostAmounts

Gets the secondary costs' amounts by name, in the base currency.

public ImmutableSortedDictionary<string, Money> SecondaryCostAmounts { get; init; }

Property Value

ImmutableSortedDictionary<string, Money>

Methods

Equals(EnergyCommodityResults?)

public bool Equals(EnergyCommodityResults? other)

Parameters

other EnergyCommodityResults

Returns

bool

Equals(InstrumentResults?)

public override sealed bool Equals(InstrumentResults? other)

Parameters

other InstrumentResults

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 ==(EnergyCommodityResults?, EnergyCommodityResults?)

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

Parameters

left EnergyCommodityResults
right EnergyCommodityResults

Returns

bool

operator !=(EnergyCommodityResults?, EnergyCommodityResults?)

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

Parameters

left EnergyCommodityResults
right EnergyCommodityResults

Returns

bool