Calculate the gamma of an option based on the Black Scholes Model. The Black Scholes Model is a mathematical model used to estimate the price of European-style options. The gamma is the rate of change of the delta with respect to the price of the underlying asset.

The gamma calculation is the theoretical value of the gamma. The actual gamma can differ from this value due to several factors such as the volatility of the underlying asset, the time to expiration, the risk free rate and more.

The formula is as follows:

\[d_{1} = (\ln(S / K) + (r - q + (\sigma ^{2}) / 2) \cdot t) / (\sigma \cdot \sqrt{t})\] \[\text{Gamma} = e ^{- q \cdot t} \cdot N'(d_{1}) / (S \cdot \sigma \cdot \sqrt{t})\]

Where S is the stock price, K is the strike price, r is the risk free rate, q is the dividend yield, σ is the volatility, t is the time to expiration, N’(d1) is the standard normal probability density at d1 and N(d2) is the cumulative normal distribution of d2.

The Gamma can be interpreted as follows:

  • If Gamma is high, it indicates that the option’s Delta is highly sensitive to changes in the underlying asset’s price. The option’s Delta will change more significantly with small movements in the stock price.
  • If Gamma is low, it suggests that the option’s Delta is relatively insensitive to changes in the underlying asset’s price. The option’s Delta changes more gradually with movements in the stock price.

Note that the gamma of a call option and put option are equal to each other.

Gamma is largest for at-the-money options close to expiry, which is where a delta hedge needs the most frequent rebalancing and where a short option position can lose money fastest on a sharp move. Because it is per $1 move in the underlying, it is not comparable across stocks with different prices; risk reports therefore use dollar gamma (Gamma x S^2 / 100, the change in the dollar delta for a 1% move) when they add up gamma across underlyings.

Also known as: rate of change of delta, option convexity.

Gamma in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_gamma as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["PFE"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2025-01-01",
    end_date="2025-12-31",
)

toolkit.options.get_gamma(
    strike_price_range=0.2, strike_step_size=1
).loc["PFE", ["2026-01-07", "2026-01-14", "2026-01-28"]]

Or, after setting up the Finance Toolkit MCP, ask:

What was the gamma of Pfizer's call options at the end of 2025 for the expiries of 7, 14 and 28 January 2026, for strikes within 20% of the share price in $1 steps?

Which returns:

Strike Price 2026-01-07 2026-01-14 2026-01-28
19 0 0 0.0002
20 0 0 0.0022
21 0 0.0012 0.0135
22 0.0013 0.0165 0.0502
23 0.0395 0.0929 0.1195
24 0.2623 0.2399 0.1926
25 0.4395 0.3114 0.2199
26 0.2178 0.2197 0.1852
27 0.0366 0.0903 0.119
28 0.0023 0.0229 0.0601

Parameters

get_gamma accepts the following parameters.

ParameterTypeDescriptionExample
start_datestr | NoneThe date whose price, volatility and rates the values start from; a date without prices (a weekend or a holiday) uses the last trading day before it, and a ticker without a price on that day is left out with a warning. Defaults to None, which uses the last date of the historical data."2021-01-01"
strike_price_rangefloatThe 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.0.1
strike_step_sizeintThe 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.1
expiration_time_rangeintThe number of days to use for the time to expiration: the columns are the expirations 1 up to expiration_time_range - 1 days after the start date. Defaults to 30, which gives expirations of 1 to 29 days.90
risk_free_ratefloatThe risk free rate to use for the calculation. Defaults to None, which uses the Toolkit’s risk-free rate on the pricing date: the 10-year Treasury yield unless the Toolkit’s risk_free_rate parameter selects ‘13w’, ‘5y’ or ‘30y’, converted from its semi-annual bond-equivalent quote to continuous compounding. A rate passed here is used as given, as a continuously compounded rate.0.04
dividend_yieldfloatThe dividend yield to use for the calculation. Defaults to None which means it will use the current dividend yield.0.02
show_input_infoboolWhether to show the input information. Defaults to False.True
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise).2
standardizeboolWhether to standardize (Z-Score) the result across the time to expiration columns for each ticker and strike price. Defaults to False.True
Share