Calculate all Greeks of an option based on the Black Scholes Model. This will return the following Greeks per Strike Price and Expiration Date:

First Order Greeks:

  • Delta: measures the rate of change of the theoretical option value with respect to changes in the underlying asset’s price.
  • Dual Delta: the first derivative of the option price with respect to the strike price. Up to the discount factor and a sign it is the risk-neutral probability of the option finishing in the money, negative for a call and positive for a put.
  • Vega: measures sensitivity to volatility. Vega is the derivative of the option value with respect to the volatility of the underlying asset.
  • Theta: measures the sensitivity of the value of the derivative to the passage of time, the “time decay.”
  • Rho: measures sensitivity to the interest rate: it is the derivative of the option value with respect to the risk-free interest rate (for the relevant outstanding term).
  • Epsilon: measures the percentage change in option value per percentage change in the underlying dividend yield, a measure of the dividend risk.
  • Lambda: measures the percentage change in option value per percentage change in the underlying price, a measure of leverage, sometimes called gearing. This greek is also sometimes called Omega or Elasticity.

Second Order Greeks:

  • Gamma: measures the rate of change in the delta with respect to changes in the underlying price. Gamma is the second derivative of the value function with respect to the underlying price.
  • Dual Gamma: the second derivative of the option value with respect to the strike price rather than the underlying price. It is the discounted risk-neutral probability density of the underlying at expiration.
  • Vanna: also referred to as DvegaDspot and DdeltaDvol, is a second-order derivative of the option value, once to the underlying spot price and once to volatility.
  • Charm: Charm or delta decay measures the instantaneous rate of change of delta over the passage of time.
  • Vomma: also referred to as volga, vega convexity, or DvegaDvol measures second-order sensitivity to volatility. Vomma is the second derivative of the option value with respect to the volatility, or, stated another way, vomma measures the rate of change to vega as volatility changes.
  • Veta: also referred to as DvegaDtime, measures the rate of change in the vega with respect to the passage of time. Veta is the second derivative of the value function; once to volatility and once to time.
  • Vera: also referred to as rhova, measures the rate of change in rho with respect to volatility. Vera is the second derivative of the value function; once to volatility and once to interest rate.
  • Partial Derivative: measures the rate of change in the option price with respect to the strike price.

Third Order Greeks:

  • Speed: measures the rate of change in Gamma with respect to changes in the underlying price.
  • Zomma: measures the rate of change of Gamma with respect to changes in volatility.
  • Color: also referred to as gamma decay or DgammaDtime measures the rate of change of gamma over the passage of time.
  • Ultima: measures the sensitivity of the option vomma with respect to change in volatility.

For a deeper explanation, please have a look at: https://en.wikipedia.org/wiki/Greeks_(finance) and the references to the literature as found on this page.

By default the most recent risk free rate, dividend yield and stock price is used, you can alter this by changing the start date. The volatility is calculated based on the daily returns of the stock price and the selected period (this can be altered by defining this accordingly when defining the Toolkit class, start_date and end_date).

Collect All Greeks in Python

collect_all_greeks is part of the Options module of the open-source Finance Toolkit. Install it with:

pip install financetoolkit -U

Then call collect_all_greeks as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(["TSLA", "MU"], api_key="FINANCIAL_MODELING_PREP_KEY")

all_greeks = toolkit.options.collect_all_greeks(start_date='2024-01-03')

all_greeks.loc['TSLA', '2024-01-04']

Which returns:

