DerivativesHelper

StockSharp.Algo.Derivatives

Extension class for derivatives.

Métodos

D1(decimal, decimal, decimal, decimal, decimal, double) : double

To calculate the d1 parameter of the option fulfilment probability estimating.

assetPrice
Underlying asset price.
strike
The strike price.
riskFree
The risk free interest rate.
dividend
The dividend amount on shares.
deviation
Standard deviation.
timeToExp
The option period before the expiration.

Retorna: The d1 parameter of the option fulfilment probability estimating.

D2(double, decimal, double) : double

To calculate the d2 parameter of the option fulfilment probability estimating.

d1
The d1 parameter of the option fulfilment probability estimating.
deviation
Standard deviation.
timeToExp
The option period before the expiration.

Retorna: The d2 parameter of the option fulfilment probability estimating.

Delta(OptionTypes, decimal, double) : decimal

To calculate the option delta.

optionType
Option type.
assetPrice
Underlying asset price.
d1
The d1 parameter of the option fulfilment probability estimating.

Retorna: Option delta.

ExpRate(decimal, double) : double

To calculate the time exhibitor.

riskFree
The risk free interest rate.
timeToExp
The option period before the expiration.

Retorna: The time exhibitor.

Filter(IEnumerable<Security>, decimal) : IEnumerable<Security>

To filter options by the strike Strike.

options
Options to be filtered.
strike
The strike price.

Retorna: Filtered options.

Filter(IEnumerable<Security>, OptionTypes) : IEnumerable<Security>

To filter options by type OptionType.

options
Options to be filtered.
type
Option type.

Retorna: Filtered options.

Filter(IEnumerable<Security>, DateTime?) : IEnumerable<Security>

To filter instruments by the expiration date ExpiryDate.

securities
Instruments to be filtered.
expirationDate
The expiration date.

Retorna: Instruments filtered.

FilterByUnderlying(IEnumerable<Security>, Security) : IEnumerable<Security>

To filter instruments by the underlying asset.

securities
Instruments to be filtered.
asset
Underlying asset.

Retorna: Instruments filtered.

Gamma(decimal, decimal, double, double) : decimal

To calculate the option gamma.

assetPrice
Underlying asset price.
deviation
Standard deviation.
timeToExp
The option period before the expiration.
d1
The d1 parameter of the option fulfilment probability estimating.

Retorna: Option gamma.

GetAsset(Security, ISecurityProvider) : Security

To get the underlying asset.

derivative
The derivative.
provider
The provider of information about instruments.

Retorna: Underlying asset.

GetAtTheMoney(Security, ISecurityProvider, decimal) : IEnumerable<Security>

To get at the money options (ATM).

underlyingAsset
Underlying asset.
securityProvider
The provider of information about instruments.
assetPrice
The asset price.

Retorna: At the money options.

GetAtTheMoney(Security, IEnumerable<Security>, decimal) : IEnumerable<Security>

To get at the money options (ATM).

underlyingAsset
Underlying asset.
allStrikes
All strikes.
assetPrice
The asset price.

Retorna: At the money options.

GetCall(Security, ISecurityProvider, decimal, DateTime) : Security

To get Call for the underlying futures.

future
Underlying futures.
provider
The provider of information about instruments.
strike
Strike.
expirationDate
The date of the option expiration.

Retorna: The Call option.

GetCentralStrike(Security, ISecurityProvider, DateTime, OptionTypes, decimal) : Security

To get the main strike.

underlyingAsset
Underlying asset.
securityProvider
The provider of information about instruments.
expirationDate
The options expiration date.
optionType
Option type.
assetPrice
The current market price of the asset. It is used to calculate the main strike.

Retorna: The main strike.

GetCentralStrike(IEnumerable<Security>, decimal) : Security

To get the main strike.

allStrikes
All strikes.
assetPrice
The current market price of the asset. It is used to calculate the main strike.

Retorna: The main strike. If it is impossible to get the current market price of the asset then the will be returned.

GetDerivatives(Security, ISecurityProvider, DateTime?) : IEnumerable<Security>

To get derivatives by the underlying asset.

asset
Underlying asset.
provider
The provider of information about instruments.
expirationDate
The expiration date.

Retorna: The list of derivatives.

GetExpirationTimeLine(DateTime, DateTime, TimeSpan) : double?

To get the option period before expiration.

expirationTime
The option expiration time.
currentTime
The current time.
timeLine
The length of the total period.

Retorna: The option period before expiration. If the value is equal to , then the value calculation currently is impossible.

GetExpirationTimeLine(DateTime, DateTime) : double?

To get the option period before expiration.

expirationTime
The option expiration time.
currentTime
The current time.

Retorna: The option period before expiration. If the value is equal to , then the value calculation currently is impossible.

GetFutureInfo(string, string, ExchangeBoard) : SecurityMessage

To get the information about the futures from its name (underlying asset, expiration date, etc.).

futureName
The futures name.
optionCode
The option code.
board
Board info.

Retorna: Information about futures.

GetInTheMoney(Security, ISecurityProvider, decimal) : IEnumerable<Security>

To get in the money options (ITM).

underlyingAsset
Underlying asset.
securityProvider
The provider of information about instruments.
assetPrice
The asset price.

Retorna: In the money options.

GetInTheMoney(Security, IEnumerable<Security>, decimal) : IEnumerable<Security>

To get in the money options (ITM).

underlyingAsset
Underlying asset.
allStrikes
All strikes.
assetPrice
The asset price.

