GEXR · BACKTEST 2022 – 2026

GEX Reverter

Systematic mean reversion at dealer-gamma walls on the S&P 500, trading live on a prop-firm account.

LIVE · PROP
SPX 15m · Example tradeGEXR
LOADING_

5 Sep 2025 (backtest). Price tags the put wall late morning, the strategy buys it, and the target is hit on the next bar.

Backtest equity
LOADING_

4-year backtest with prop-firm costs.

Strategy logic
  • Price tags a major dealer-gamma wall
    • Gamma and volatility regime decide where the entry sits
    • Trend filter must agree with the direction
  • Risk defined by the next gamma level beyond the wall
  • Calendar and time-of-day guards around OPEX and the close
▶ Fades the wall with a resting limit · fixed stop and target · risk-based size
Trades
499
Win rate
72.7%
Profit factor
2.60
Sharpe
6.69
Max drawdown
6.7%
Walk-forward PF
2.72

* 4-year backtest (2022–2026), the configuration closest to what is deployed, with prop-firm costs. Not live results.

Overview

Thesis: when dealers are long gamma, their hedging dampens moves and tends to pin the index between the largest gamma strikes. Every 15 minutes the strategy rebuilds those levels from SPX and SPXW greeks and open interest, then fades the walls, with gamma-regime, volatility-regime and trend filters deciding whether and where to engage.

Execution is split across two machines: a Python engine computes levels and sends commands over a TLS socket to an MQL5 expert advisor, which places limit orders with stop and target attached and reports fills back. The broker is the source of truth for positions.

Highlights
  • Out-of-sample: walk-forward with 18-month train / 6-month test windows — 342 out-of-sample trades, profit factor 2.72, every test window profitable.
  • Cost sensitivity: still profitable (PF 1.45) at about 7× the assumed slippage.
  • Conservative fills: if a bar touches both stop and target, the stop counts first; gaps through the stop fill at the open.
  • Risk: per-trade risk chosen from a Monte Carlo ruin analysis against the prop firm’s drawdown rules, with daily and total loss limits enforced in code.
  • One engine for backtest and live; 436 tests.
Notes & caveats
  • Thresholds and exact entry rules are deliberately left out — this strategy is trading live.
  • All figures are backtests. A Sharpe this high comes from a selective strategy with tight, defined risk; I treat it as an upper bound until there is a live track record.
Stack
Python 3.11pandasNumPypydanticAPSchedulerFastAPISQLiteMQL5TLS socketsWireGuardDockerThetaDataFMP