Dual Gamma
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})\] \[d_{2} = d_{1} - \sigma \cdot \sqrt{t}\] \[\text{Dual Gamma} = e ^{- r \cdot t} \cdot N'(d_{2}) / (K \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’(d2) is the standard normal probability density at d2 and N(d1) is the cumulative normal distribution of d1. Note that Dual Gamma is a second derivative with respect to the strike price, so it is the strike and not the stock price that appears in the denominator.
Note that the dual gamma of a call option and put option are equal to each other.
Also known as: cash gamma, binary option gamma.
No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Dual Gamma for you. Just ask in plain English.
Calculate the Dual Gamma in Python
The Dual Gamma is available in the Options module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_dual_gamma as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(["AAPL", "ASML"], api_key="FINANCIAL_MODELING_PREP_KEY")
toolkit.options.get_dual_gamma().loc["AAPL"]
Which returns:
| Strike Price | 2026-07-24 | 2026-07-25 | 2026-07-26 | 2026-07-27 | 2026-07-28 | 2026-07-29 | 2026-07-30 | 2026-07-31 |
|---|---|---|---|---|---|---|---|---|
| 335 | 0.0084 | 0.0085 | 0.0085 | 0.0086 | 0.0087 | 0.0087 | 0.0088 | 0.0088 |
| 340 | 0.0061 | 0.0062 | 0.0064 | 0.0065 | 0.0066 | 0.0067 | 0.0068 | 0.0069 |
| 345 | 0.0042 | 0.0044 | 0.0046 | 0.0047 | 0.0048 | 0.005 | 0.0051 | 0.0052 |
| 350 | 0.0028 | 0.003 | 0.0031 | 0.0033 | 0.0034 | 0.0036 | 0.0037 | 0.0038 |
| 355 | 0.0018 | 0.0019 | 0.0021 | 0.0022 | 0.0023 | 0.0025 | 0.0026 | 0.0027 |
| 360 | 0.0011 | 0.0012 | 0.0013 | 0.0014 | 0.0015 | 0.0016 | 0.0018 | 0.0019 |
| 365 | 0.0006 | 0.0007 | 0.0008 | 0.0009 | 0.001 | 0.0011 | 0.0012 | 0.0012 |
| 370 | 0.0004 | 0.0004 | 0.0005 | 0.0005 | 0.0006 | 0.0007 | 0.0007 | 0.0008 |
| 375 | 0.0002 | 0.0002 | 0.0003 | 0.0003 | 0.0004 | 0.0004 | 0.0005 | 0.0005 |
| 380 | 0.0001 | 0.0001 | 0.0002 | 0.0002 | 0.0002 | 0.0002 | 0.0003 | 0.0003 |
Parameters
get_dual_gamma 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 current dividend yield.
- 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.
Related Second-Order Greeks
The Options module page introduces the module, and the sidebar lists all of its functions.