Color
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.
This expression equals dGamma/dt, the change in Gamma as calendar time passes (the negative of the derivative with respect to the remaining time to maturity t), so Color, like Theta, Charm and Veta, measures the change per unit of time that passes. Tables that print the expression with a leading minus sign give the derivative with respect to the time to maturity instead. 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.
Color in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_color as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(
["PEP"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2025-01-01",
end_date="2025-12-31",
)
toolkit.options.get_color(
strike_price_range=0.15, strike_step_size=5
).loc["PEP", ["2026-01-07", "2026-01-14", "2026-01-28"]]
Or, after setting up the Finance Toolkit MCP, ask:
What was the color of PepsiCo's call options at the end of 2025 for the expiries of 7, 14 and 28 January 2026, for strikes within 15% of the share price in $5 steps?
Which returns:
| Strike Price | 2026-01-07 | 2026-01-14 | 2026-01-28 |
|---|---|---|---|
| 120 | 0 | -0.0035 | -0.0323 |
| 125 | -0.0026 | -0.0527 | -0.0911 |
| 130 | -0.1387 | -0.2563 | -0.1154 |
| 135 | -0.9333 | -0.2703 | 0.0108 |
| 140 | 0.6313 | 0.475 | 0.2228 |
| 145 | 1.9641 | 0.7561 | 0.279 |
| 150 | -0.8506 | 0.0102 | 0.1184 |
| 155 | -0.6021 | -0.3776 | -0.0689 |
| 160 | -0.0689 | -0.2173 | -0.1354 |
Parameters
get_color accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
start_date | str | None | The 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_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. | 0.1 |
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. | 1 |
expiration_time_range | int | The 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_rate | float | The 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_yield | float | The dividend yield to use for the calculation. Defaults to None which means it will use the current dividend yield. | 0.02 |
show_input_info | bool | Whether to show the input information. Defaults to False. | True |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
standardize | bool | Whether to standardize (Z-Score) the result across the time to expiration columns for each ticker and strike price. Defaults to False. | True |