Amit Kumar Jha

Options Greeks Explained: Delta, Gamma, Theta, Vega — With Python Code

Options trading is a cornerstone of quantitative finance. Before pricing exotic derivatives or building a volatility surface, you need to master the Greeks — sensitivity measures that tell you how an option's price changes with respect to underlying parameters.

This post breaks down the four primary Greeks with intuition, formulas, and production-ready Python code.

What Are the Greeks?

The Greeks are partial derivatives of the option pricing model. They measure risk — how your P&L shifts when market conditions change.

Greek Measures Intuition
Delta Sensitivity to spot price How much option price moves per $1 in underlying
Gamma Sensitivity of Delta How fast Delta itself changes
Theta Time decay How much value you lose per day
Vega Volatility sensitivity How much option price changes per 1% vol move

Black-Scholes Greeks: The Formulas

For a European call option under Black-Scholes:

d1=ln⁡(S/K)+(r+σ2/2) TσT,d2=d1−σT d_1 = \frac{\ln(S/K) + (r + \sigma^2/2)\,T}{\sigma\sqrt{T}}, \quad d_2 = d_1 - \sigma\sqrt{T}

The Greeks are:

Δ=N(d1) \Delta = N(d_1)

Γ=N′(d1)S σT \Gamma = \frac{N'(d_1)}{S\,\sigma\sqrt{T}}

Θ=−S N′(d1) σ2T−rKe−rTN(d2) \Theta = -\frac{S\,N'(d_1)\,\sigma}{2\sqrt{T}} - rKe^{-rT}N(d_2)

V=S N′(d1)T \mathcal{V} = S\,N'(d_1)\sqrt{T}

Where N(.) is the standard normal CDF and N'(.) is the PDF.

Python Implementation

import numpy as np
from scipy.stats import norm


def black_scholes_greeks(S, K, T, r, sigma, option_type="call"):
    """
    Calculate Black-Scholes Greeks for European options.

    Parameters:
        S: Current stock price
        K: Strike price
        T: Time to expiry (years)
        r: Risk-free rate
        sigma: Volatility
        option_type: "call" or "put"

    Returns:
        dict with delta, gamma, theta, vega
    """
    d1 = (np.log(S / K) + (r + sigma**2 / 2) * T) / (sigma * np.sqrt(T))
    d2 = d1 - sigma * np.sqrt(T)

    nd1 = norm.cdf(d1)
    npdf_d1 = norm.pdf(d1)
    nd2 = norm.cdf(d2)

    # Delta
    delta = nd1 if option_type == "call" else nd1 - 1

    # Gamma (same for calls and puts)
    gamma = npdf_d1 / (S * sigma * np.sqrt(T))

    # Theta
    if option_type == "call":
        theta = (-S * npdf_d1 * sigma / (2 * np.sqrt(T))
                 - r * K * np.exp(-r * T) * nd2)
    else:
        theta = (-S * npdf_d1 * sigma / (2 * np.sqrt(T))
                 + r * K * np.exp(-r * T) * norm.cdf(-d2))

    # Vega (same for calls and puts, per 1% vol move)
    vega = S * npdf_d1 * np.sqrt(T) / 100

    return {
        "delta": round(delta, 4),
        "gamma": round(gamma, 4),
        "theta": round(theta, 4),
        "vega": round(vega, 4)
    }


# Example: ATM call on a $100 stock
result = black_scholes_greeks(
    S=100, K=100, T=0.25, r=0.05, sigma=0.20, option_type="call"
)
print(result)
# {'delta': 0.5596, 'gamma': 0.0355, 'theta': -6.414, 'vega': 0.1782}

Enter fullscreen mode Exit fullscreen mode

Practical Interpretation

Delta

  • ATM options: Delta ~ 0.50 (call) or -0.50 (put)
  • Deep ITM: Delta approaches 1.0 (call) or -1.0 (put)
  • Deep OTM: Delta approaches 0.0 (both)
  • Delta hedging: Hold -Delta shares to neutralize directional risk

Gamma

  • Highest for ATM options near expiry
  • Gamma risk spikes as expiry approaches
  • Long options = long gamma; short options = short gamma

Theta

  • Always negative for long option holders (time decay)
  • Accelerates in the last 30 days before expiry
  • Theta is the "cost" of holding an option position

Vega

  • Highest for ATM options with long tenor
  • Vega exposure = exposure to implied volatility changes
  • Critical during earnings season or macro events

Greeks Sensitivity Table

# How Greeks change with moneyness
strikes = [90, 95, 100, 105, 110]
print(f"{'Strike':<8} {'Delta':<8} {'Gamma':<8} {'Theta':<8} {'Vega':<8}")
print("-" * 40)
for K in strikes:
    g = black_scholes_greeks(100, K, 0.25, 0.05, 0.20)
    print(f"{K:<8} {g['delta']:<8} {g['gamma']:<8} {g['theta']:<8} {g['vega']:<8}")

Enter fullscreen mode Exit fullscreen mode

Output:

Strike   Delta    Gamma    Theta    Vega
----------------------------------------
90       0.8429   0.0096   -4.58    0.0481
95       0.7184   0.0214   -5.66    0.1069
100      0.5596   0.0355   -6.41    0.1782
105      0.3961   0.0449   -6.73    0.2243
110      0.2553   0.0443   -6.54    0.2213

Enter fullscreen mode Exit fullscreen mode

Notice how Gamma peaks ATM (strike 100-105) while Delta transitions from 0 to 1.

Greeks in Portfolio Risk Management

In practice, portfolio-level Greeks aggregate across all positions:

portfolio_delta = sum(pos.quantity * pos.delta for pos in positions)
portfolio_gamma = sum(pos.quantity * pos.gamma for pos in positions)
portfolio_theta = sum(pos.quantity * pos.theta for pos in positions)
portfolio_vega = sum(pos.quantity * pos.vega for pos in positions)

Enter fullscreen mode Exit fullscreen mode

A delta-neutral portfolio has portfolio_delta = 0. But with non-zero gamma, your delta changes as the market moves — this is dynamic hedging.

Common Interview Questions

  1. What happens to Gamma as expiry approaches for an ATM option? — Gamma increases, creating "pin risk"
  2. How do you delta-hedge a short call? — Buy Delta shares of the underlying
  3. Why is Vega important during earnings? — Implied volatility spikes before earnings and crushes after
  4. What's the relationship between Theta and Gamma? — For delta-hedged options, Theta decay ~ Gamma * S^2 * sigma^2 / 2 (the theta-gamma tradeoff)

Level Up Your Quant Skills

Want to go deeper into options pricing, Greeks, and quant interview prep? Check out the Desk2Quant Quant Interview Problem Book — 100+ problems with detailed solutions covering derivatives pricing, stochastic calculus, and probability.


Published by Desk2Quant — helping you break into quantitative finance.