Class BasketBlackScholes
- Namespace
- StockSharp.Algo.Derivatives
- Assembly
- StockSharp.Algo.dll
Portfolio model for calculating the values of Greeks by the Black-Scholes formula.
public class BasketBlackScholes : BlackScholes, IBlackScholes
- Inheritance
-
BasketBlackScholes
- Implements
- Inherited Members
- Extension Methods
Constructors
BasketBlackScholes(ISecurityProvider, IMarketDataProvider, IExchangeInfoProvider, IPositionProvider)
Initializes a new instance of the BasketBlackScholes.
public BasketBlackScholes(ISecurityProvider securityProvider, IMarketDataProvider dataProvider, IExchangeInfoProvider exchangeInfoProvider, IPositionProvider positionProvider)
Parameters
securityProviderISecurityProviderThe provider of information about instruments.
dataProviderIMarketDataProviderThe market data provider.
exchangeInfoProviderIExchangeInfoProviderExchanges and trading boards provider.
positionProviderIPositionProviderThe position provider.
BasketBlackScholes(Security, IMarketDataProvider, IExchangeInfoProvider, IPositionProvider)
Initializes a new instance of the BasketBlackScholes.
public BasketBlackScholes(Security underlyingAsset, IMarketDataProvider dataProvider, IExchangeInfoProvider exchangeInfoProvider, IPositionProvider positionProvider)
Parameters
underlyingAssetSecurityUnderlying asset.
dataProviderIMarketDataProviderThe market data provider.
exchangeInfoProviderIExchangeInfoProviderExchanges and trading boards provider.
positionProviderIPositionProviderThe position provider.
Properties
InnerModels
Information about options.
public BasketBlackScholes.IInnerModelList InnerModels { get; }
Property Value
Option
Options contract.
public override Security Option { get; }
Property Value
PositionProvider
The position provider.
public IPositionProvider PositionProvider { get; set; }
Property Value
RoundDecimals
The number of decimal places at calculated values. The default is -1, which means no values rounding.
public override int RoundDecimals { set; }
Property Value
UnderlyingAsset
Underlying asset.
public override Security UnderlyingAsset { get; }
Property Value
Methods
Delta(DateTimeOffset, decimal?, decimal?)
To calculate the option delta.
public override decimal? Delta(DateTimeOffset currentTime, decimal? deviation = null, decimal? assetPrice = null)
Parameters
currentTimeDateTimeOffsetThe current time.
deviationdecimal?Standard deviation.
assetPricedecimal?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
currentTimeDateTimeOffsetThe current time.
deviationdecimal?Standard deviation.
assetPricedecimal?Underlying asset price.
Returns
- decimal?
The option gamma. If the value is equal to null, then the value calculation currently is impossible.
ImpliedVolatility(DateTimeOffset, decimal)
To calculate the implied volatility.
public override decimal? ImpliedVolatility(DateTimeOffset currentTime, decimal premium)
Parameters
currentTimeDateTimeOffsetThe current time.
premiumdecimalThe option premium.
Returns
- decimal?
The implied volatility. 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
currentTimeDateTimeOffsetThe current time.
deviationdecimal?Standard deviation.
assetPricedecimal?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
currentTimeDateTimeOffsetThe current time.
deviationdecimal?Standard deviation.
assetPricedecimal?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
currentTimeDateTimeOffsetThe current time.
deviationdecimal?Standard deviation.
assetPricedecimal?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
currentTimeDateTimeOffsetThe current time.
deviationdecimal?Standard deviation.
assetPricedecimal?Underlying asset price.