Calculate the color 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 color is the rate of change of the gamma with respect to time to expiration.

The color calculation is the theoretical value of the color. The actual color 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{Color} = e ^{- q \cdot t} \cdot (N'(d_{1}) / (2 \cdot S \cdot t \cdot \sigma \cdot \sqrt{t})) \cdot (2 \cdot q \cdot t + 1 + ((2 \cdot (r - q) \cdot t - d_{2} \cdot \sigma \cdot \sqrt{t}) / (\sigma \cdot \sqrt{t})) \cdot d_{1})\]

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 and N’(d1) is the standard normal probability density at d1.

The formula as usually published carries a leading minus sign because it differentiates with respect to the time to maturity, which runs opposite to elapsed calendar time. That sign is absorbed here so that Color, like Theta, Charm and Veta, measures the change per unit of time that passes. The result is per year, matching Charm; divide by 365 for gamma decay per calendar day.

The Color can be interpreted as follows:

  • If Color is positive, the option’s Gamma builds up with each day that passes, which is what happens to a near-the-money option as expiration approaches.
  • If Color is negative, the option’s Gamma bleeds away with each day that passes, which is what happens to a strike far from the money that is running out of time to reach it.

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

Also known as: gamma time decay.

No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Color for you. Just ask in plain English.

Calculate the Color in Python

The Color is available in the Options module of the open-source Finance Toolkit. Install it with:

pip install financetoolkit -U

Then call get_color as shown below.

from financetoolkit import Toolkit

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

toolkit.options.get_color().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.045 0.0382 0.0322 0.0269 0.0223 0.0181 0.0145 0.0113
340 0.0712 0.0642 0.0577 0.0519 0.0466 0.0418 0.0375 0.0335
345 0.0817 0.0759 0.0704 0.0653 0.0605 0.056 0.0518 0.0479
350 0.0796 0.0758 0.072 0.0682 0.0646 0.0611 0.0577 0.0545
355 0.0694 0.0676 0.0657 0.0636 0.0614 0.0591 0.0569 0.0546
360 0.0556 0.0555 0.055 0.0544 0.0535 0.0525 0.0514 0.0501
365 0.0415 0.0424 0.0431 0.0434 0.0436 0.0436 0.0433 0.043
370 0.0292 0.0306 0.0318 0.0328 0.0335 0.0341 0.0346 0.0348
375 0.0194 0.0209 0.0223 0.0235 0.0245 0.0255 0.0263 0.0269
380 0.0123 0.0136 0.0149 0.0161 0.0172 0.0182 0.0191 0.0199

Parameters

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

The Options module page introduces the module, and the sidebar lists all of its functions.

Share