Greeks: Computes the Greeks of various options in the Black Scholes...

View source: R/Greeks.R

GreeksR Documentation

Computes the Greeks of various options in the Black Scholes model or both in the Black Scholes model or a Jump Diffusion model in the case of Asian Options, or in the Binomial options pricing model

Description

Greeks are derivatives of the option value with respect to underlying parameters. For instance, the Greek \Delta = \frac{\partial \text{fair\_value}}{\partial \text{initial\_price}} (Delta) measures how the price of an option changes with a minor change in the underlying asset's price, while \Gamma = \frac{\partial \text{fair\_value}}{\partial \text{initial\_price}} (Gamma) measures how \Delta itself changes as the price of the underlying asset shifts. Greeks can be computed for different types of options: For

  • European Greeks see also BS_European_Greeks and Malliavin_European_Greeks

  • American Greeks see also Binomial_American_Greeks

  • Asian Greeks see also BS_Malliavin_Asian_Greeks and Malliavin_Asian_Greeks

  • Geometric Asian Greeks see also BS_Geometric_Asian_Greeks and Malliavin_Asian_Greeks

The Greeks are defined as the following partial derivatives of the option value:

  • Delta = \Delta = \frac{\partial \text{fair\_value}}{\partial \text{initial\_price}}, the derivative with respect to the price of the underlying asset

  • Vega = \mathcal{V} = \frac{\partial \text{fair\_value}}{\partial \text{volatility}}, the derivative with respect to the volatility

  • Theta = \Theta = -\frac{\partial \text{fair\_value}}{\partial \text{time\_to\_maturity}}, the negative derivative with respect to the time until expiration of the option

  • rho = \rho = \frac{\partial \text{fair\_value}}{\partial r}, the derivative with respect to the risk-free interest rate

  • Epsilon = \epsilon = \frac{\partial \text{fair\_value}}{\partial \text{time\_to\_maturity}}, the derivative with respect to the dividend yield of the underlying asset

  • Lambda = \lambda = \Delta \times \frac{\text{initial\_price}}{\text{exercise\_price}}

  • Gamma = \Gamma = \frac{\partial^2 \text{fair\_value}}{\partial \text{initial\_price}^2}, the second derivative with respect to the price of the underlying asset

  • Vanna = \frac{\partial \Delta}{\partial \text{volatility}} = \frac{\partial^2 \text{fair\_value}}{\partial \text{intial\_price} \, \partial \text{volatility}}, the derivative of \Delta with respect to the volatility

  • Vomma = \frac{\partial^2 \text{fair\_value}}{\partial \text{volatility}^2}, the second derivative with respect to the volatility

  • Veta = \frac{\partial \mathcal V}{\partial r} = \frac{\partial^2 \text{fair\_value}}{\partial \text{volatility} \, \partial \text{time\_to\_maturity}}, the derivative of \mathcal V with respect to the time until expiration of the option

  • Vera = \frac{\partial^2 \text{fair\_value}}{\partial \text{volatiliy} \, \partial \text{r}}, the derivative of \mathcal V with respect to the risk-free interest rate

  • Speed = \frac{\partial \Gamma}{\partial \text{initial\_price}} = \frac{\partial^3 \text{fair\_value}}{\partial \text{initial\_price}^3}, the third derivative of the option value with respect to the price of the underlying asset

  • Zomma = \frac{\Gamma}{\text{volatility}} = \frac{\partial^3 \text{fair\_value}}{\partial \text{volatility}^3}, the derivative of Gamma with respect to the volatility

  • Color = \frac{\partial \Gamma}{\partial \text{r}} = \frac{\partial^3 \text{fair\_value}}{\partial \text{initial\_price}^2 \partial \text{r}}, the derivative of Gamma with respect to the risk-free interest rate

  • Ultima = \frac{\partial \text{Vomma}}{\partial \text{volatility}} = \frac{\partial^3 \text{fair\_value}}{\partial \text{volatility}^3}, the third derivative with respect to the volatility

