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

  • 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.

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).

First-Order Greeks in Python

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

pip install financetoolkit -U

Then call collect_first_order_greeks as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(["AAPL", "ASML"], api_key="FINANCIAL_MODELING_PREP_KEY")

toolkit.options.collect_first_order_greeks().loc["AAPL"]

Which returns:

Strike Price (Period(‘2026-07-30’, ‘D’), ‘Lambda’) (Period(‘2026-07-31’, ‘D’), ‘Delta’) (Period(‘2026-07-31’, ‘D’), ‘Dual Delta’) (Period(‘2026-07-31’, ‘D’), ‘Vega’) (Period(‘2026-07-31’, ‘D’), ‘Theta’) (Period(‘2026-07-31’, ‘D’), ‘Rho’) (Period(‘2026-07-31’, ‘D’), ‘Epsilon’) (Period(‘2026-07-31’, ‘D’), ‘Lambda’)
335 26.7813 0.1578 -0.1398 0.2098 -0.1024 3.7223 -3.8704 26.1311
340 28.778 0.1151 -0.1008 0.169 -0.082 2.7225 -2.8231 28.0524
345 30.8033 0.0818 -0.0707 0.1315 -0.0636 1.9387 -2.0055 30.001
350 32.8506 0.0566 -0.0484 0.099 -0.0477 1.3449 -1.3883 31.9708
355 34.914 0.0382 -0.0322 0.0722 -0.0347 0.9095 -0.9371 33.9561
360 36.9886 0.0252 -0.021 0.0511 -0.0245 0.5999 -0.6171 35.9523
365 39.0699 0.0162 -0.0133 0.0352 -0.0168 0.3863 -0.3968 37.955
370 41.1542 0.0102 -0.0083 0.0235 -0.0112 0.243 -0.2492 39.9609
375 43.2383 0.0062 -0.005 0.0153 -0.0073 0.1494 -0.1531 41.9667
380 45.3195 0.0038 -0.003 0.0097 -0.0046 0.0899 -0.092 43.97

Parameters

collect_first_order_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