BlackScholes
The model for calculating Greeks values by the Black-Scholes formula.
Implementiert: IBlackScholes
Konstruktoren
BlackScholes(IMarketDataProvider, DateTime?)
Base constructor for inherited models.
- dataProvider
- The market data provider.
- expirationTime
- Explicit option expiration moment. If null, midnight of ExpiryDate is used when available.
BlackScholes(Security, Security, IMarketDataProvider, DateTime?)
Initializes a new instance of BlackScholes for a specific option with its underlying asset.
- 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.
BlackScholes(Security, IMarketDataProvider, DateTime?)
Initializes a new instance of the BlackScholes for an underlying asset only (non-option models).
- underlyingAsset
- Underlying asset.
- dataProvider
- The market data provider.
- expirationTime
- Explicit option expiration moment. If null, midnight of ExpiryDate is used when available.
Eigenschaften
DataProvider : IMarketDataProvider
The market data provider.
DefaultDeviation : decimal
The standard deviation by default.
ExpirationTime : DateTime?
Explicit expiration moment. If null, midnight of ExpiryDate is used when available.
OptionType : OptionTypes
Option type.
RoundDecimals : int
The number of decimal places at calculated values. The default is -1, which means no values rounding.
UnderlyingAsset : Security
Underlying asset.
Methoden
D1(decimal, decimal, double) : double
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.
Rückgabe: The d1 parameter.
Delta(DateTime, decimal?, decimal?) : decimal?
To calculate the option delta.
- currentTime
- The current time.
- deviation
- Standard deviation.
- assetPrice
- Underlying asset price.
Rückgabe: The option delta. If the value is equal to , then the value calculation currently is impossible.
Gamma(DateTime, decimal?, decimal?) : decimal?
To calculate the option gamma.
- currentTime
- The current time.
- deviation
- Standard deviation.
- assetPrice
- Underlying asset price.
Rückgabe: The option gamma. If the value is equal to , then the value calculation currently is impossible.
GetAssetPrice(decimal?) : decimal?
To get the price of the underlying asset.
- assetPrice
- The price of the underlying asset if it is specified.
Rückgabe: The price of the underlying asset. If the value is equal to , then the value calculation currently is impossible.
GetExpirationTimeLine(DateTime) : double?
The time before expiration calculation.
- currentTime
- The current time.
Rückgabe: The time remaining until expiration. If the value is equal to , then the value calculation currently is impossible.
ImpliedVolatility(DateTime, decimal) : decimal?
To calculate the implied volatility.
- currentTime
- The current time.
- premium
- The option premium.
Rückgabe: The implied volatility. If the value is equal to , then the value calculation currently is impossible.
Premium(DateTime, decimal?, decimal?) : decimal?
To calculate the option premium.
- currentTime
- The current time.
- deviation
- Standard deviation.
- assetPrice
- Underlying asset price.
Rückgabe: The option premium. If the value is equal to , then the value calculation currently is impossible.
Rho(DateTime, decimal?, decimal?) : decimal?
To calculate the option rho.
- currentTime
- The current time.
- deviation
- Standard deviation.
- assetPrice
- Underlying asset price.
Rückgabe: The option rho. If the value is equal to , then the value calculation currently is impossible.
Theta(DateTime, decimal?, decimal?) : decimal?
To calculate the option theta.
- currentTime
- The current time.
- deviation
- Standard deviation.
- assetPrice
- Underlying asset price.
Rückgabe: The option theta. If the value is equal to , then the value calculation currently is impossible.