Greeks computes Greeks for the following option types:

  • European put- and call options, which give to option holder the right but not the obligation to sell (resp. buy) the underlying asset for a specific price at a specific date. If $K$ is the exercise price, and S_T the value of the underlying asset at time-to-maturity T, a European options pay off the following amount at expiration:

    • \max\{K - S_T, 0\} for a put-option

    • \max\{S_T - K, 0\} for a call-option

  • American put- and call options are like European options, but allow the holder to exercise at any time until expiration

  • European cash-or-nothing put- and call options provide the holder with a fixed amount of cash, if the value of the underlying asset is below (resp. above) a certain strike price

  • European asset-or-nothing put- and call options are similar to cash-or-nothing options, but provide the holder with one share of the asset.

  • Asian put- and call options have a similar payoff to European put- and call options but differ from European options in that they are path dependent. Not the price S_T of the underlying asset at time-to-maturity T is evaluated, but the arithmetic average \frac{1}{T} \int_0^T S_t dt. We get the payoffs

    • \max\{K - \frac{1}{T} \int_0^T S_t dt, 0\} for an Asian put-option

    • \max\{\frac{1}{T} \int_0^T S_t dt - K, 0\} for an Asian call-option

  • Geometric Asian options differ from Asian options in that the geometric average \exp \left( \frac{1}{T} \int_0^T \ln S_t dt \right) is evaluated.

For reference see Hull (2022) or

en.wikipedia.org/wiki/Greeks_(finance).

Usage

Greeks(
  initial_price,
  exercise_price,
  r,
  time_to_maturity,
  volatility,
  dividend_yield = 0,
  model = "Black_Scholes",
  option_type = "European",
  payoff = "call",
  greek = c("fair_value", "delta", "vega", "theta", "rho", "gamma"),
  antithetic = TRUE,
  ...
)

Arguments

initial_price
  • initial price of the underlying asset

exercise_price
  • strike price of the option

r
  • risk-free interest rate

time_to_maturity
  • time to maturity in years

volatility
  • volatility of the underlying asset

dividend_yield
  • dividend yield

model
  • the model to be chosen in ("black_scholes", "jump_diffusion")

option_type

in c("European", "American", "Asian", "Geometric Asian", "Digital", "Binomial) - the type of option to be considered

payoff
  • in c("call", "put", "cash_or_nothing_call", "cash_or_nothing_put", "asset_or_nothing_call", "asset_or_nothing_put")

greek
  • Greeks to be calculated in c("fair_value", "delta", "vega", "theta", "rho", "epsilon", "lambda", "gamma", "vanna", "charm", "vomma", "veta", "vera", "speed", "zomma", "color", "ultima")

antithetic
  • if TRUE, antithetic random numbers will be chosen to decrease variance

...
  • ... Other arguments passed on to methods

Value

Named vector containing the values of the Greeks specified in the parameter greek.

References

Hull, J. C. (2022). Options, futures, and other derivatives (11th Edition). Pearson

en.wikipedia.org/wiki/Greeks_(finance)

See Also

BS_European_Greeks for option_type = "European"

Binomial_American_Greeks for option_type = "American"

BS_Geometric_Asian_Greeks for option_type = = "Geometric Asian" and model = "black_scholes"

BS_Malliavin_Asian_Greeks for option_type = = "Asian" and model = "black_scholes" and greek in c("fair_value", "delta", "rho", "vega")

Malliavin_Asian_Greeks for more general cases of Asian Greeks

Greeks_UI for an interactive visualization

Examples

Greeks(initial_price = 100, exercise_price = 120, r = 0.01,
time_to_maturity = 5, volatility = 0.30, payoff = "call")

Greeks(initial_price = 100, exercise_price = 100, r = -0.005,
time_to_maturity = 1, volatility = 0.30, payoff = "put",
option_type = "American")


anselmhudde/greeks documentation built on April 14, 2025, 3:56 p.m.