Class NotionalSpec
- Namespace
- ATAS.DataFeedsCore.Valuation
- Assembly
- ATAS.DataFeedsCore.dll
How the money (notional) value of a security's volume is computed:
notional = volume × Multiplier × (PriceDependent ? price : 1) in Currency.
Not in ATAS 8.0.15 yet: available from the next version.
public sealed record NotionalSpec
- Inheritance
-
objectNotionalSpec
- Extension Methods
Constructors
NotionalSpec(decimal, bool, string, bool)
How the money (notional) value of a security's volume is computed:
notional = volume × Multiplier × (PriceDependent ? price : 1) in Currency.
public NotionalSpec(decimal Multiplier, bool PriceDependent, string Currency, bool IsCurrencyAssumed = false)
Parameters
MultiplierdecimalLinear contracts: quantity of the priced asset per unit of volume (1 for spot and coin-quantity futures, CtVal for OKX lots, the point value for CME-style futures). Inverse contracts: money value of one contract (1 USD on Bybit, 100 USD for OKX BTC-USD-SWAP).
PriceDependentboolFalse for inverse contracts, whose contract value is fixed in money.
CurrencystringCurrency or settlement asset of the notional (USDT, USD, EUR...).
IsCurrencyAssumedboolTrue when the currency is a guess (no connector or exchange data), e.g. USD for an unknown futures exchange.
Properties
Currency
Currency or settlement asset of the notional (USDT, USD, EUR...).
public string Currency { get; init; }
Property Value
- string
IsCurrencyAssumed
True when the currency is a guess (no connector or exchange data), e.g. USD for an unknown futures exchange.
public bool IsCurrencyAssumed { get; init; }
Property Value
- bool
Multiplier
Linear contracts: quantity of the priced asset per unit of volume (1 for spot and coin-quantity futures, CtVal for OKX lots, the point value for CME-style futures). Inverse contracts: money value of one contract (1 USD on Bybit, 100 USD for OKX BTC-USD-SWAP).
public decimal Multiplier { get; init; }
Property Value
- decimal
PriceDependent
False for inverse contracts, whose contract value is fixed in money.
public bool PriceDependent { get; init; }
Property Value
- bool
Methods
Deconstruct(out decimal, out bool, out string, out bool)
public void Deconstruct(out decimal Multiplier, out bool PriceDependent, out string Currency, out bool IsCurrencyAssumed)
Parameters
MultiplierdecimalPriceDependentboolCurrencystringIsCurrencyAssumedbool
Equals(NotionalSpec?)
public bool Equals(NotionalSpec? other)
Parameters
otherNotionalSpec
Returns
- bool
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
- bool
GetHashCode()
public override int GetHashCode()
Returns
- int
GetNotional(decimal, decimal)
Returns the notional of a volume traded at a price.
public decimal GetNotional(decimal volume, decimal price)
Parameters
volumedecimalThe volume, in the volume units of the security.
pricedecimalThe price; not used when PriceDependent is false.
Returns
- decimal
The notional in Currency; decimal.MaxValue (or decimal.MinValue for a negative volume) when the result overflows.
ToString()
public override string ToString()
Returns
- string
Operators
operator ==(NotionalSpec?, NotionalSpec?)
public static bool operator ==(NotionalSpec? left, NotionalSpec? right)
Parameters
leftNotionalSpecrightNotionalSpec
Returns
- bool
operator !=(NotionalSpec?, NotionalSpec?)
public static bool operator !=(NotionalSpec? left, NotionalSpec? right)
Parameters
leftNotionalSpecrightNotionalSpec
Returns
- bool