Class Black
- Namespace
- StockSharp.Algo.Derivatives
- Assembly
- StockSharp.Algo.dll
The Greeks values calculating model by the Black formula.
public class Black : BlackScholes, IBlackScholes
- Inheritance
-
Black
- Implements
- Inherited Members
- Extension Methods
Constructors
Black(Security, ISecurityProvider, IMarketDataProvider, IExchangeInfoProvider)
Initializes a new instance of the Black.
public Black(Security option, ISecurityProvider securityProvider, IMarketDataProvider dataProvider, IExchangeInfoProvider exchangeInfoProvider)
Parameters
option
SecurityOptions contract.
securityProvider
ISecurityProviderThe provider of information about instruments.
dataProvider
IMarketDataProviderThe market data provider.
exchangeInfoProvider
IExchangeInfoProviderExchanges and trading boards provider.
Black(Security, Security, IMarketDataProvider, IExchangeInfoProvider)
Initializes a new instance of the Black.
public Black(Security option, Security underlyingAsset, IMarketDataProvider dataProvider, IExchangeInfoProvider exchangeInfoProvider)
Parameters
option
SecurityOptions contract.
underlyingAsset
SecurityUnderlying asset.
dataProvider
IMarketDataProviderThe market data provider.
exchangeInfoProvider
IExchangeInfoProviderExchanges and trading boards provider.
Properties
Dividend
The dividend amount on shares.
public override decimal Dividend { set; }
Property Value
Methods
D1(decimal, decimal, double)
To calculate the d1 parameter of the option fulfilment probability estimating.
protected override double D1(decimal deviation, decimal assetPrice, double timeToExp)
Parameters
deviation
decimalStandard deviation.
assetPrice
decimalUnderlying asset price.
timeToExp
doubleThe option period before the expiration.
Returns
- double
The d1 parameter.
Delta(DateTimeOffset, decimal?, decimal?)
To calculate the option delta.
public override decimal? Delta(DateTimeOffset currentTime, decimal? deviation = null, decimal? assetPrice = null)
Parameters
currentTime
DateTimeOffsetThe current time.
deviation
decimal?Standard deviation.
assetPrice
decimal?Underlying asset price.
Returns
- decimal?
The option delta. If the value is equal to null, then the value calculation currently is impossible.
Gamma(DateTimeOffset, decimal?, decimal?)
To calculate the option gamma.
public override decimal? Gamma(DateTimeOffset currentTime, decimal? deviation = null, decimal? assetPrice = null)
Parameters
currentTime
DateTimeOffsetThe current time.
deviation
decimal?Standard deviation.
assetPrice
decimal?Underlying asset price.
Returns
- decimal?
The option gamma. If the value is equal to null, then the value calculation currently is impossible.
Premium(DateTimeOffset, decimal?, decimal?)
To calculate the option premium.
public override decimal? Premium(DateTimeOffset currentTime, decimal? deviation = null, decimal? assetPrice = null)
Parameters
currentTime
DateTimeOffsetThe current time.
deviation
decimal?Standard deviation.
assetPrice
decimal?Underlying asset price.
Returns
- decimal?
The option premium. If the value is equal to null, then the value calculation currently is impossible.
Rho(DateTimeOffset, decimal?, decimal?)
To calculate the option rho.
public override decimal? Rho(DateTimeOffset currentTime, decimal? deviation = null, decimal? assetPrice = null)
Parameters
currentTime
DateTimeOffsetThe current time.
deviation
decimal?Standard deviation.
assetPrice
decimal?Underlying asset price.
Returns
- decimal?
The option rho. If the value is equal to null, then the value calculation currently is impossible.
Theta(DateTimeOffset, decimal?, decimal?)
To calculate the option theta.
public override decimal? Theta(DateTimeOffset currentTime, decimal? deviation = null, decimal? assetPrice = null)
Parameters
currentTime
DateTimeOffsetThe current time.
deviation
decimal?Standard deviation.
assetPrice
decimal?Underlying asset price.
Returns
- decimal?
The option theta. If the value is equal to null, then the value calculation currently is impossible.
Vega(DateTimeOffset, decimal?, decimal?)
To calculate the option vega.
public override decimal? Vega(DateTimeOffset currentTime, decimal? deviation = null, decimal? assetPrice = null)
Parameters
currentTime
DateTimeOffsetThe current time.
deviation
decimal?Standard deviation.
assetPrice
decimal?Underlying asset price.