Skip to main content

Desk Lab · Options

Black–Scholes Greeks Explorer

Drag the sliders and watch the option's value curve bend. The dashed line is the payoff at expiry; the straight line touching the curve is delta, the hedge ratio a trader would hold right now.

ILLUSTRATIVE

Calendar days
Per year
Continuously compounded

How it works

The price comes from the Black–Scholes–Merton formula with a continuous dividend yield q. Delta is the slope of the value curve, gamma is how fast that slope changes, vega is the change for one volatility point, and theta is the value lost in one calendar day with everything else fixed.

Watch what happens near expiry: the curve hugs the payoff, gamma spikes at the strike and theta gets large. That is why short-dated at-the-money options are the hardest to hedge.

The Python behind it

Copy it into a notebook or the Code Playground. The comment shows what it prints.

from math import log, sqrt, exp
from scipy.stats import norm

def bs(S, K, T, r, q, sigma, call=True):
    d1 = (log(S / K) + (r - q + 0.5 * sigma**2) * T) / (sigma * sqrt(T))
    d2 = d1 - sigma * sqrt(T)
    if call:
        price = S * exp(-q * T) * norm.cdf(d1) - K * exp(-r * T) * norm.cdf(d2)
        delta = exp(-q * T) * norm.cdf(d1)
    else:
        price = K * exp(-r * T) * norm.cdf(-d2) - S * exp(-q * T) * norm.cdf(-d1)
        delta = -exp(-q * T) * norm.cdf(-d1)
    gamma = exp(-q * T) * norm.pdf(d1) / (S * sigma * sqrt(T))
    vega = S * exp(-q * T) * norm.pdf(d1) * sqrt(T) / 100   # per vol point
    return price, delta, gamma, vega

print([round(float(x), 4) for x in bs(100, 105, 0.5, 0.05, 0.01, 0.20)])
# [4.3552, 0.4449, 0.0278, 0.2782]

Practise it like an interview

From the Options & Greeks questions. Type your answer, check it, then open the working.

Warm-up

You are long an option and delta-hedged. On a quiet day you lose a little; on a day with a big move, up or down, you make money. Explain why, using gamma and theta.

Show the answer and working

Long gamma earns about ½·Γ·(ΔS)² on any move and pays theta every day. With r = 0, θ = −½·σ²·S²·Γ, so you win only when the move beats what implied vol predicts.

  1. After hedging, delta is zero, so there is no first-order P&L from the move. What is left is the gamma term ½·Γ·(ΔS)², which is positive for a long option in either direction.
  2. Time passing costs theta. A long option loses time value every day, so its theta is negative.
  3. Black–Scholes ties the two together. With r = 0: θ + ½·σ²·S²·Γ = 0. The daily theta equals the gamma P&L of a typical move at implied vol.
  4. A quiet day earns little gamma but still pays the full theta: a loss. A big move earns more gamma than the theta paid: a profit.

CheckA short option holder sees the mirror image: they collect theta on quiet days and lose on big moves.

Interview trapTreating gamma and theta as unrelated. They are two sides of one bet on realised versus implied volatility. Next question: what move breaks even for the day?

Try it in the Desk Lab: Black–Scholes Greeks Explorer →

Step up

Your book is short 1,000 calls (each on one share), each with delta 0.55 and gamma 0.04. A traded option has delta 0.40 and gamma 0.05. You make the book gamma-neutral with that option, then fix delta with stock. How many shares do you buy?

Show the answer and working

Buy 800 of the traded options to remove the gamma, then buy 230 shares to bring delta back to zero.

  1. Book gamma = −1,000 × 0.04 = −40. Book delta = −1,000 × 0.55 = −550.
  2. Fix gamma first, because stock has no gamma. Options needed = 40 / 0.05 = 800. Buy 800.
  3. Those 800 options add delta of 800 × 0.40 = +320, so book delta becomes −550 + 320 = −230.
  4. Buy 230 shares. Delta and gamma are now both zero.

CheckShares change delta but never gamma, so the order (options first, then stock) always works.

Interview trapHedging delta with stock first and then adding options, which breaks the delta hedge again. Follow-up: the hedge only holds for small moves and needs rebalancing.

Try it in the Desk Lab: Black–Scholes Greeks Explorer →

Hard

You are long a delta-hedged option: S = ₹100, gamma 0.05, implied vol 20%, r = 0. Use 252 trading days a year. What one-day move in the stock, up or down, makes the day break even?

Show the answer and working

About ₹1.26, or 1.26% of spot. Daily theta equals ½·Γ·(ΔS)² when ΔS = σ·S/√252 = 20/15.87.

  1. With r = 0, Black–Scholes gives θ = −½·Γ·S²·σ² per year = −½ × 0.05 × 100² × 0.04 = −₹10 a year.
  2. Per trading day: −10 / 252 = −₹0.0397.
  3. Gamma P&L on a move ΔS is ½ × 0.05 × (ΔS)². Set it equal to 0.0397: (ΔS)² = 1.587, so ΔS = ₹1.26.
  4. Shortcut: breakeven move = σ·S/√252 = 0.20 × 100 / 15.87 = ₹1.26. This is the “divide by 16” rule.

CheckA ₹2 move earns ½ × 0.05 × 4 = ₹0.10 of gamma against ₹0.0397 of theta: about +₹0.06 for the day.

Interview trapUsing 365 calendar days for a trading-day move, or forgetting the ½. Follow-up: over many days, P&L ≈ ∑ ½·Γ·S²·(realised² − implied²)·dt, a bet on realised vol.

Try it in the Desk Lab: Black–Scholes Greeks Explorer →

More from the Desk Lab

For education only; not investment advice. Labels on this site: REAL means real public data with its source given, SIMULATED means random numbers generated for the example, ILLUSTRATIVE means made-up inputs chosen to teach the idea.