Options Greeks and pricing calculations using the Black-Scholes model.

Constructors

Methods

  • Calculates the fair value of a European call option using the Black-Scholes model.

    Parameters

    • type: TypeOfOption

      The type of option (either 'call' or 'put').

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration.

    Returns number

    The fair value of the option.

  • Calculates the Charm of an option, which measures the rate of change of Delta over the passage of time. Charm, also known as delta decay, is particularly useful when delta-hedging over periods where time decay is relevant.

    Parameters

    • type: TypeOfOption

      The type of option (either 'call' or 'put').

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield of the underlying asset.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration of the option, in years.

    Returns number

    The charm of the option, representing the rate of change of delta over time.

    Charm is a second-order derivative of the option value, once to the price and once to the passage of time. It is the partial derivative of theta with respect to the underlying's price. This Greek is essential for monitoring the effectiveness of delta-hedging strategies, especially over weekends or other periods without trading.

  • Calculates the Color of a European option, which measures the rate of change of Gamma with respect to the passage of time.

    Parameters

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield of the underlying asset.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration of the option, in years.

    Returns number

    The color of the option.

  • Calculates the d1 component used in the Black-Scholes formula.

    Parameters

    • st: number

      The spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration.

    Returns number

    The d1 value.

  • Calculates the d2 component used in the Black-Scholes formula.

    Parameters

    • d1: number

      The d1 value calculated from calculateD1.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration.

    Returns number

    The d2 value.

  • Calculates the Delta (Δ) of a European option using the Black-Scholes model. Delta measures the rate of change of the theoretical option value with respect to changes in the underlying asset's price.

    Parameters

    • type: TypeOfOption

      The type of option (either 'call' or 'put').

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield of the underlying asset.

    • sigma: number

      The volatility of the asset.

    • tau: number

      Time to expiration of the option, in years.

    Returns number

    The delta of the option. For a call option, delta ranges between 0 and 1, and for a put option, it ranges between -1 and 0.

    Practical use of delta includes understanding the equivalent stock position in an option. For example, a delta of 0.5 suggests that the option's price will move $0.50 for every $1 move in the underlying asset. Delta is also used for hedging strategies, where a position can be delta-hedged by taking positions in the underlying asset.

  • Calculates the Dual Delta of a European option, which measures the sensitivity of the option's price to changes in the strike price. Dual Delta is important for understanding how the option's price will change as the strike price is adjusted, holding the underlying asset's price fixed.

    Parameters

    • type: TypeOfOption

      The type of option (either 'call' or 'put').

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield of the underlying asset.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration of the option, in years.

    Returns number

    The dual delta of the option.

  • Calculates the Dual Gamma of a European option, which measures the rate of change of the option's Dual Delta with respect to changes in the strike price. Dual Gamma provides insight into the convexity of the option's value with respect to the strike price.

    Parameters

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield of the underlying asset.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration of the option, in years.

    Returns number

    The dual gamma of the option.

  • Calculates the Epsilon (ε) of a European option, which measures the sensitivity of the option's price to a change in the underlying asset's dividend yield.

    Parameters

    • type: TypeOfOption

      The type of option (either 'call' or 'put').

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield of the underlying asset.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration of the option, in years.

    Returns number

    The epsilon of the option, representing the sensitivity to the dividend yield.

    Epsilon is a lesser-known Greek that indicates the rate of change of the option's price relative to the dividend yield of the underlying asset. It is particularly useful for options on assets with high dividend yields. A positive epsilon for a call option suggests that its price increases with a decrease in dividend yield, while a negative epsilon indicates the price decreases as the dividend yield rises.

  • Calculates the Gamma (Γ) of a European option using the Black-Scholes model. Gamma measures the rate of change of the option's delta with respect to changes in the underlying asset's price.

    Parameters

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield of the underlying asset.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration of the option, in years.

    Returns number

    The gamma of the option.

    Gamma is used to measure the curvature of the value of an option relative to the underlying asset's price. It is highest for at-the-money options and decreases as the option becomes more in-the-money or out-of-the-money. Gamma is important for understanding the stability of an option's Delta, as well as the potential for an option's price to move in relation to movements in the underlying asset.

  • Calculates the Lambda (Λ), also known as elasticity or omega, of a European option. Lambda measures the percentage change in option value per percentage change in the underlying asset price.

    Parameters

    • type: TypeOfOption

      The type of option ('call' or 'put').

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield of the underlying asset.

    • sigma: number

      The volatility of the asset's returns.

    • tau: number

      The time to expiration of the option, in years.

    Returns number

    The lambda (elasticity) of the option.

    Lambda is a measure of leverage indicating how much the value of an option will change in response to a 1% change in the price of the underlying asset. It is similar to Delta but expressed in percentage terms.

  • Calculates the cumulative distribution function for the standard normal distribution.

    Parameters

    • x: number

      The value to calculate the CDF for.

    Returns number

    The CDF of the standard normal distribution at x.

  • Calculates the probability density function (pdf) of the asset price in the Black-Scholes model at strike price K. This is used in the calculation of various option Greeks and is also sometimes referred to as 'phi' or 'ϕ'.

    Parameters

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield of the underlying asset.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration of the option, in years.

    Returns number

    The value of the pdf at the strike price.

  • Calculates the Rho of a European option, which measures the sensitivity of the option's price to changes in the risk-free interest rate.

    Parameters

    • type: TypeOfOption

      The type of option (either 'call' or 'put').

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield of the underlying asset.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration of the option, in years.

    Returns number

    The rho of the option. It is expressed as the amount of money, per share of the underlying, that the value of the option will gain or lose as the risk-free interest rate rises or falls by 1 basis point per annum.

    Rho is typically the least sensitive of the Greeks and is often overlooked by traders. However, in environments where interest rate shifts are expected, understanding rho can be crucial. It is particularly relevant for longer-term options where a shift in interest rates could have a more pronounced effect on the option's value.

  • Calculates the implied volatility, or sigma, of an option using the Brent method.

    Parameters

    • type: TypeOfOption

      The type of option: 'call' for a call option or 'put' for a put option.

    • marketPrice: number

      The current market price of the option.

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate, expressed as a decimal.

    • q: number

      The dividend yield of the underlying asset, expressed as a decimal.

    • T: number

      The time to expiration of the option, in years.

    Returns number

    The implied volatility as a decimal.

  • Calculates the Speed of a European option, which measures the rate of change of Gamma with respect to changes in the underlying asset's price.

    Parameters

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield of the underlying asset.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration of the option, in years.

    Returns number

    The speed of the option.

  • Calculates the time to expiration for an option.

    Parameters

    • T: number

      The expiration time of the option.

    • t: number

      The current time.

    Returns number

    The time remaining until the option's expiration, in years.

  • Calculates the theta (Θ) of a European option, which measures the rate of change of the option's price with respect to the passage of time, also known as time decay.

    Parameters

    • type: TypeOfOption

      The type of option (call or put).

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration in years.

    Returns number

    The theta value of the option. Theta is typically negative since options lose value as time passes.

  • Calculates the Ultima of a European option, which measures the sensitivity of the option's Vega to changes in volatility. Ultima is a third-order Greek that gives the rate of change of Vomma with respect to changes in volatility.

    Parameters

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield of the underlying asset.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration of the option, in years.

    Returns number

    The ultima of the option.

  • Calculates the Vanna of a European option, a second-order derivative that measures the sensitivity of the option's delta to changes in the underlying asset's volatility, and vice versa. It's an important measure for assessing the risk and hedging strategies related to changes in volatility and the underlying asset price.

    Parameters

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield of the underlying asset.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration of the option, in years.

    Returns number

    The vanna of the option, which represents the rate of change of delta with respect to volatility.

    Vanna is useful for traders who maintain delta- or vega-hedged portfolios as it helps to anticipate how the hedge might perform as volatility changes or as the underlying asset price changes. It is calculated by taking the partial derivative of vega with respect to the underlying asset price, which is also equal to the partial derivative of delta with respect to volatility.

  • Calculates the Vega of a European option, which measures the sensitivity of the option's price to changes in the volatility of the underlying asset. Vega represents the amount the option's price changes for a 1 percentage point change in the volatility.

    Parameters

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield of the underlying asset.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration of the option, in years.

    Returns number

    The Vega of the option, expressed as the amount the option's price will change per 1 percentage point change in volatility.

  • Calculates the Veta of a European option, which measures the rate of change in the option's vega with respect to the passage of time. Veta is the second derivative of the option value function with respect to volatility and time.

    Parameters

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield of the underlying asset.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration of the option, in years.

    Returns number

    The veta of the option, representing the sensitivity of vega to the passage of time.

    Veta is useful for understanding how the option's sensitivity to volatility (vega) changes as time passes. This can be particularly important in dynamic hedging strategies where the passage of time affects the effectiveness of a vega hedge. It is often used in conjunction with theta to manage the time and volatility decay of an option's price.

  • Calculates the Vomma of a European option, which measures the rate of change of Vega with respect to changes in volatility.

    Parameters

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield of the underlying asset.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration of the option, in years.

    Returns number

    The vomma of the option.

    Vomma is a second-order Greek that measures the convexity of Vega. A positive vomma indicates that an option's Vega will increase as volatility increases, suggesting that the option's price is becoming more sensitive to changes in volatility. This is analogous to having a long gamma position. Vomma is particularly important for traders managing large portfolios of options, where volatility risk can have a significant impact on the overall value.

  • Calculates the Zomma of a European option, which measures the rate of change of Gamma with respect to changes in volatility.

    Parameters

    • st: number

      The current spot price of the underlying asset.

    • K: number

      The strike price of the option.

    • r: number

      The risk-free interest rate.

    • q: number

      The dividend yield of the underlying asset.

    • sigma: number

      The volatility of the asset.

    • tau: number

      The time to expiration of the option, in years.

    Returns number

    The zomma of the option.

Generated using TypeDoc