Table of Contents

Class ExchangeContract

Namespace
NanoQL.Experimental
Assembly
NanoQL.dll

An exchange-traded contract: its code, its expiration date and its underlying's delivery dates, which a nearby commodity curve rolls on.

[Experimental("NQL0001")]
public sealed class ExchangeContract
Inheritance
ExchangeContract
Inherited Members

Remarks

Immutable. QuantLib's ExchangeContracts, a map from a date to a contract, is an ImmutableSortedDictionary<Date, ExchangeContract>.

Constructors

ExchangeContract(string, Date, Date, Date)

Initializes a new instance of the ExchangeContract class.

public ExchangeContract(string code, Date expirationDate, Date underlyingStartDate, Date underlyingEndDate)

Parameters

code string

The contract's code.

expirationDate Date

The expiration date.

underlyingStartDate Date

The underlying's first delivery date.

underlyingEndDate Date

The underlying's last delivery date.

Exceptions

ArgumentNullException

code is null.

ArgumentException

A date is default(Date).

Properties

Code

Gets the contract's code.

public string Code { get; }

Property Value

string

ExpirationDate

Gets the expiration date.

public Date ExpirationDate { get; }

Property Value

Date

UnderlyingEndDate

Gets the underlying's last delivery date.

public Date UnderlyingEndDate { get; }

Property Value

Date

UnderlyingStartDate

Gets the underlying's first delivery date.

public Date UnderlyingStartDate { get; }

Property Value

Date