zero-dte-gamma
You hand over an underlying (default SPY). The skill pulls the options
chain snapshot for the nearest expiry, computes per-contract gamma
exposure using Black-Scholes greeks and reported open interest,
aggregates by strike, and reports the net dealer gamma regime along
with the top pins.
Motivated by 2024-25 research (Baltussen-Terhorst-Van Vliet 2024,
Bhattacharya 2024, others) documenting that 0-day-to-expiration
options now drive systematic intraday moves through market-maker
delta hedging pressure. This phenomenon didn't exist meaningfully
before 2022 (when CBOE expanded 0DTE availability); by 2024-25 it's
a first-order intraday factor.
Interpretation
- Long gamma regime (net dealer gamma > 0): dealers hedge
against price moves, compressing intraday range. Late-day chop
typical. Sell-vol strategies favored.
- Short gamma regime (net dealer gamma < 0): dealers hedge with
the market, amplifying moves. Trend days more likely, especially
in the last hour. Buy-vol / breakout strategies favored.
- Gamma flip strike: the level where cumulative dealer GEX
crosses zero. Break past it and the hedging regime changes.
- Gamma pins: strikes with the largest concentrated open
interest gamma. Spot tends to gravitate toward these on expiry day.
When to invoke
- "What's the gamma regime on SPY today?"
- Pre-market prep on an SPX / QQQ options trader's watchlist
- Sizing risk for a 0DTE strategy
- The user says "gamma flip", "gamma pins", "0DTE",
"dealer positioning"
Not for: single-name equity options (this is calibrated to index /
ETF flow assumptions). Not for real-time (this is snapshot-based;
end-of-day is fine, intraday drift can be substantial).
What you need
- Underlying ticker (
--underlying, default SPY)
MASSIVE_API_KEY exported
- Options Developer or higher entitlement. Returns a clean
NOT_AUTHORIZED tier caveat without it.
Optional:
--expiration-date (YYYY-MM-DD): pin a specific expiry. Default:
nearest listed expiration to today.
--risk-free-rate (default 0.045)
--default-iv (default 0.15): fallback when Massive's greeks
or IV field is missing on a contract.
What you get back
Two output layers.
Layer 1: canonical JSON. Per-strike call_gamma_notional,
put_gamma_notional, dealer_gex, cum_dealer_gex, call_oi,
put_oi. Top-level net_dealer_gex, gamma_regime,
gamma_flip_strike, top_gamma_pins (top 5 by absolute notional),
plus spot, days_to_expiration, and full gamma_by_strike for
downstream consumers.
Layer 2: rendered note. Header + regime label + gamma flip level,
top 5 pin table, one-line Take.
How it works
- Pick nearest expiry from
/v3/reference/options/contracts?underlying_ticker={U}.
- Fetch chain snapshot from
/v3/snapshot/options/{U}?expiration_date={D}. Massive returns
per-contract greeks + open interest + IV.
- Compute gamma per contract. Prefer Massive's returned gamma;
fall back to Black-Scholes with the reported IV (or
default_iv
when missing).
- Cash gamma per contract = gamma × OI × 100 × spot² / 100.
This is dollar-gamma per 1% underlying move.
- Dealer positioning assumption: short customer calls, long
customer puts. So
dealer_gex(call) = -cash_gamma, dealer_gex(put) = +cash_gamma. This is the standard 0DTE convention; not exact for
any given book, but consistent across time.
- Aggregate per strike, compute cumulative GEX walking from
lowest to highest strike, find gamma-flip strike where cumulative
crosses zero.
- Top pins = strikes with the largest total notional gamma
(call + put), sorted descending.
Foundations used
Output mode: note
Narrative note with a per-strike table. A single expiry chain
produces 50-200 strikes; the top-5 pin table is the digestible view.
Endpoints used
GET /v3/reference/options/contracts?underlying_ticker={U}
(list expirations)
GET /v3/snapshot/options/{U}?expiration_date={D}
(chain snapshot with greeks + OI)
GET /v2/snapshot/locale/us/markets/stocks/tickers/{U}
(spot fallback chain)
Doesn't handle (yet)
- Intraday updates. Snapshot only. For live updates, wire the
same aggregation onto the options WebSocket.
- Vanna and charm. Only gamma. Second-order greeks (vanna =
d²/dS/dσ, charm = d²/dS/dt) are the natural next layer for a
full "dealer hedging response" model.
- Actual dealer books. The short-calls / long-puts assumption
is retail-flow convention. On event days (Fed, CPI, earnings),
actual dealer books can invert.
- Non-index underlyings. Calibrated for SPY / SPX / QQQ / IWM
where the flow assumption holds. Single-name equity gamma has
different flow dynamics.
- rBergomi-consistent IV. Uses reported IV as-is; a rough-vol-
consistent IV surface would be a real research extension.
These are clean PR extensions.
1---2name: zero-dte-gamma3description: Estimate net dealer gamma exposure (GEX) for same-day-expiry (or nearest-expiry) SPY / SPX / QQQ / IWM options and identify gamma pins. Uses Black-Scholes gamma applied to reported open interest with a standard dealer positioning assumption (short customer calls, long customer puts). Reports net dealer gamma, gamma regime (long / short), gamma flip strike, and top 5 gamma pin strikes with per-side notional gamma. Motivated by 2024-25 research on how 0DTE options now drive systematic intraday moves through market-maker delta hedging pressure. Requires Options Developer.4---56# zero-dte-gamma78You hand over an underlying (default SPY). The skill pulls the options9chain snapshot for the nearest expiry, computes per-contract gamma10exposure using Black-Scholes greeks and reported open interest,11aggregates by strike, and reports the net dealer gamma regime along12with the top pins.1314Motivated by 2024-25 research (Baltussen-Terhorst-Van Vliet 2024,15Bhattacharya 2024, others) documenting that 0-day-to-expiration16options now drive systematic intraday moves through market-maker17delta hedging pressure. This phenomenon didn't exist meaningfully18before 2022 (when CBOE expanded 0DTE availability); by 2024-25 it's19a first-order intraday factor.2021## Interpretation2223- **Long gamma regime** (net dealer gamma > 0): dealers hedge24 against price moves, compressing intraday range. Late-day chop25 typical. Sell-vol strategies favored.26- **Short gamma regime** (net dealer gamma < 0): dealers hedge with27 the market, amplifying moves. Trend days more likely, especially28 in the last hour. Buy-vol / breakout strategies favored.29- **Gamma flip strike**: the level where cumulative dealer GEX30 crosses zero. Break past it and the hedging regime changes.31- **Gamma pins**: strikes with the largest concentrated open32 interest gamma. Spot tends to gravitate toward these on expiry day.3334## When to invoke3536- "What's the gamma regime on SPY today?"37- Pre-market prep on an SPX / QQQ options trader's watchlist38- Sizing risk for a 0DTE strategy39- The user says "gamma flip", "gamma pins", "0DTE",40 "dealer positioning"4142Not for: single-name equity options (this is calibrated to index /43ETF flow assumptions). Not for real-time (this is snapshot-based;44end-of-day is fine, intraday drift can be substantial).4546## What you need4748- Underlying ticker (`--underlying`, default SPY)49- `MASSIVE_API_KEY` exported50- **Options Developer** or higher entitlement. Returns a clean51 NOT_AUTHORIZED tier caveat without it.5253Optional:5455- `--expiration-date` (YYYY-MM-DD): pin a specific expiry. Default:56 nearest listed expiration to today.57- `--risk-free-rate` (default 0.045)58- `--default-iv` (default 0.15): fallback when Massive's greeks59 or IV field is missing on a contract.6061## What you get back6263Two output layers.6465**Layer 1: canonical JSON**. Per-strike `call_gamma_notional`,66`put_gamma_notional`, `dealer_gex`, `cum_dealer_gex`, `call_oi`,67`put_oi`. Top-level `net_dealer_gex`, `gamma_regime`,68`gamma_flip_strike`, `top_gamma_pins` (top 5 by absolute notional),69plus `spot`, `days_to_expiration`, and full `gamma_by_strike` for70downstream consumers.7172**Layer 2: rendered note**. Header + regime label + gamma flip level,73top 5 pin table, one-line Take.7475## How it works76771. **Pick nearest expiry** from78 `/v3/reference/options/contracts?underlying_ticker={U}`.792. **Fetch chain snapshot** from80 `/v3/snapshot/options/{U}?expiration_date={D}`. Massive returns81 per-contract greeks + open interest + IV.823. **Compute gamma** per contract. Prefer Massive's returned gamma;83 fall back to Black-Scholes with the reported IV (or `default_iv`84 when missing).854. **Cash gamma** per contract = gamma × OI × 100 × spot² / 100.86 This is dollar-gamma per 1% underlying move.875. **Dealer positioning assumption**: short customer calls, long88 customer puts. So `dealer_gex(call) = -cash_gamma`, `dealer_gex(put)89 = +cash_gamma`. This is the standard 0DTE convention; not exact for90 any given book, but consistent across time.916. **Aggregate per strike**, compute cumulative GEX walking from92 lowest to highest strike, find gamma-flip strike where cumulative93 crosses zero.947. **Top pins** = strikes with the largest total notional gamma95 (call + put), sorted descending.9697## Foundations used9899- [`massive-api-patterns`](../massive-api-patterns) for REST auth,100 retry, and options chain snapshot.101102## Output mode: note103104Narrative note with a per-strike table. A single expiry chain105produces 50-200 strikes; the top-5 pin table is the digestible view.106107## Endpoints used108109- `GET /v3/reference/options/contracts?underlying_ticker={U}`110 (list expirations)111- `GET /v3/snapshot/options/{U}?expiration_date={D}`112 (chain snapshot with greeks + OI)113- `GET /v2/snapshot/locale/us/markets/stocks/tickers/{U}`114 (spot fallback chain)115116## Doesn't handle (yet)117118- **Intraday updates.** Snapshot only. For live updates, wire the119 same aggregation onto the options WebSocket.120- **Vanna and charm.** Only gamma. Second-order greeks (vanna =121 d²/dS/dσ, charm = d²/dS/dt) are the natural next layer for a122 full "dealer hedging response" model.123- **Actual dealer books.** The short-calls / long-puts assumption124 is retail-flow convention. On event days (Fed, CPI, earnings),125 actual dealer books can invert.126- **Non-index underlyings.** Calibrated for SPY / SPX / QQQ / IWM127 where the flow assumption holds. Single-name equity gamma has128 different flow dynamics.129- **rBergomi-consistent IV.** Uses reported IV as-is; a rough-vol-130 consistent IV surface would be a real research extension.131132These are clean PR extensions.