Real-Time Derivatives Workstation
ES Payoff Live
A real-time options workstation for ES mini futures: live broker feed, multi-leg payoff with calendar/diagonal support, expected-move ladder, IV vs realized synthesis, and a rule-based regime read. Built as personal trading infrastructure. The static ES Options Payoff tool grew up.
The need
The static ES Options Payoff tool is great for sketching an idea, but it can’t answer the questions that actually drive a trade: What is ES doing right now? Is implied vol rich or cheap vs what’s been realized? Is the term structure in backwardation? What does the front-expiry ATM straddle imply for the day’s expected move? Those questions need live data, and they need it synthesized: not just printed in a table.
Broker platforms ship most of these numbers individually, scattered across tabs and panels, in a UI built around order entry rather than research. ES Payoff Live pulls everything into one screen designed for thinking, not clicking: live feed in, payoff & greeks out, regime synthesis underneath, snapshot-and-replay for after-hours work.
What it does
- Live ES + VIX family feed: front-month ES futures plus VIX, VIX1D, VIX9D, and VIX3M streamed from a broker API into an in-process WebSocket broadcaster.
- Multi-leg payoff with calendar/diagonal support: same Black-76 engine as the static tool, but with a “1st Expiry” overlay that solves the awkward case where the front leg of a calendar has expired but the back leg hasn’t.
- Live greeks per leg: bid/ask mid, IV, delta, gamma, theta, vega pulled per-strike on demand from the chain snapshot.
- Expected-move ladder: ATM straddle priced at multiple DTE targets so the term structure of expected move is visible at a glance.
- Realized vs implied vol: HV5/10/20/30 against VIX1D/VIX9D/VIX and an IV÷RV ratio that flags rich/cheap premium.
- 25Δ risk reversal and max-pain: skew read in vol points and a max-pain strike computed from the chain’s open interest.
- Climate & regime synthesis: rule-based label (Risk-On Uptrend, Volatility Stress, Range-Bound, etc.) plus a plain-language narrative on the current vol environment.
- Snapshot mode: freeze the full chain to disk with a single click, then replay the position as it was at that moment for after-hours research.
- Weekend-resilient state: warm parquet replay on restart and last-known fallback for halted instruments mean the dashboard isn’t blank when the market is closed.
- Public-view mode: a dedicated
/publicroute hides tooltips, legends, and dev controls so the same dashboard can be shared as a clean screenshot.
Tech stack
- Python + FastAPIAsync server hosting both the REST/HTML surface and the WebSocket broadcaster. ~2k lines of Python, ~3.6k lines of front-end.
- ib_insyncAsync wrapper over the broker’s native TWS API. Handles the live tickers, front-month resolution, chain pulls, and reconnects.
- In-memory ring buffer + parquet warehouseEvery tick lands in a per-stream ring buffer with periodic atomic flush to date-partitioned parquet on disk. Warm reload replays the buffer on restart.
- DuckDBReads the parquet warehouse with
union_by_nameto survive schema drift across days. - Black-76 in vanilla JSSame futures-options pricing model as the static tool: lifted forward as the canonical math engine on the client.
- Chart.js 4.4Drives the payoff, decay-sweep animation, and the half-dozen mini ES trend sparklines (2W / 1M / 3M / 6M / 1Y / 5Y).
- WebSocket diff broadcasterServer pushes only what changed (live ticks, chain updates, expected-move recompute, market-read refresh) at a configurable Hz.
- No build step on the clientOne
index.html, oneapp.js, one stylesheet. Open the file, read the code: same shape as the static predecessor.
What the design buys you
- Survives a restart with zero blank state: warm parquet replay means the chart, expected move, and VIX tiles repopulate immediately. Worst case loses one flush cycle of ticks.
- Survives a closed market: cash VIX halts overnight and on weekends, but the dashboard falls back to last-known close per instrument so the regime read stays meaningful.
- One screen for thinking: the climate label, regime narrative, vol regime card, and expected-move ladder are intentionally co-located so reading the market is one glance, not five tabs.
- Snapshots are first-class: after-hours research replays the exact chain state from a known moment, with the same UI as live.
- Clean handoff for screenshots: the
/publicroute strips informational chrome without forking the codebase, so what gets shared looks like a product, not a developer’s console.
Why it’s not a public web app
The live data feed comes from a per-user broker subscription that’s tied to my account. Market-data licensing prohibits redistributing the raw feed, so this can’t be hosted publicly the way the static tool can: it runs locally against my own broker session. Screenshots and architecture detail are public; the live ticks stay on my machine.
Status
Used daily as personal trading infrastructure. Active code base: the regime synthesis, snapshot mode, and weekend-resilience were all added on top of the original payoff engine over time. Source not currently public.
Disclaimer
Not investment advice. Pricing uses the standard Black-76 model with live broker quotes. Regime labels and posture suggestions are rule-based heuristics, not signals. Trade your own capital.