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
codestringThe contract's code.
expirationDateDateThe expiration date.
underlyingStartDateDateThe underlying's first delivery date.
underlyingEndDateDateThe underlying's last delivery date.
Exceptions
- ArgumentNullException
codeis null.- ArgumentException
A date is
default(Date).
Properties
Code
Gets the contract's code.
public string Code { get; }
Property Value
ExpirationDate
Gets the expiration date.
public Date ExpirationDate { get; }
Property Value
UnderlyingEndDate
Gets the underlying's last delivery date.
public Date UnderlyingEndDate { get; }
Property Value
UnderlyingStartDate
Gets the underlying's first delivery date.
public Date UnderlyingStartDate { get; }