Retorna: In the money options.

GetIntrinsicValue(Security, decimal) : decimal

To get the internal option value.

option
Options contract.
assetPrice
The underlying asset price.

Retorna: The internal value. If it is impossible to get the current market price of the asset then the will be returned.

GetOppositeOption(Security, ISecurityProvider) : Security

To get opposite option (for Call to get Put, for Put to get Call).

option
Options contract.
provider
The provider of information about instruments.

Retorna: The opposite option.

GetOption(Security, ISecurityProvider, decimal, DateTime, OptionTypes) : Security

To get an option for the underlying futures.

future
Underlying futures.
provider
The provider of information about instruments.
strike
Strike.
expirationDate
The options expiration date.
optionType
Option type.

Retorna: Options contract.

GetOptionInfo(string, ExchangeBoard) : Security

To get the information about the option from its name (underlying asset, strike, expiration date, etc.).

optionName
The option name.
board
Board info.

Retorna: Information about the option.

GetOutOfTheMoney(Security, ISecurityProvider, decimal) : IEnumerable<Security>

To get out of the money options (OTM).

underlyingAsset
Underlying asset.
securityProvider
The provider of information about instruments.
assetPrice
The asset price.

Retorna: Out of the money options.

GetOutOfTheMoney(Security, IEnumerable<Security>, decimal) : IEnumerable<Security>

To get out of the money options (OTM).

underlyingAsset
Underlying asset.
allStrikes
All strikes.
assetPrice
The asset price.

Retorna: Out of the money options.

GetPut(Security, ISecurityProvider, decimal, DateTime) : Security

To get Put for the underlying futures.

future
Underlying futures.
provider
The provider of information about instruments.
strike
Strike.
expirationDate
The date of the option expiration.

Retorna: The Put option.

GetStrikeStep(Security, ISecurityProvider, DateTime?) : decimal

To get the strike step size.

provider
The provider of information about instruments.
underlyingAsset
Underlying asset.
expirationDate
The options expiration date (to specify a particular series).

Retorna: The strike step size.

GetTimeValue(Security, decimal, decimal) : decimal

To get the timed option value.

option
Options contract.
currentPrice
The contract price.
assetPrice
The underlying asset price.

Retorna: The timed value.

GetUnderlyingAsset(Security, ISecurityProvider) : Security

To get the underlying asset by the derivative.

derivative
The derivative.
provider
The provider of information about instruments.

Retorna: Underlying asset.

ImpliedVolatility(IOrderBookMessage, ISecurityProvider, IMarketDataProvider, DateTime, decimal, decimal) : QuoteChangeMessage

To create the volatility order book from usual order book.

depth
The order book quotes of which will be changed to volatility quotes.
securityProvider
The provider of information about instruments.
dataProvider
The market data provider.
currentTime
The current time.
riskFree
The risk free interest rate.
dividend
The dividend amount on shares.

Retorna: The order book volatility.

ImpliedVolatility(IOrderBookMessage, IBlackScholes, DateTime) : QuoteChangeMessage

To create the volatility order book from usual order book.

depth
The order book quotes of which will be changed to volatility quotes.
model
The model for calculating Greeks values by the Black-Scholes formula.
currentTime
The current time.

Retorna: The order book volatility.

ImpliedVolatility(decimal, Func<decimal, decimal?>) : decimal?

To calculate the implied volatility.

premium
The option premium.
getPremium
To calculate the premium by volatility.

Retorna: The implied volatility. If the value is equal to , then the value calculation currently is impossible.

Invert(OptionTypes) : OptionTypes

To change the option type for opposite.

type
The initial value.

Retorna: The opposite value.

IsExpired(Security, IExchangeInfoProvider, DateTime) : bool

To check whether the instrument has finished the action.

security
Security.
exchangeInfoProvider
Exchanges and trading boards provider.
currentTime
The current time.

Retorna: if the instrument has finished its action.

Premium(OptionTypes, decimal, decimal, decimal, decimal, decimal, double, double) : decimal

To calculate the option premium.

optionType
Option type.
strike
The strike price.
assetPrice
Underlying asset price.
riskFree
The risk free interest rate.
dividend
The dividend amount on shares.
deviation
Standard deviation.
timeToExp
The option period before the expiration.
d1
The d1 parameter of the option fulfilment probability estimating.

Retorna: The option premium.

Rho(OptionTypes, decimal, decimal, decimal, decimal, double, double) : decimal

To calculate the option rho.

optionType
Option type.
strike
The strike price.
assetPrice
Underlying asset price.
riskFree
The risk free interest rate.
deviation
Standard deviation.
timeToExp
The option period before the expiration.
d1
The d1 parameter of the option fulfilment probability estimating.

Retorna: Option rho.

Theta(OptionTypes, decimal, decimal, decimal, decimal, double, double, decimal) : decimal

To calculate the option theta.

optionType
Option type.
strike
The strike price.
assetPrice
Underlying asset price.
riskFree
The risk free interest rate.
deviation
Standard deviation.
timeToExp
The option period before the expiration.
d1
The d1 parameter of the option fulfilment probability estimating.
daysInYear
Days per year.

Retorna: Option theta.

Vega(decimal, double, double) : decimal

To calculate the option vega.

assetPrice
Underlying asset price.
timeToExp
The option period before the expiration.
d1
The d1 parameter of the option fulfilment probability estimating.

Retorna: Option vega.