BlackScholes

StockSharp.Algo.Derivatives

黒い小胞の公式によってギリシャの値を計算するためのモデル。

実装: IBlackScholes

コンストラクター

BlackScholes
protected BlackScholes(IMarketDataProvider dataProvider, DateTime? expirationTime)
blackScholes = BlackScholes(dataProvider, expirationTime)

継承されたモデルのベースコンストラクタ。

dataProvider
市場データプロバイダ。
expirationTime
有効期限切れオプションの有効期限。null の場合、ExpiryDate の深夜は使用可能に使用されます。
BlackScholes
public BlackScholes(Security option, Security underlyingAsset, IMarketDataProvider dataProvider, DateTime? expirationTime)
blackScholes = BlackScholes(option, underlyingAsset, dataProvider, expirationTime)

基底資産を特定のオプションとしてBlackScholesの新規インスタンスを初期化します。

option
オプション契約。
underlyingAsset
資産の状況
dataProvider
市場データプロバイダ。
expirationTime
有効期限切れオプションの有効期限。null の場合、ExpiryDate の深夜は使用可能に使用されます。
BlackScholes
protected BlackScholes(Security underlyingAsset, IMarketDataProvider dataProvider, DateTime? expirationTime)
blackScholes = BlackScholes(underlyingAsset, dataProvider, expirationTime)

基底資産のみ(非オプションモデル)のBlackScholesの新規インスタンスを初期化します。

underlyingAsset
資産の状況
dataProvider
市場データプロバイダ。
expirationTime
有効期限切れオプションの有効期限。null の場合、ExpiryDate の深夜は使用可能に使用されます。

プロパティ

DataProvider
public virtual IMarketDataProvider DataProvider { get; }
value = blackScholes.DataProvider

市場データプロバイダ。

DefaultDeviation
public decimal? DefaultDeviation { get; }
value = blackScholes.DefaultDeviation

デフォルトで標準偏差。

Dividend
public virtual decimal Dividend { get; set; }
value = blackScholes.Dividend
blackScholes.Dividend = value

株式の配当額

ExpirationTime
public virtual DateTime? ExpirationTime { get; set; }
value = blackScholes.ExpirationTime
blackScholes.ExpirationTime = value

有効期限切れの瞬間。null なら、ExpiryDate の真夜は使用可能に使用されます。

Option
public virtual Security Option { get; }
value = blackScholes.Option

オプション契約。

OptionType
protected OptionTypes OptionType { get; }
value = blackScholes.OptionType

オプションタイプ。

RiskFree
public decimal RiskFree { get; set; }
value = blackScholes.RiskFree
blackScholes.RiskFree = value

リスクフリー金利。

RoundDecimals
public virtual int RoundDecimals { get; set; }
value = blackScholes.RoundDecimals
blackScholes.RoundDecimals = value

計算値の小数点数。デフォルトは-1で、値の丸みがないことを示します。

UnderlyingAsset
public virtual Security UnderlyingAsset { get; set; }
value = blackScholes.UnderlyingAsset
blackScholes.UnderlyingAsset = value

資産の状況

メソッド

CalcDelta
protected virtual decimal CalcDelta(decimal deviation, decimal assetPrice, double timeToExp)
result = blackScholes.CalcDelta(deviation, assetPrice, timeToExp)

To calculate the option delta from resolved inputs, before rounding.

deviation
Standard deviation.
assetPrice
Underlying asset price.
timeToExp
The option period before the expiration.

戻り値: Option delta.

CalcGamma
protected virtual decimal CalcGamma(decimal deviation, decimal assetPrice, double timeToExp)
result = blackScholes.CalcGamma(deviation, assetPrice, timeToExp)

To calculate the option gamma from resolved inputs, before rounding.

deviation
Standard deviation.
assetPrice
Underlying asset price.
timeToExp
The option period before the expiration.

戻り値: Option gamma.

CalcPremium
protected virtual decimal CalcPremium(decimal deviation, decimal assetPrice, double timeToExp)
result = blackScholes.CalcPremium(deviation, assetPrice, timeToExp)

To calculate the option premium from the model inputs already resolved by Decimal}).

deviation
Standard deviation.
assetPrice
Underlying asset price.
timeToExp
The option period before the expiration.

戻り値: The option premium.

CalcRho
protected virtual decimal CalcRho(decimal deviation, decimal assetPrice, double timeToExp)
result = blackScholes.CalcRho(deviation, assetPrice, timeToExp)

To calculate the option rho from resolved inputs, before rounding.

deviation
Standard deviation.
assetPrice
Underlying asset price.
timeToExp
The option period before the expiration.

戻り値: Option rho.

CalcTheta
protected virtual decimal CalcTheta(decimal deviation, decimal assetPrice, double timeToExp)
result = blackScholes.CalcTheta(deviation, assetPrice, timeToExp)

To calculate the option theta from resolved inputs, before rounding.

deviation
Standard deviation.
assetPrice
Underlying asset price.
timeToExp
The option period before the expiration.

戻り値: Option theta.

CalcVega
protected virtual decimal CalcVega(decimal deviation, decimal assetPrice, double timeToExp)
result = blackScholes.CalcVega(deviation, assetPrice, timeToExp)

