DerivativesHelper
Classe de extensão para derivados.
Métodos
public static double D1(decimal assetPrice, decimal strike, decimal riskFree, decimal dividend, decimal deviation, double timeToExp)
result = DerivativesHelper.D1(assetPrice, strike, riskFree, dividend, deviation, timeToExp)
Para calcular o parâmetro d1 da estimativa de probabilidade de preenchimento da opção.
- assetPrice
- - O preço dos activos subjacentes.
- strike
- O preço de greve.
- riskFree
- A taxa de juro livre de risco.
- dividend
- O montante dos dividendos sobre as acções.
- deviation
- Desvio padrão.
- timeToExp
- O período de opção antes do termo.
Retorna: O parâmetro d1 da estimativa de probabilidade de preenchimento da opção.
public static double D2(double d1, decimal deviation, double timeToExp)
result = DerivativesHelper.D2(d1, deviation, timeToExp)
Para calcular o parâmetro d2 da opção de preenchimento estimativa de probabilidade.
- d1
- O parâmetro d1 da estimativa de probabilidade de preenchimento da opção.
- deviation
- Desvio padrão.
- timeToExp
- O período de opção antes do termo.
Retorna: O parâmetro d2 da estimativa de probabilidade de preenchimento da opção.
public static decimal Delta(OptionTypes optionType, decimal assetPrice, double d1)
result = DerivativesHelper.Delta(optionType, assetPrice, d1)
Para calcular a opção delta.
- optionType
- Tipo de opção.
- assetPrice
- - O preço dos activos subjacentes.
- d1
- O parâmetro d1 da estimativa de probabilidade de preenchimento da opção.
Retorna: Opção delta.
public static double ExpRate(decimal riskFree, double timeToExp)
result = DerivativesHelper.ExpRate(riskFree, timeToExp)
Para calcular o tempo exibidor.
- riskFree
- A taxa de juro livre de risco.
- timeToExp
- O período de opção antes do termo.
Retorna: O exibidor do tempo.
public static IEnumerable<Security> Filter(IEnumerable<Security> options, decimal strike)
result = DerivativesHelper.Filter(options, strike)
Para filtrar opções pela greve Strike.
- options
- Opções a serem filtradas.
- strike
- O preço de greve.
Retorna: Opções filtradas.
public static IEnumerable<Security> Filter(IEnumerable<Security> options, OptionTypes type)
result = DerivativesHelper.Filter(options, type)
Para filtrar opções por tipo OptionType.
- options
- Opções a serem filtradas.
- type
- Tipo de opção.
Retorna: Opções filtradas.
public static IEnumerable<Security> Filter(IEnumerable<Security> securities, DateTime? expirationDate)
result = DerivativesHelper.Filter(securities, expirationDate)
Filtrar os instrumentos pela data de expiração ExpiryDate.
- securities
- Instrumentos a serem filtrados.
- expirationDate
- A data de validade.
Retorna: Instrumentos filtrados.
public static IEnumerable<Security> FilterByStrikes(IEnumerable<Security> options, decimal centralStrike, int? below, int? above)
result = DerivativesHelper.FilterByStrikes(options, centralStrike, below, above)
To filter options by the strikes around the central one.
- options
- Options to be filtered.
- centralStrike
- The central strike.
- below
- How many of the listed strikes below the central one to keep; keeps all of them.
- above
- How many of the listed strikes above the central one to keep; keeps all of them.
Retorna: The options listed at the central strike and at the kept ones, of every type and expiry listed there.
public static IEnumerable<Security> FilterByUnderlying(IEnumerable<Security> securities, Security asset)
result = DerivativesHelper.FilterByUnderlying(securities, asset)
Filtrar os instrumentos pelo activo subjacente.
- securities
- Instrumentos a serem filtrados.
- asset
- - Um activo subjacente.
Retorna: Instrumentos filtrados.
public static decimal Gamma(decimal assetPrice, decimal deviation, double timeToExp, double d1)
result = DerivativesHelper.Gamma(assetPrice, deviation, timeToExp, d1)
Para calcular a opção gama.
- assetPrice
- - O preço dos activos subjacentes.
- deviation
- Desvio padrão.
- timeToExp
- O período de opção antes do termo.
- d1
- O parâmetro d1 da estimativa de probabilidade de preenchimento da opção.
Retorna: Opção gama.
public static Security GetAsset(Security derivative, ISecurityProvider provider)
result = DerivativesHelper.GetAsset(derivative, provider)
Para obter o activo subjacente.
- derivative
- A derivada.
- provider
- O fornecedor de informações sobre instrumentos.
Retorna: - Um activo subjacente.
public static ValueTask<Security> GetAssetAsync(Security derivative, ISecurityProvider provider, CancellationToken cancellationToken)
result = DerivativesHelper.GetAssetAsync(derivative, provider, cancellationToken)
To get the underlying asset.
- derivative
- The derivative.
- provider
- The provider of information about instruments.
- cancellationToken
- CancellationToken
Retorna: Underlying asset.
public static IEnumerable<Security> GetAtTheMoney(Security underlyingAsset, ISecurityProvider securityProvider, decimal assetPrice)
result = DerivativesHelper.GetAtTheMoney(underlyingAsset, securityProvider, assetPrice)
Para chegar às opções de dinheiro (ATM).
- underlyingAsset
- - Um activo subjacente.
- securityProvider
- O fornecedor de informações sobre instrumentos.
- assetPrice
- O preço dos activos.
Retorna: Nas opções de dinheiro.
public static IEnumerable<Security> GetAtTheMoney(Security underlyingAsset, IEnumerable<Security> allStrikes, decimal assetPrice)
result = DerivativesHelper.GetAtTheMoney(underlyingAsset, allStrikes, assetPrice)
Para chegar às opções de dinheiro (ATM).
- underlyingAsset
- - Um activo subjacente.
- allStrikes
- Todos os strikes.
- assetPrice
- O preço dos activos.
Retorna: Nas opções de dinheiro.
public static ValueTask<IEnumerable<Security>> GetAtTheMoneyAsync(Security underlyingAsset, ISecurityProvider securityProvider, decimal assetPrice, CancellationToken cancellationToken)
result = DerivativesHelper.GetAtTheMoneyAsync(underlyingAsset, securityProvider, assetPrice, cancellationToken)
To get at the money options (ATM).
- underlyingAsset
- Underlying asset.
- securityProvider
- The provider of information about instruments.
- assetPrice
- The asset price.
- cancellationToken
- CancellationToken
Retorna: At the money options.
public static Security GetCall(Security future, ISecurityProvider provider, decimal strike, DateTime expirationDate)
result = DerivativesHelper.GetCall(future, provider, strike, expirationDate)
Para obter Chamada para o futuro subjacente.
- future
- Futuros subjacentes.
- provider
- O fornecedor de informações sobre instrumentos.
- strike
- Strike.
- expirationDate
- A data de expiração da opção.
Retorna: A opção de chamada.
public static ValueTask<Security> GetCallAsync(Security future, ISecurityProvider provider, decimal strike, DateTime expirationDate, CancellationToken cancellationToken)
result = DerivativesHelper.GetCallAsync(future, provider, strike, expirationDate, cancellationToken)
To get Call for the underlying futures.
- future
- Underlying futures.
- provider
- The provider of information about instruments.
- strike
- Strike.
- expirationDate
- The date of the option expiration.
- cancellationToken
- CancellationToken
Retorna: The Call option.
public static Security GetCentralStrike(Security underlyingAsset, ISecurityProvider securityProvider, DateTime expirationDate, OptionTypes optionType, decimal assetPrice)
result = DerivativesHelper.GetCentralStrike(underlyingAsset, securityProvider, expirationDate, optionType, assetPrice)
Para obter a greve principal.
- underlyingAsset
- - Um activo subjacente.
- securityProvider
- O fornecedor de informações sobre instrumentos.
- expirationDate
- A data de expiração das opções.
- optionType
- Tipo de opção.
- assetPrice
- O preço de mercado atual do ativo. É usado para calcular a greve principal.
Retorna: A greve principal.
public static Security GetCentralStrike(IEnumerable<Security> allStrikes, decimal assetPrice)
result = DerivativesHelper.GetCentralStrike(allStrikes, assetPrice)
Para obter a greve principal.
- allStrikes
- Todos os strikes.
- assetPrice
- O preço de mercado atual do ativo. É usado para calcular a greve principal.
Retorna: A greve principal. Se é impossível obter o preço de mercado atual do ativo, então o será devolvido.
public static ValueTask<Security> GetCentralStrikeAsync(Security underlyingAsset, ISecurityProvider securityProvider, DateTime expirationDate, OptionTypes optionType, decimal assetPrice, CancellationToken cancellationToken)
result = DerivativesHelper.GetCentralStrikeAsync(underlyingAsset, securityProvider, expirationDate, optionType, assetPrice, cancellationToken)
To get the main strike.
- underlyingAsset
- Underlying asset.
- securityProvider
- The provider of information about instruments.
- expirationDate
- The options expiration date.
- optionType
- Option type.
- assetPrice
- The asset price.
- cancellationToken
- CancellationToken
Retorna: The main strike.
public static IEnumerable<Security> GetDerivatives(Security asset, ISecurityProvider provider, DateTime? expirationDate)
result = DerivativesHelper.GetDerivatives(asset, provider, expirationDate)
Obter derivados pelo ativo subjacente.
- asset
- - Um activo subjacente.
- provider
- O fornecedor de informações sobre instrumentos.
- expirationDate
- A data de validade.
Retorna: A lista de derivados.
public static IAsyncEnumerable<Security> GetDerivativesAsync(Security asset, ISecurityProvider provider, DateTime? expirationDate)
result = DerivativesHelper.GetDerivativesAsync(asset, provider, expirationDate)
To get derivatives by the underlying asset.
- asset
- Underlying asset.
- provider
- The provider of information about instruments.
- expirationDate
- The expiration date.
Retorna: The derivatives, or none when there are none.
internal static DateTime GetExpirationMoment(DateTime expiryDate, ExchangeBoard board)
result = DerivativesHelper.GetExpirationMoment(expiryDate, board)
The moment an instrument expires: its expiry date as given when that carries a time of day, otherwise the board's expiry time on that date, which is the board's local time.
- expiryDate
- The expiry date of the instrument, UTC.
- board
- The board the instrument trades on, or when it is not known.
Retorna: The expiry moment, UTC.
public static double? GetExpirationTimeLine(DateTime expirationTime, DateTime currentTime)
result = DerivativesHelper.GetExpirationTimeLine(expirationTime, currentTime)
Para obter o período de opção antes da expiração.
- expirationTime
- O tempo de expiração da opção.
- currentTime
- A hora atual.
Retorna: O período de opção antes do vencimento. Se o valor for igual a , então o cálculo de valor atualmente é impossível.
public static double? GetExpirationTimeLine(DateTime expirationTime, DateTime currentTime, TimeSpan timeLine)
result = DerivativesHelper.GetExpirationTimeLine(expirationTime, currentTime, timeLine)
Para obter o período de opção antes da expiração.
- expirationTime
- O tempo de expiração da opção.
- currentTime
- A hora atual.
- timeLine
- A duração do período total.
Retorna: O período de opção antes do vencimento. Se o valor for igual a , então o cálculo de valor atualmente é impossível.
public static SecurityMessage GetFutureInfo(string futureName, string optionCode, ExchangeBoard board)
result = DerivativesHelper.GetFutureInfo(futureName, optionCode, board)
Para obter as informações sobre os futuros a partir do seu nome (subjacente ativo, data de expiração, etc.).
- futureName
- O nome do futuro.
- optionCode
- O código da opção.
- board
- Informações da Direcção.
Retorna: Informação sobre futuros.
public static IEnumerable<Security> GetInTheMoney(Security underlyingAsset, ISecurityProvider securityProvider, decimal assetPrice)
result = DerivativesHelper.GetInTheMoney(underlyingAsset, securityProvider, assetPrice)
Para entrar nas opções de dinheiro (ITM).
- underlyingAsset
- - Um activo subjacente.
- securityProvider
- O fornecedor de informações sobre instrumentos.
- assetPrice
- O preço dos activos.
Retorna: Nas opções de dinheiro.
public static IEnumerable<Security> GetInTheMoney(Security underlyingAsset, IEnumerable<Security> allStrikes, decimal assetPrice)
result = DerivativesHelper.GetInTheMoney(underlyingAsset, allStrikes, assetPrice)
Para entrar nas opções de dinheiro (ITM).
- underlyingAsset
- - Um activo subjacente.
- allStrikes
- Todos os strikes.
- assetPrice
- O preço dos activos.
Retorna: Nas opções de dinheiro.
public static ValueTask<IEnumerable<Security>> GetInTheMoneyAsync(Security underlyingAsset, ISecurityProvider securityProvider, decimal assetPrice, CancellationToken cancellationToken)
result = DerivativesHelper.GetInTheMoneyAsync(underlyingAsset, securityProvider, assetPrice, cancellationToken)
To get in the money options (ITM).
- underlyingAsset
- Underlying asset.
- securityProvider
- The provider of information about instruments.
- assetPrice
- The asset price.
- cancellationToken
- CancellationToken
Retorna: In the money options.
public static decimal GetIntrinsicValue(Security option, decimal assetPrice)
result = DerivativesHelper.GetIntrinsicValue(option, assetPrice)
Para obter o valor da opção interna.
- option
- Contrato de opções.
- assetPrice
- O preço do activo subjacente.
Retorna: O valor interno. Se for impossível obter o preço de mercado atual do ativo, então o valor será devolvido.
public static Security GetOppositeOption(Security option, ISecurityProvider provider)
result = DerivativesHelper.GetOppositeOption(option, provider)
Para obter a opção oposta (para Chamada para obter Put, para Pôr para obter Call).
- option
- Contrato de opções.
- provider
- O fornecedor de informações sobre instrumentos.
Retorna: A opção oposta.
public static ValueTask<Security> GetOppositeOptionAsync(Security option, ISecurityProvider provider, CancellationToken cancellationToken)
result = DerivativesHelper.GetOppositeOptionAsync(option, provider, cancellationToken)
To get opposite option (for Call to get Put, for Put to get Call).
- option
- Options contract.
- provider
- The provider of information about instruments.
- cancellationToken
- CancellationToken
Retorna: The opposite option.
public static Security GetOption(Security future, ISecurityProvider provider, decimal strike, DateTime expirationDate, OptionTypes optionType)
result = DerivativesHelper.GetOption(future, provider, strike, expirationDate, optionType)
Para obter uma opção para os futuros subjacentes.
- future
- Futuros subjacentes.
- provider
- O fornecedor de informações sobre instrumentos.
- strike
- Strike.
- expirationDate
- A data de expiração das opções.
- optionType
- Tipo de opção.
Retorna: Contrato de opções.
public static ValueTask<Security> GetOptionAsync(Security future, ISecurityProvider provider, decimal strike, DateTime expirationDate, OptionTypes optionType, CancellationToken cancellationToken)
result = DerivativesHelper.GetOptionAsync(future, provider, strike, expirationDate, optionType, cancellationToken)
To get an option for the underlying futures.
- future
- Underlying futures.
- provider
- The provider of information about instruments.
- strike
- Strike.
- expirationDate
- The options expiration date.
- optionType
- Option type.
- cancellationToken
- CancellationToken
Retorna: Options contract.
public static Security GetOptionInfo(string optionName, ExchangeBoard board)
result = DerivativesHelper.GetOptionInfo(optionName, board)
Para obter a informação sobre a opção a partir do seu nome (subjacente ativo, greve, data de expiração, etc.).
- optionName
- O nome da opção.
- board
- Informações da Direcção.
Retorna: Informação sobre a opção.
public static IEnumerable<Security> GetOutOfTheMoney(Security underlyingAsset, IEnumerable<Security> allStrikes, decimal assetPrice)
result = DerivativesHelper.GetOutOfTheMoney(underlyingAsset, allStrikes, assetPrice)
Para sair das opções de dinheiro (OTM).
- underlyingAsset
- - Um activo subjacente.
- allStrikes
- Todos os strikes.
- assetPrice
- O preço dos activos.
Retorna: - Fora das opções de dinheiro.
public static IEnumerable<Security> GetOutOfTheMoney(Security underlyingAsset, ISecurityProvider securityProvider, decimal assetPrice)
result = DerivativesHelper.GetOutOfTheMoney(underlyingAsset, securityProvider, assetPrice)
Para sair das opções de dinheiro (OTM).
- underlyingAsset
- - Um activo subjacente.
- securityProvider
- O fornecedor de informações sobre instrumentos.
- assetPrice
- O preço dos activos.
Retorna: - Fora das opções de dinheiro.
public static ValueTask<IEnumerable<Security>> GetOutOfTheMoneyAsync(Security underlyingAsset, ISecurityProvider securityProvider, decimal assetPrice, CancellationToken cancellationToken)
result = DerivativesHelper.GetOutOfTheMoneyAsync(underlyingAsset, securityProvider, assetPrice, cancellationToken)
To get out of the money options (OTM).
- underlyingAsset
- Underlying asset.
- securityProvider
- The provider of information about instruments.
- assetPrice
- The asset price.
- cancellationToken
- CancellationToken
Retorna: Out of the money options.
public static Security GetPut(Security future, ISecurityProvider provider, decimal strike, DateTime expirationDate)
result = DerivativesHelper.GetPut(future, provider, strike, expirationDate)
Para ser colocado para o futuro subjacente.
- future
- Futuros subjacentes.
- provider
- O fornecedor de informações sobre instrumentos.
- strike
- Strike.
- expirationDate
- A data de expiração da opção.
Retorna: A opção de colocar.
public static ValueTask<Security> GetPutAsync(Security future, ISecurityProvider provider, decimal strike, DateTime expirationDate, CancellationToken cancellationToken)
result = DerivativesHelper.GetPutAsync(future, provider, strike, expirationDate, cancellationToken)
To get Put for the underlying futures.
- future
- Underlying futures.
- provider
- The provider of information about instruments.
- strike
- Strike.
- expirationDate
- The date of the option expiration.
- cancellationToken
- CancellationToken
Retorna: The Put option.
public static decimal GetStrikeStep(Security underlyingAsset, ISecurityProvider provider, DateTime? expirationDate)
result = DerivativesHelper.GetStrikeStep(underlyingAsset, provider, expirationDate)
Para obter o tamanho do passo de greve.
- provider
- O fornecedor de informações sobre instrumentos.
- underlyingAsset
- - Um activo subjacente.
- expirationDate
- A data de expiração das opções (para especificar uma série específica).
Retorna: O tamanho do passo de ataque.
public static decimal GetStrikeStep(IEnumerable<Security> derivatives)
result = DerivativesHelper.GetStrikeStep(derivatives)
To get the strike step size.
- derivatives
- Derivatives of the underlying asset.
Retorna: The strike step size.
public static ValueTask<decimal> GetStrikeStepAsync(Security underlyingAsset, ISecurityProvider provider, DateTime? expirationDate, CancellationToken cancellationToken)
result = DerivativesHelper.GetStrikeStepAsync(underlyingAsset, provider, expirationDate, cancellationToken)
To get the strike step size.
- underlyingAsset
- Underlying asset.
- provider
- The provider of information about instruments.
- expirationDate
- The options expiration date (to specify a particular series).
- cancellationToken
- CancellationToken
Retorna: The strike step size.
public static decimal GetTimeValue(Security option, decimal currentPrice, decimal assetPrice)
result = DerivativesHelper.GetTimeValue(option, currentPrice, assetPrice)
Para obter o valor da opção cronometrada.
- option
- Contrato de opções.
- currentPrice
- O preço do contrato.
- assetPrice
- O preço do activo subjacente.
Retorna: O valor cronometrado.
public static Security GetUnderlyingAsset(Security derivative, ISecurityProvider provider)
result = DerivativesHelper.GetUnderlyingAsset(derivative, provider)
Para obter o ativo subjacente pela derivada.
- derivative
- A derivada.
- provider
- O fornecedor de informações sobre instrumentos.
Retorna: - Um activo subjacente.
public static ValueTask<Security> GetUnderlyingAssetAsync(Security derivative, ISecurityProvider provider, CancellationToken cancellationToken)
result = DerivativesHelper.GetUnderlyingAssetAsync(derivative, provider, cancellationToken)
To get the underlying asset by the derivative.
- derivative
- The derivative.
- provider
- The provider of information about instruments.
- cancellationToken
- CancellationToken
Retorna: Underlying asset.
public static QuoteChangeMessage ImpliedVolatility(IOrderBookMessage depth, ISecurityProvider securityProvider, IMarketDataProvider dataProvider, DateTime currentTime, decimal riskFree, decimal dividend)
result = DerivativesHelper.ImpliedVolatility(depth, securityProvider, dataProvider, currentTime, riskFree, dividend)
Para criar o livro de ordem de volatilidade do livro de ordem habitual.
- depth
- As citações do livro de ordem das quais serão alteradas para as citações de volatilidade.
- securityProvider
- O fornecedor de informações sobre instrumentos.
- dataProvider
- O fornecedor de dados de mercado.
- currentTime
- A hora atual.
- riskFree
- A taxa de juro livre de risco.
- dividend
- O montante dos dividendos sobre as acções.
Retorna: A volatilidade do livro de ordens.
public static QuoteChangeMessage ImpliedVolatility(IOrderBookMessage depth, IBlackScholes model, DateTime currentTime)
result = DerivativesHelper.ImpliedVolatility(depth, model, currentTime)
Para criar o livro de ordem de volatilidade do livro de ordem habitual.
- depth
- As citações do livro de ordem das quais serão alteradas para as citações de volatilidade.
- model
- O modelo para calcular os valores gregos pela fórmula de Black-Scholes.
- currentTime
- A hora atual.
Retorna: A volatilidade do livro de ordens.
public static decimal? ImpliedVolatility(decimal premium, Func<decimal, decimal?> getPremium)
result = DerivativesHelper.ImpliedVolatility(premium, getPremium)
Para calcular a volatilidade implícita.
- premium
- O prémio de opção.
- getPremium
- Para calcular o prémio pela volatilidade.
Retorna: Se o valor for igual a , então o cálculo de valor atualmente é impossível.
public static ValueTask<QuoteChangeMessage> ImpliedVolatilityAsync(IOrderBookMessage depth, ISecurityProvider securityProvider, IMarketDataProvider dataProvider, DateTime currentTime, decimal riskFree, decimal dividend, CancellationToken cancellationToken)
result = DerivativesHelper.ImpliedVolatilityAsync(depth, securityProvider, dataProvider, currentTime, riskFree, dividend, cancellationToken)
To create the volatility order book from usual order book.
- depth
- The order book quotes of which will be changed to volatility quotes.
- securityProvider
- The provider of information about instruments.
- dataProvider
- The market data provider.
- currentTime
- The current time.
- riskFree
- The risk free interest rate.
- dividend
- The dividend amount on shares.
- cancellationToken
- CancellationToken
Retorna: The order book volatility.
public static OptionTypes Invert(OptionTypes type)
result = DerivativesHelper.Invert(type)
Para alterar o tipo de opção para o oposto.
- type
- O valor inicial.
Retorna: O valor oposto.
public static bool IsExpired(Security security, IExchangeInfoProvider exchangeInfoProvider, DateTime currentTime)
result = DerivativesHelper.IsExpired(security, exchangeInfoProvider, currentTime)
Para verificar se o instrumento terminou a ação.
- security
- Instrumento financeiro.
- exchangeInfoProvider
- Bolsas e conselhos de negociação provedor.
- currentTime
- A hora atual.
Retorna: Se o instrumento tiver terminado a sua acção.
public static decimal Premium(OptionTypes optionType, decimal strike, decimal assetPrice, decimal riskFree, decimal dividend, decimal deviation, double timeToExp, double d1)
result = DerivativesHelper.Premium(optionType, strike, assetPrice, riskFree, dividend, deviation, timeToExp, d1)
Para calcular o prémio de opção.
- optionType
- Tipo de opção.
- strike
- O preço de greve.
- assetPrice
- - O preço dos activos subjacentes.
- riskFree
- A taxa de juro livre de risco.
- dividend
- O montante dos dividendos sobre as acções.
- deviation
- Desvio padrão.
- timeToExp
- O período de opção antes do termo.
- d1
- O parâmetro d1 da estimativa de probabilidade de preenchimento da opção.
Retorna: O prémio de opção.
public static decimal Rho(OptionTypes optionType, decimal strike, decimal assetPrice, decimal riskFree, decimal deviation, double timeToExp, double d1)
result = DerivativesHelper.Rho(optionType, strike, assetPrice, riskFree, deviation, timeToExp, d1)
Para calcular a opção rho.
- optionType
- Tipo de opção.
- strike
- O preço de greve.
- assetPrice
- - O preço dos activos subjacentes.
- riskFree
- A taxa de juro livre de risco.
- deviation
- Desvio padrão.
- timeToExp
- O período de opção antes do termo.
- d1
- O parâmetro d1 da estimativa de probabilidade de preenchimento da opção.
Retorna: Opção Rho.
public static decimal Theta(OptionTypes optionType, decimal strike, decimal assetPrice, decimal riskFree, decimal deviation, double timeToExp, double d1, decimal daysInYear)
result = DerivativesHelper.Theta(optionType, strike, assetPrice, riskFree, deviation, timeToExp, d1, daysInYear)
Para calcular a opção theta.
- optionType
- Tipo de opção.
- strike
- O preço de greve.
- assetPrice
- - O preço dos activos subjacentes.
- riskFree
- A taxa de juro livre de risco.
- deviation
- Desvio padrão.
- timeToExp
- O período de opção antes do termo.
- d1
- O parâmetro d1 da estimativa de probabilidade de preenchimento da opção.
- daysInYear
- Dias por ano.
Retorna: Opção theta.
public static decimal Theta(OptionTypes optionType, decimal strike, decimal assetPrice, decimal riskFree, decimal dividend, decimal deviation, double timeToExp, double d1, decimal daysInYear)
result = DerivativesHelper.Theta(optionType, strike, assetPrice, riskFree, dividend, deviation, timeToExp, d1, daysInYear)
To calculate the option theta with a continuous dividend yield.
- optionType
- Option type.
- strike
- The strike price.
- assetPrice
- Underlying asset price.
- riskFree
- The risk free interest rate.
- dividend
- The continuous dividend yield.
- deviation
- Standard deviation.
- timeToExp
- The option period before the expiration.
- d1
- The d1 parameter of the option fulfilment probability estimating.
- daysInYear
- Days per year.
Retorna: Option theta.
public static decimal Vega(decimal assetPrice, double timeToExp, double d1)
result = DerivativesHelper.Vega(assetPrice, timeToExp, d1)
Para calcular a opção vega.
- assetPrice
- - O preço dos activos subjacentes.
- timeToExp
- O período de opção antes do termo.
- d1
- O parâmetro d1 da estimativa de probabilidade de preenchimento da opção.
Retorna: Opção vega.