Strike Price Delta Dual Delta Vega Theta Rho Epsilon Lambda Gamma Dual Gamma Vanna Charm Vomma Vera Veta PD Speed Zomma Color Ultima
215 0.9998 -0.9997 0.0001 -0.0254 0.0059 -0.6532 0.1016 0.0001 0.0001 -0.0044 0.4426 0.1942 -0.0029 77.6496 0.0001 -0.0001 0.0021 0.209 0.0336
220 0.9973 -0.9969 0.001 -0.0526 0.006 -0.6515 0.1287 0.0012 0.0014 -0.0414 4.1955 1.4351 -0.0273 600.92 0.0014 -0.0005 0.0144 1.4569 0.1196
225 0.9777 -0.976 0.0066 -0.2079 0.006 -0.6387 0.1723 0.0076 0.0086 -0.1884 19.0888 4.7244 -0.1249 2187.89 0.0086 -0.0022 0.0407 4.1228 0.0829
230 0.8953 -0.8898 0.0226 -0.6528 0.0056 -0.5849 0.2419 0.0261 0.028 -0.3993 40.3564 6.2557 -0.267 3816.31 0.028 -0.0048 0.0253 2.5239 -0.1641
235 0.6978 -0.6874 0.0435 -1.2304 0.0044 -0.4558 0.3442 0.0502 0.0516 -0.306 30.653 1.9785 -0.2119 3623.7 0.0516 -0.0039 -0.0672 -6.8719 -0.0977
240 0.4192 -0.4078 0.0488 -1.3691 0.0027 -0.2739 0.4789 0.0562 0.0555 0.1634 -17.1438 0.4159 0.0934 3407.79 0.0555 0.0014 -0.096 -9.7512 -0.0222
245 0.1812 -0.1736 0.0329 -0.9207 0.0012 -0.1184 0.6396 0.0379 0.0359 0.4445 -45.5549 5.0536 0.2814 4080.87 0.0359 0.0048 -0.0098 -0.9474 -0.1945
250 0.0544 -0.0513 0.0138 -0.3848 0.0004 -0.0355 0.8183 0.0159 0.0144 0.3232 -33.01 6.468 0.2073 3328.37 0.0144 0.0036 0.0461 4.7176 -0.0443
255 0.0112 -0.0104 0.0037 -0.1028 0.0001 -0.0073 1.0084 0.0042 0.0037 0.1223 -12.477 3.4845 0.0789 1542.52 0.0037 0.0014 0.0325 3.3216 0.1424
260 0.0016 -0.0015 0.0006 -0.018 0 -0.001 1.205 0.0007 0.0006 0.0276 -2.8148 1.0161 0.0179 421.028 0.0006 0.0003 0.0104 1.0578 0.1054
265 0.0002 -0.0001 0.0001 -0.0021 0 -0.0001 1.4049 0.0001 0.0001 0.004 -0.4041 0.1783 0.0026 71.3544 0.0001 0 0.0019 0.1933 0.0322

Parameters

collect_all_greeks accepts the following parameters:

  • start_date (str | None, optional): The start date which determines the stock price. Defaults to None which means it will use the most recent date.
  • strike_price_range (float): The percentage range to use for the strike prices. Defaults to 0.25 which equals 25% and thus results in strike prices from 75 to 125 if the current stock price is 100.
  • strike_step_size (int): The step size to use for the strike prices. Defaults to 5 which means that the strike prices will be 75, 80, 85, 90, 95, 100, 105, 110, 115 and 120 if the current stock price is 100.
  • expiration_time_range (int): The number of days to use for the time to expiration. Defaults to 30 which equals 30 days.
  • risk_free_rate (float, optional): The risk free rate to use for the calculation. Defaults to None which means it will use the current risk free rate.
  • dividend_yield (float, optional): The dividend yield to use for the calculation. Defaults to None which means it will use the dividend yield as obtained through annual historical data.
  • put_option (bool, optional): Whether to calculate the put option delta. Defaults to False which means it will calculate the call option delta.
  • show_input_info (bool, optional): Whether to show the input information. Defaults to False.
  • rounding (int | None, optional): The number of decimals to round the results to. Defaults to 4.
  • standardize (bool, optional): Whether to standardize (Z-Score) the result across the time to expiration columns for each ticker and strike price. Defaults to False.
Share