This page explains why SOAP2's GEX (Gamma Exposure) and VEX (Vanna Exposure) exist and what their numbers mean. It is written for a reader who has met differentiation, the chain rule, exponentials and logarithms and the normal distribution (UK A-level Mathematics or similar), and who knows nothing about options. Nothing here needs a finance background.
How to read it. The main text is the core story and needs only A-level mathematics. Boxes marked 🔷 Going deeper are optional: they give the full derivations and the connections to university-level mathematics and to the research literature. They are folded away; click one to open it. You can skip every one of them and still follow the page.
This is not a how-to. For the buttons, filters and chart layout, read the GEX / VEX user guide. For the other dealer-positioning tools (TRACE, Hedging Flow) and the data-source compromises behind them, see the dealer-positioning tutorial. This page covers only the two ideas underneath GEX and VEX, and points at where each one lives in SOAP2.
An option is a contract whose value depends on the price of something else (the
underlying: a share, or an index such as the S&P 500). A call option gains value
when the underlying rises; a put gains when it falls. Each option has a strike
price K and an expiry date.
When you buy an option, someone sells it to you. Very often that someone is a market maker (a "dealer"), a firm paid for quoting prices, not for guessing the market's direction. After selling you an option the dealer is exposed to price moves, so they cancel that exposure by trading the underlying itself. This is hedging.
The key fact for everything below: the size of the hedge is not fixed. It changes as the market moves, and that forces the dealer to keep trading. Gamma and Vanna are the two numbers that say how fast the required hedge changes. GEX and VEX add them up across a whole market.
Write V(S) for the value of an option when the underlying price is S. Plot it and you
get a curve. The delta of the option is the gradient of that curve:
$$ \Delta = \frac{\partial V}{\partial S} $$
(The curly "∂" just means "differentiate with respect to S, holding everything else, such as time
and volatility, fixed".) A call has delta between 0 and 1; a put between −1 and 0. A call with delta 0.5 gains
about 50 cents when the underlying gains $1.
How a dealer uses it. One standard contract covers 100 shares. A dealer who sold you one call with delta 0.52 is short the equivalent of 0.52 × 100 = 52 shares, so they buy 52 shares. Now a $1 move in the underlying changes what the option costs them by about $52 and changes what their shares are worth by the same amount the other way: the two cancel. The dealer is delta-neutral.
The catch: a gradient is only right at one point on the curve. Move along it and the gradient changes. That change is gamma.
If delta is the first derivative of V, then gamma is the second derivative: how
quickly the gradient itself changes as S moves.
$$ \Gamma = \frac{\partial \Delta}{\partial S} = \frac{\partial^2 V}{\partial S^2} $$
A straight line has zero gamma; the more the value curve bends, the larger the gamma. Option value curves bend upward for anyone who owns the option, which is exactly why owning options is attractive and selling them is costly.
Take a share at $100 and a call with strike $100, three months to expiry, implied volatility 20% (more on that in §5), interest and dividends ignored for simplicity. The Black-Scholes formulas (§3, box below) give:
Now watch a dealer who sold you one call:
Each round trip costs them about $4 (bought at 101, sold at 100). They are forced to buy high and sell low. A dealer who sold options is called short gamma, and short gamma means hedging with the market's direction: buy as it rises, sell as it falls. That amplifies moves.
The opposite holder, long gamma (someone who owns the option, or a dealer who bought it), does the reverse: sells as the price rises, buys as it falls, buy low, sell high. That dampens moves. (The price of this advantage is that the option loses value as time passes, which is why nobody gets it for free.)
This is the whole mechanism behind the words "attractor" and "repellor" in SOAP2's GEX guide:
Gamma is not constant. It is largest for options whose strike is close to the current price, and it grows dramatically as expiry approaches. The chart shows the gamma of the same $100-strike option for 30, 7 and 1 day to expiry:
One day before expiry the peak is about 5.5 times the 30-day peak, and the bump is much narrower. A same-day ("0DTE") option near the strike has delta that can swing from almost 0 to almost 1 within a small move, so its hedge changes very fast. That is why near-expiry options dominate the day-to-day dealer picture, and why SOAP2 lets you pick the expiry you look at.
Setup. Black-Scholes-Merton prices a European call on an underlying paying a continuous
dividend yield q, with interest rate r, volatility σ and time to expiry
T (in years), as
$$ C = S e^{-qT} N(d_1) - K e^{-rT} N(d_2), \quad d_1 = \frac{\ln(S/K) + (r - q + \tfrac12\sigma^2)T}{\sigma\sqrt{T}}, \quad d_2 = d_1 - \sigma\sqrt{T} $$
where N is the standard normal CDF and φ = N′ its density. A short calculation shows
the identity S e^{−qT} φ(d₁) = K e^{−rT} φ(d₂), which makes most terms cancel when you differentiate:
$$ \Delta_{\text{call}} = \frac{\partial C}{\partial S} = e^{-qT} N(d_1) $$
Differentiate again. Only d₁ depends on S inside the remaining factor, and by the
chain rule ∂d₁/∂S = 1/(Sσ√T), so
$$ \Gamma = \frac{\partial^2 C}{\partial S^2} = e^{-qT}\,\varphi(d_1)\,\frac{1}{S\sigma\sqrt{T}} = \frac{e^{-qT}\varphi(d_1)}{S\,\sigma\sqrt{T}} $$
Put-call parity (C − P = S e^{−qT} − K e^{−rT}) is linear in S, so its second
derivative is zero: a call and a put with the same strike and expiry have identical gamma.
Reading the formula. At the money d₁ ≈ 0, so φ(d₁) ≈ 0.399 and
Γ ≈ 0.4 / (S σ √T). Gamma therefore scales like 1/√T and blows up as
T → 0: the 5.5× in the figure is √30 ≈ 5.5. Away from the strike d₁ grows, and the
Gaussian φ(d₁) kills gamma: the bump is a bell curve in ln S whose width shrinks like
σ√T.
Why GEX multiplies by S². For a delta-hedged option the profit over a short interval
dt is, to second order,
$$ \text{P\&L} \approx \tfrac12\,\Gamma\,(\delta S)^2 + \Theta\,\delta t = \tfrac12\,\Gamma S^2 \left[\left(\frac{\delta S}{S}\right)^2 - \sigma^2\,\delta t\right] \quad\text{(using } \Theta \approx -\tfrac12\sigma^2 S^2\Gamma\text{)} $$
The second equality is the Black-Scholes PDE for a delta-hedged position. The combination Γ S²
is the natural currency of gamma: it converts "gamma per dollar" into "money per squared percentage
move". Long gamma wins when the realised move squared beats σ²δt (realised volatility above implied)
and loses otherwise. This is the trade-off that makes a long-gamma dealer pay for the privilege.
One option's gamma tells you about one hedge. The market has thousands of strikes and expiries, each with a number of contracts outstanding (open interest, OI). Gamma Exposure (GEX) adds up gamma across all of them, weighted by how many contracts exist, to estimate how much the combined dealer hedge will have to change when the price moves.
For each strike SOAP2 computes (the sign convention comes next):
$$ \text{GEX}_{\text{call}} = +\,\Gamma_{\text{call}} \times \text{OI}_{\text{call}} \times S^2, \qquad \text{GEX}_{\text{put}} = -\,\Gamma_{\text{put}} \times \text{OI}_{\text{put}} \times S^2 $$
The totals are shown in billions of dollars. The S² is not decoration. Here is what the number
means:
0.01 × S.Γ × 0.01 S, which is Γ × 0.01 S × 100 shares
(100 shares per contract).Γ × S shares per contract. At price S each share is
worth S dollars, so the hedge changes by Γ × S² dollars per contract.So GEX is the dollar value of stock (or index exposure) the dealers' hedges must buy or sell if the market moves 1%, before applying a sign. The units come out neatly because the contract multiplier (100) and the 1% (0.01) cancel.
Numbers. With the index at 5,000, suppose the call at the 5,000 strike has Γ = 0.0009 and 20,000 contracts of open interest (illustrative values). Then 0.0009 × 20,000 × 5,000² = 450,000,000: about $450 million of exposure at that one strike. Add up all strikes, with signs, and you get the Net GEX figure and the bars on the GEX tab.
Open interest says how many contracts exist. It does not say who is long and who is short. To turn it into a dealer position, GEX uses a standard assumption from the dealer-flow literature (popularised by SqueezeMetrics):
That is why a call and a put at the same strike have identical gamma but opposite-signed GEX bars: the sign comes from the assumed position, not from the option's mathematics. It is an average-behaviour guess, and on any given day it can be wrong. That is why SOAP2 offers sign-flip toggles.
Net GEX depends on where the market is. Move the price up or down and every option's gamma changes (look at the bump in the figure), so the total changes too, and it can change sign. The price at which total dealer gamma crosses zero is the Flip level. Above it the net dealer position is long gamma (stabilising, "attractor"); below it, short gamma (amplifying, "repellor").
You cannot read the Flip level off the bar chart, which shows gamma at today's price only. SOAP2 recomputes the total at many hypothetical prices (a sweep), holding each strike's volatility and time to expiry fixed, and finds where the curve crosses zero nearest the current price. The orange line on the GEX chart is that curve.
Dollar gamma is a probability density. The price of a European call, as a function of strike,
satisfies the Breeden-Litzenberger relation: the second derivative with respect to strike is the
discounted risk-neutral density of the final price f:
$$ \frac{\partial^2 C}{\partial K^2} = e^{-rT} f(K) $$
Black-Scholes is homogeneous of degree 1 in (S, K): scaling both by λ scales C by λ.
Euler's theorem for homogeneous functions then gives C = S C_S + K C_K, and differentiating that
identity gives S² C_SS = K² C_KK. Hence
$$ S^2\,\Gamma(S,K) = K^2\, e^{-rT} f(K) $$
The per-contract "dollar gamma" that GEX uses is therefore, up to the factor K²e^{−rT}, the market's
own probability density for where the index will finish. A big GEX bar at a strike is large exactly where
the options market thinks the final price is likely to land, which is the mathematical reason walls sit near
where open interest and probability both concentrate. (Here f is the density implied by that
option's own volatility, a single-volatility lognormal, which is what a plain Black-Scholes gamma assumes.)
The sweep. Define the aggregate
$$ G(S') = \sum_{i}\; w_i \,\Gamma_{BS}(S', K_i, T_i, \sigma_i)\; \text{OI}_i\, S'^2 $$
with w_i = +1 for calls and −1 for puts, each σ_i and T_i
frozen at today's values. SOAP2 evaluates G on a grid spaced at half the strike interval and takes
the zero crossing nearest the current price (linear interpolation), plus the curve's highest and lowest points
(the "Min"/"Max" markers). No closed form exists, since G is a sum of many shifted Gaussians in
ln S′. Note the assumption that volatilities stay fixed as price moves; in reality the volatility
smile shifts (sticky strike versus sticky delta behaviour), which is one reason the Flip level
is a rough zone and not a line.
So far the price of the underlying was the only thing moving. But an option's value also depends on how
uncertain the market thinks the future is. The measure of that is implied volatility
(IV, written σ): roughly, the typical size of a one-year price swing that the option's price implies.
IV is not constant. It rises in a sell-off and falls when feared events (a central-bank announcement, an
earnings report) pass without drama.
Two sensitivities to IV matter here:
∂V/∂σ. More uncertainty makes both calls and puts more valuable, so vega is positive.$$ \text{Vanna} = \frac{\partial \Delta}{\partial \sigma} = \frac{\partial^2 V}{\partial S\,\partial\sigma} $$
Vanna is a mixed second derivative: once with respect to price, once with respect to volatility. It answers the question: if volatility moves and the price does not, how much does my hedge have to change?
Delta is roughly "the probability the option finishes in the money" (not exactly, but the right intuition). Think of a call whose strike is well above today's price, an out-of-the-money (OTM) call. It only pays if the price makes a big move up. If volatility rises, big moves become more plausible, so the chance of finishing in the money rises, and so does its delta. If volatility falls, the chance falls, and delta falls. For a deep in-the-money call the effect reverses: more volatility makes finishing out of the money more plausible, so its delta falls.
Worked numbers (same share at $100, three months, IV 20%, interest ignored):
| Call strike | Delta at IV 20% | Delta at IV 21% | Change | Vanna (per 1 IV point) |
|---|---|---|---|---|
| 110 (out of the money) | 0.183 | 0.196 | +0.013 | about +0.013 |
| 100 (at the money) | 0.520 | 0.521 | about +0.001 | about +0.001 |
| 90 (in the money) | 0.865 | 0.854 | −0.011 | about −0.011 |
For the 110 call one contract (100 shares) changes its delta by about 1.3 shares per IV point. Small for one contract, but multiply by tens of thousands of contracts.
Suppose a dealer's whole book has positive net Vanna: its total delta rises when IV rises. Then if IV falls with the price unchanged (a vol crush, as after a scheduled event), the book's delta falls. A dealer who was hedging a positive delta by selling stock now has too many shorts and buys stock back. That is the textbook "vanna rally": nothing happened to the price, volatility dropped, hedges shrank, and the unwinding itself supports the market. With negative net Vanna, a vol drop would force selling instead, and a vol rise would flip each case.
Price and volatility are not independent in real markets: in stock indices, falling prices usually come with rising IV. A fall therefore triggers gamma hedging and vanna hedging at the same time, which can reinforce or offset one another. This is why the VEX tab is read alongside GEX and not instead of it.
From Δ_call = e^{−qT} N(d₁), differentiate with respect to σ by the chain rule:
$$ \text{Vanna} = \frac{\partial\Delta}{\partial\sigma} = e^{-qT}\varphi(d_1)\,\frac{\partial d_1}{\partial\sigma} $$
Writing d₁ = [ln(S/K) + (r−q)T] / (σ√T) + ½σ√T and differentiating,
$$ \frac{\partial d_1}{\partial\sigma} = -\frac{\ln(S/K)+(r-q)T}{\sigma^2\sqrt T} + \frac{\sqrt T}{2} = -\frac{d_1}{\sigma} + \sqrt{T} = -\frac{d_2}{\sigma} $$
so that
$$ \text{Vanna} = -\,e^{-qT}\,\varphi(d_1)\,\frac{d_2}{\sigma} $$
Two other forms are often quoted, and agree with it. Because the mixed partial derivatives of a smooth
function commute (Schwarz/Clairaut), ∂Δ/∂σ = ∂²V/∂S∂σ = ∂Vega/∂S: Vanna is also how vega
changes with price. With raw Vega = S e^{−qT} φ(d₁) √T, this gives
Vanna = Vega · (1 − d₁/(σ√T)) / S. The check: S e^{−qT}φ(d₁)√T (1 − d₁/(σ√T))/S =
e^{−qT}φ(d₁)(√T − d₁/σ) = −e^{−qT}φ(d₁) d₂/σ. ✓.
Sign. Since φ > 0, the sign of Vanna is the sign of −d₂:
positive when d₂ < 0, i.e. for strikes above roughly the forward price, and negative below. This
reproduces the table above (OTM calls: positive; ITM calls: negative).
Call versus put. Δ_call − Δ_put = e^{−qT}, which does not contain
σ. Differentiating with respect to σ kills it, so a call and a put with the same
strike and expiry have the same Vanna, exactly as they have the same gamma. (OTM puts sit below
the forward, where Vanna is negative: raising IV makes their already-negative delta more negative.)
Near expiry. Vanna is the product of a Gaussian in d₁ and a factor that grows
like 1/σ times d₂ ~ ln(S/K)/(σ√T); it peaks at strikes roughly one standard deviation
(σ√T) from the forward, not at the money, where it passes through zero. Gamma peaks at
the strike, Vanna on the flanks: a good way to remember why the VEX picture looks different from the GEX one.
The family. Gamma, Vanna and Vomma (∂²V/∂σ²) are the three second-order
sensitivities to price and volatility; Charm (∂Δ/∂t) is the sensitivity of delta to the passage of
time. All are partial derivatives of the same Black-Scholes surface; see Hull, Wilmott or Taleb in §10.
Vanna Exposure (VEX) does for Vanna what GEX does for Gamma: weight each strike's Vanna by its open interest, and add it up. SOAP2's version, per strike, is
$$ \text{VEX} = \text{Vanna} \times \text{OI} \times S^2 \,/\, 10 $$
with the total shown in millions. The shape of the chart is what matters: where exposure to a volatility move is concentrated, and whether it is positive or negative.
Read the scale loosely. The division by 10 and the choice of units come from the reference
script SOAP2's version was ported from. They give consistent, comparable bars within a chart, but they
are not a literal dollar flow the way GEX's 1%-move reading is. A strictly dimensional version would multiply
Vanna by OI, the 100-share multiplier, the price S (not S²) and the size of the IV move
you are asking about. Use VEX to compare strikes and to see its sign and shape, not to read an absolute number of
dollars.
Sign handling is different from GEX. GEX negates the put side because of the dealer-position assumption in §4. SOAP2's VEX does not: each contract's Vanna enters with its own natural sign, which is the same for a call and a put at one strike (see the box above). Roughly speaking, bars below the current price come out negative and bars above it positive. Since the "buy or sell" reading of that sign depends on which side dealers are assumed to be on, the Flip VEX Sign toggle exists, and the VEX picture should be treated as less settled than the GEX one. Section 8 repeats this as a caveat.
When it matters most: around scheduled volatility events (inflation data, central-bank meetings, earnings), month- and quarter-end, and option-expiry weeks, i.e. whenever IV itself is likely to move sharply rather than the price.
| Idea on this page | Where to see it in SOAP2 | Guide |
|---|---|---|
| GEX per strike, Flip, Min/Max, the sweep curve | Options Analysis (OA) window on SPX or RUT → GEX button, live from your IB feed | GEX / VEX guide: the main chart |
| VEX per strike | Same window → VEX button | GEX / VEX guide |
| Attractor / repellor reading | Above / below the Flip line on the GEX chart | Attractor vs. repellor |
| The dealer-position sign convention (§4, §6) | GEX/VEX Filters dropdown → Flip GEX Sign / Flip VEX Sign | Sign-flip toggles |
| Gamma changing as expiry approaches (the figure in §3) | Change the OA expiry tab and compare; also the TRACE tool, which sweeps the days to expiry | TRACE guide |
| Whole-chain GEX/VEX from the delayed CBOE chain (SPX, RUT, NDX) | Data Chart menu → CBOE GEX/VEX form (needs no OA) | Data Chart guide, Limitations |
| Asking an AI assistant to read it for you | get_cboe_gex (CBOE chain) and run_analysis with ib_gex (live IB), plus the gex block of get_market_read | AI assistant guide |
| Hedge flow (trades actually forced), not just exposure | Hedging Flow tab | Hedging Flow guide |
| The shape of implied volatility behind Vanna | HSkew / VSkew / Volatility Surface tabs | Skew guide |
GEX/VEX is available with the Free Trial, Premium and WhiteLabel editions; see Licensing & Editions. For the full view of the toolbar and the OA window, start from the OptionsChain overview.
Source paths are relative to the SOAP2 repository. Developer pages under docs/Dev are not shipped
with the application.
| Idea | Code |
|---|---|
| d₁, d₂, Gamma, Vega, Vanna (Black-Scholes) | BS.cs: GetD1D2, OptionGamma, OptionVega, OptionVanna. Note SOAP2's Vega is quoted per 1 IV point (divided by 100), and OptionVanna inherits that scaling. |
| Per-strike GEX/VEX, the sweep, Flip/Min/Max (live IB) | ui/OAClasses/GexVexCalculator.cs (Compute, ComputeGammaSweepStats); UI and timers in ui/OptionsChain/OptionsChain.GexVex.cs; charts in ui/OAClasses/OptionsChainGexVexChartManager.cs |
| The same maths on the CBOE delayed chain | ui/CboeGexVex/CboeGexVexCalculator.cs. It uses a fixed rate of 4.15%, zero dividend yield, and business-days/262 for time to expiry (the live-IB path uses SOAP2's calendar-days/360 convention), and its own unscaled Vanna (RawVanna, the same formula as the box in §5) instead of BS.OptionVanna |
| Server-side compute (Release builds) | TypeScript port in soap2-data/src/gex/ (calc.ts); the C# code is the reference and parity tests guard it. Contract: docs/Dev/Server_Data_API.md |
| Minimum open interest, scaling constants | GexVexCalculator.MinOpenInterest (strikes with fewer than 5 contracts combined are dropped); GEX ÷ 109, VEX ÷ 106 |
| Stored “last known” results | CalcResultStore slots, see docs/Dev/Result_Store_Design.md |
| Design and open items | docs/Dev/gexvex_devoverview.md.html |
Everything on this page is a model estimate, and the weak link is not the mathematics (the formulas are exact for a Black-Scholes world) but the inputs:
Short questions to see if the core ideas have landed. Answers are folded away.
Delta changes by gamma times the move: 0.30 + 0.02 × 2 = 0.34. (It is an approximation, since gamma itself changes along the way; it is the first term of a Taylor expansion of delta.)
Short gamma means hedging with the direction of the market: they sell as the price falls. That adds selling pressure and tends to make the fall faster: the "repellor" case.
Put-call parity is linear in the price, so the second derivative (gamma) is the same for both. The GEX sign is an assumption about the dealer's position: long calls, short puts.
Gamma at the money is about 0.4/(Sσ√T), so the ratio is √(30/1) ≈ 5.5. The figures give 0.381/0.0695 ≈ 5.5. ✓
The out-of-the-money call. More volatility raises the chance that it finishes in the money, so its delta rises (positive Vanna). The in-the-money call's delta falls slightly (negative Vanna), because more volatility raises the chance that it finishes out of the money.
Δ = e^{−qT} N(d₁) that ∂Δ/∂σ = −e^{−qT} φ(d₁) d₂/σ.
See the “Going deeper” box in §5: the chain rule gives
e^{−qT}φ(d₁)·∂d₁/∂σ, and ∂d₁/∂σ = −d₂/σ after combining the two terms of
d₁.
Textbooks (accessible to advanced students).
Foundational papers.
Volatility, Vanna and the smile.
Dealer hedging and its effect on prices (the empirical side).
The bibliographic details above were written from memory of the literature; check them against the source before quoting them.
Go back to the main help page: SOAP2 Help Guide