To calculate the option vega from resolved inputs, before rounding.

deviation
Standard deviation.
assetPrice
Underlying asset price.
timeToExp
The option period before the expiration.

戻り値: Option vega.

D1
protected virtual double D1(decimal deviation, decimal assetPrice, double timeToExp)
result = blackScholes.D1(deviation, assetPrice, timeToExp)

選択の d1 パラメータを計算するには fulfilment 推定確率.

deviation
標準的な偏差。
assetPrice
資産価格の把握
timeToExp
期限前のオプション期間。

戻り値: d1 パラメータ。

Delta
public virtual decimal? Delta(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = blackScholes.Delta(currentTime, deviation, assetPrice)

デルタのオプションを計算するには.

currentTime
現行時刻
deviation
標準的な偏差。
assetPrice
資産価格の把握

戻り値: デルタオプション。値が等しい場合は、現在値の計算は不可能です。

Gamma
public virtual decimal? Gamma(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = blackScholes.Gamma(currentTime, deviation, assetPrice)

オプションのガンマを計算するには.

currentTime
現行時刻
deviation
標準的な偏差。
assetPrice
資産価格の把握

戻り値: オプション gamma。 値が等しい場合は、現在値の計算は不可能です。

GetAssetPrice
public decimal? GetAssetPrice(decimal? assetPrice)
result = blackScholes.GetAssetPrice(assetPrice)

資産の価格は下地資産の入手に役立ちます。

assetPrice
指定された場合、資産の原資産の価格は。

戻り値: 基礎資産の価格は、値が等しい場合、現在値の計算は不可能です。

GetExpirationTimeLine
public virtual double? GetExpirationTimeLine(DateTime currentTime)
result = blackScholes.GetExpirationTimeLine(currentTime)

満了前の計算の時間。

currentTime
現行時刻

戻り値: 有効期限が切れるまで残ります。値が等しい場合は、現在値の計算は不可能です。

GetInputs
protected ValueTuple<decimal, decimal, double>? GetInputs(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = blackScholes.GetInputs(currentTime, deviation, assetPrice)

What every value of the model is computed from: the deviation the caller gives or the one quoted, the asset price the caller gives or the last trade, and the time left to expiry.

currentTime
The current time.
deviation
The standard deviation, or for the quoted one.
assetPrice
The price of the underlying asset, or for its last trade.

戻り値: The inputs, or when one of them is not known.

ImpliedVolatility
public virtual decimal? ImpliedVolatility(DateTime currentTime, decimal premium, decimal? assetPrice)
result = blackScholes.ImpliedVolatility(currentTime, premium, assetPrice)

To calculate the implied volatility.

currentTime
The current time.
premium
The option premium.
assetPrice
Underlying asset price.

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

IsExpired
internal bool IsExpired(DateTime currentTime)
result = blackScholes.IsExpired(currentTime)

Whether the option has expired by the given moment, as the model takes its expiry.

currentTime
The current time.

戻り値: when the expiry is known and is not later than .

Payoff
internal decimal? Payoff(decimal? assetPrice)
result = blackScholes.Payoff(assetPrice)

What the option pays at its expiry, before rounding: its intrinsic value at the price of the underlying asset.

assetPrice
The price of the underlying asset if it is specified.

戻り値: The payoff. If the value is equal to , then the price of the underlying asset is unknown.

PayoffDelta
internal decimal? PayoffDelta(decimal? assetPrice)
result = blackScholes.PayoffDelta(assetPrice)

The slope of what the option pays at its expiry: the asset it delivers, one for one while it is in the money.

assetPrice
The price of the underlying asset if it is specified.

戻り値: The delta of the payoff. If the value is equal to , then the price of the underlying asset is unknown.

Premium
public virtual decimal? Premium(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = blackScholes.Premium(currentTime, deviation, assetPrice)

オプションのプレミアムを計算するには.

currentTime
現行時刻
deviation
標準的な偏差。
assetPrice
資産価格の把握

戻り値: オプションのプレミアム。値が等しい場合は、現在値の計算は不可能です。

Rho
public virtual decimal? Rho(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = blackScholes.Rho(currentTime, deviation, assetPrice)

オプションのrhoを計算するには.

currentTime
現行時刻
deviation
標準的な偏差。
assetPrice
資産価格の把握

戻り値: rho オプション。値が等しい場合、現在値の計算は不可能です。

Theta
public virtual decimal? Theta(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = blackScholes.Theta(currentTime, deviation, assetPrice)

選択の ta を計算するため。

currentTime
現行時刻
deviation
標準的な偏差。
assetPrice
資産価格の把握

戻り値: は、そのオプションの ta です。値が等しい場合は、現在値の計算は不可能です。

TryRound
protected decimal? TryRound(decimal? value)
result = blackScholes.TryRound(value)

To round to RoundDecimals.

value
初期値。

戻り値: 丸みのある値。

Vega
public virtual decimal? Vega(DateTime currentTime, decimal? deviation, decimal? assetPrice)
result = blackScholes.Vega(currentTime, deviation, assetPrice)

vegaオプションを計算するには。

currentTime
現行時刻
deviation
標準的な偏差。
assetPrice
資産価格の把握

戻り値: vega オプション。値が等しい場合、現在値の計算は不可能です。