How AurumGamma Calculates Gamma Exposure (GEX)
A complete mathematical specification of AurumGamma's Black-Scholes-Merton option gamma equation, 3-sigma volatility fencing filter, Call/Put liquidity wall rules, and Zero Gamma Flip interpolation algorithms for COMEX Gold (GC) options.
ℹ️ Open Methodology Reference
This document is published openly so traders and risk managers can verify how AurumGamma's Gamma Exposure (GEX) metrics, liquidity walls, and zero-crossing boundaries are calculated. We publish our formulas and pure calculation code snippets so you can audit our mathematics. Note: This publication constitutes open documentation of financial methodology and does not grant a open-source software license.
1. Black-Scholes-Merton Gamma & GEX Derivation
Option Gamma ($\Gamma$) measures the rate of change of an option's Delta ($\Delta$) with respect to changes in the underlying asset's spot price ($S$). Under the standard Black-Scholes-Merton framework, the gamma for European-style options on futures is derived as:
Mathematical Formulation
$$d_1 = \frac{\ln(S / K) + \left(r + \frac{\sigma^2}{2}\right) T}{\sigma \sqrt{T}}$$
$$N'(d_1) = \frac{1}{\sqrt{2\pi}} e^{-\frac{1}{2} d_1^2}$$
$$\Gamma = \frac{N'(d_1)}{S \cdot \sigma \sqrt{T}}$$
Where $S$ is the spot price (aligned underlying futures settlement), $K$ is the option strike price, $\sigma$ is the volatility assumption ($16\%$ baseline), $T$ is time to expiration in years ($DTE / 365$), and $r$ is the risk-free interest rate ($5\%$).
Dollar Gamma Exposure (GEX) per Strike:
To translate unit option gamma into dealer dollar hedging obligations, the raw gamma is scaled by Open Interest, spot price squared, and a $1\%$ ($0.01$) spot price move multiplier:
Pure Calculation Code Snippet:
// Pure Black-Scholes-Merton Gamma Function function calculateBSMGamma(spot, strike, iv, dte, riskFreeRate = 0.05) { const S = parseFloat(spot); const K = parseFloat(strike); const sigma = parseFloat(iv); const T = Math.max(parseFloat(dte) / 365, 0.0001); const r = parseFloat(riskFreeRate); if (S <= 0 || K <= 0 || sigma <= 0) return 0; const d1 = (Math.log(S / K) + (r + (sigma * sigma) / 2) * T) / (sigma * Math.sqrt(T)); const nPrimeD1 = Math.exp(-0.5 * d1 * d1) / Math.sqrt(2 * Math.PI); return nPrimeD1 / (S * sigma * Math.sqrt(T)); }
2. The 3-Sigma Volatility Fencing Filter
Real-world options chains contain hundreds of illiquid, far out-of-the-money strike prices (e.g. $1,000 puts or $8,000 calls). Including these extreme tail strikes in cumulative GEX calculations introduces severe mathematical distortions. AurumGamma applies a rigorous 3-Sigma Volatility Fence centered on spot price:
Only strikes falling within the $[\text{Lower Fence}, \text{Upper Fence}]$ boundary are admitted into the GEX matrix, ensuring wall discovery and zero gamma flip calculations focus exclusively on institutionally active, liquid strikes.
3. Wall Discovery Methodology & Mechanical Objectivity
Option walls represent major structural price floors and ceilings. AurumGamma enforces strict directional constraints on wall discovery:
📞 Call Wall Discovery Rule
Constrained strictly to strikes $\ge \text{Spot}$. Identifies the strike with the maximum positive Call GEX above spot, establishing an objective overhead resistance ceiling.
🔻 Put Wall Discovery Rule
Constrained strictly to strikes $\le \text{Spot}$. Identifies the strike with the maximum negative Put GEX below spot, establishing an objective support floor.
4. Zero Gamma Flip Calculation & Minimum Exposure Fallback
The Zero Gamma Flip Level marks the boundary where net dealer gamma transitions from positive (mean-reverting, low volatility) to negative (trend-accelerating, high volatility).
Path A: Linear Interpolated Zero-Crossing
Fenced strikes are sorted ascending by price, and a running cumulative sum of net GEX ($\text{CumGEX}$) is computed. The engine scans for adjacent strikes $K_1$ and $K_2$ where $\text{CumGEX}$ crosses zero ($\text{CumGEX}_1 < 0$ and $\text{CumGEX}_2 > 0$). Exact flip price is linearly interpolated:
$$\text{Flip Price} = K_1 - \frac{\text{CumGEX}_1 \cdot (K_2 - K_1)}{\text{CumGEX}_2 - \text{CumGEX}_1}$$
Path B: Minimum Exposure Fallback (Gamma Valley)
If the entire options chain is overwhelmingly Call-dominated or Put-dominated across all fenced strikes, no zero-crossing exists ($\text{isFallback: true}$). In this scenario, the engine identifies the strike with minimum absolute Net GEX ($\min |\text{Net GEX}|$), designating the "Gamma Valley" as the regime boundary.
5. Highest Open Interest Contract Selection Methodology
Unlike equities where front-month options always hold maximum volume, COMEX Gold option liquidity concentrates in specific quarterly/annual benchmark expirations (e.g. December `OGZ26`).
AurumGamma queries all listed Gold option contract expirations daily, dynamically selecting the contract with the absolute highest total Open Interest. Selecting the highest-OI contract rather than nearest-expiry prevents false low-liquidity signals during monthly contract roll windows.
6. Worked Historical Example (`OGZ26` Dec 2026 — Trade Date: 07/29/2026)
Below is an exact step-by-step walkthrough using real, verified CME Gold options data directly from AurumGamma's live production database (gamma_levels.json):
7. Engine v1 Scope & Known Limitations
In accordance with our commitment to quantitative transparency, we explicitly document the scope boundaries of our v1 engine:
- Fixed 16% Implied Volatility Baseline: The v1 engine utilizes a fixed 16% annual IV baseline across strikes rather than a live multi-strike IV surface skew curve.
- Daily Settlement Snapshots: Calculations process official CME daily settlement files. Real-time intraday tick streaming (0DTE logistic decay) is scheduled for the v2 engine rollout.
8. Credibility Block & Financial Disclaimer
About AurumGamma Quantitative Derivatives Research Desk
AurumGamma provides institutional-grade derivatives analytics, CFTC commitment ledgers, and 0DTE options gamma exposure (GEX) tracking for spot Gold (XAUUSD) and COMEX Gold futures (GC).