BasketBlackScholes

StockSharp.Algo.Derivatives

Portfolio model for calculating the values of Greeks by the Black-Scholes formula.

Inherits: BlackScholes

Constructors

BasketBlackScholes
public BasketBlackScholes(IMarketDataProvider dataProvider, IPositionProvider positionProvider, DateTime? expirationTime)
basketBlackScholes = BasketBlackScholes(dataProvider, positionProvider, expirationTime)

Initializes a new instance of the BasketBlackScholes.

dataProvider
The market data provider.
positionProvider
The position provider.
expirationTime
Explicit options expiration moment for the whole basket. If null, models' own settings are used.
BasketBlackScholes
public BasketBlackScholes(Security underlyingAsset, IMarketDataProvider dataProvider, IPositionProvider positionProvider, DateTime? expirationTime)
basketBlackScholes = BasketBlackScholes(underlyingAsset, dataProvider, positionProvider, expirationTime)

Initializes a new instance of the BasketBlackScholes with explicit underlying.

underlyingAsset
Underlying asset.
dataProvider
The market data provider.
positionProvider
The position provider.
expirationTime
Explicit options expiration moment for the whole basket.

Properties

InnerModels
public IInnerModelList InnerModels { get; }
value = basketBlackScholes.InnerModels

Information about options.

Option
public override Security Option { get; }
value = basketBlackScholes.Option

Options contract.

PositionProvider
public IPositionProvider PositionProvider { get; set; }
value = basketBlackScholes.PositionProvider
basketBlackScholes.PositionProvider = value

The position provider.

RoundDecimals
public override int RoundDecimals { set; }
basketBlackScholes.RoundDecimals = value

The number of decimal places at calculated values. The default is -1, which means no values rounding.

UnderlyingAsset
public override Security UnderlyingAsset { get; }
value = basketBlackScholes.UnderlyingAsset

Underlying asset.

Methods

Delta
public override decimal? Delta(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = basketBlackScholes.Delta(currentTime, deviation, assetPrice)

To calculate the option delta.

currentTime
The current time.
deviation
Standard deviation.
assetPrice
Underlying asset price.

Returns: The option delta. If the value is equal to , then the value calculation currently is impossible.

Gamma
public override decimal? Gamma(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = basketBlackScholes.Gamma(currentTime, deviation, assetPrice)

To calculate the option gamma.

currentTime
The current time.
deviation
Standard deviation.
assetPrice
Underlying asset price.

Returns: The option gamma. If the value is equal to , then the value calculation currently is impossible.

ImpliedVolatility
public override decimal? ImpliedVolatility(DateTime currentTime, decimal premium)
result = basketBlackScholes.ImpliedVolatility(currentTime, premium)

To calculate the implied volatility.

currentTime
The current time.
premium
The option premium.

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

Premium
public override decimal? Premium(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = basketBlackScholes.Premium(currentTime, deviation, assetPrice)

To calculate the option premium.

currentTime
The current time.
deviation
Standard deviation.
assetPrice
Underlying asset price.

Returns: The option premium. If the value is equal to , then the value calculation currently is impossible.

Rho
public override decimal? Rho(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = basketBlackScholes.Rho(currentTime, deviation, assetPrice)

To calculate the option rho.

currentTime
The current time.
deviation
Standard deviation.
assetPrice
Underlying asset price.

Returns: The option rho. If the value is equal to , then the value calculation currently is impossible.

Theta
public override decimal? Theta(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = basketBlackScholes.Theta(currentTime, deviation, assetPrice)

To calculate the option theta.

currentTime
The current time.
deviation
Standard deviation.
assetPrice
Underlying asset price.

Returns: The option theta. If the value is equal to , then the value calculation currently is impossible.

Vega
public override decimal? Vega(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = basketBlackScholes.Vega(currentTime, deviation, assetPrice)

To calculate the option vega.

currentTime
The current time.
deviation
Standard deviation.
assetPrice
Underlying asset price.

Returns: The option vega. If the value is equal to , then the value calculation currently is impossible.