Black
The Greeks values calculating model by the Black formula.
Inherits: BlackScholes
Constructors
public Black(Security option, Security underlyingAsset, IMarketDataProvider dataProvider, DateTime? expirationTime)
black = Black(option, underlyingAsset, dataProvider, expirationTime)
Initializes a new instance of the Black.
- option
- Options contract.
- underlyingAsset
- Underlying asset.
- dataProvider
- The market data provider.
- expirationTime
- Explicit option expiration moment. If null, midnight of ExpiryDate is used when available.
Properties
public override decimal Dividend { set; }
black.Dividend = value
The dividend amount on shares.
Methods
protected override double D1(decimal deviation, decimal assetPrice, double timeToExp)
result = black.D1(deviation, assetPrice, timeToExp)
To calculate the d1 parameter of the option fulfilment probability estimating.
- deviation
- Standard deviation.
- assetPrice
- Underlying asset price.
- timeToExp
- The option period before the expiration.
Returns: The d1 parameter.
public override decimal? Delta(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = black.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.
public override decimal? Gamma(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = black.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.
public override decimal? Premium(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = black.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.
public override decimal? Rho(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = black.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.
public override decimal? Theta(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = black.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.
public override decimal? Vega(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = black.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.