Skip to content

About

Options market structure copilot — GEX, gamma levels, dealer positioning, LLM agent

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

FlowDeck — Options Market Structure Copilot

An agentic dashboard that answers the question you're asking every morning: "Where's the gamma, what's the flow saying, and what setups exist today?"


What It Does

  • GEX Profile — Computes net gamma exposure (GEX) per strike across the full SPY/QQQ chain. Visualises dealer positioning and flags gamma walls, the zero-gamma level, and max pain.
  • Gamma Regime Detection — Tells you whether the market is in positive gamma (mean-reverting, rangebound) or negative gamma (trending, amplified moves) and where the flip level sits.
  • Live Screener — Scans the watchlist every cycle and surfaces approaching gamma walls, gamma flip proximity, and elevated IV rank.
  • LLM Copilot — Ask questions in plain English. "Why is SPY pinned at 620?" pulls the GEX profile, sees the gamma wall, and explains it with actual numbers.
  • Signal Eval Harness — Logs every screener flag with the spot price at signal time. Resolve signals later with outcomes to build a hit-rate track record.

Architecture

frontend/          React + Recharts dashboard
backend/
  analytics/       GEX engine, screener, IV rank
  ingestion/       Polygon.io options chain client + APScheduler
  agent/           Claude tool-use agent (read-only)
  api/             FastAPI routes + SSE streaming
  db/              SQLAlchemy models, TimescaleDB
docker-compose.yml TimescaleDB + backend + frontend

GEX Formula

Net GEX at strike = (Call_Gamma × Call_OI − Put_Gamma × Put_OI) × 100 × Spot² × 0.01

Positive → dealers long gamma → price-stabilising (sell rallies, buy dips)
Negative → dealers short gamma → price-amplifying (chase moves)

Quick Start

# 1. Copy env and fill in your keys
cp .env.example .env

# 2. Start everything
docker compose up

# 3. Frontend → http://localhost:5173
# 4. API docs → http://localhost:8000/docs

Run backend locally (no Docker)

cd backend
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload

Run frontend locally

cd frontend
npm install
npm run dev

API Endpoints

Method Path Description
GET /api/gex/{symbol} Latest GEX snapshot
GET /api/gex/{symbol}/strikes Net GEX per strike (chart data)
GET /api/gex/{symbol}/history Intraday GEX trend
GET /api/levels/{symbol} Key levels sorted by distance
GET /api/flow/{symbol} Unusual volume flow
GET /api/screener Ranked alerts across watchlist
POST /api/agent/query SSE stream — LLM copilot query
GET /api/signals/{symbol} Signal log + hit rate
POST /api/ingest/{symbol} Manual ingestion trigger

Design Decisions

Read-only on execution. The agent can query positions and explain market structure but cannot place orders. Human confirms in the broker app. This is intentional — "I built a market-structure intelligence system with human-in-the-loop execution and a measured signal track record" is a better story than an autonomous trading bot.

Signal eval harness. Every screener flag is logged with the entry context. Resolving signals with outcomes builds a real hit-rate metric — an AI project with measured performance instead of vibes.

TimescaleDB. Storing full chain snapshots over time lets you compute OI deltas and IV changes, not just current state. That delta is where the signal lives.

Keys Needed

  • Polygon.io — Options chains + greeks (free tier available)
  • Anthropic — Claude for the copilot agent
  • Tradier key optional (alternative data source)

About

Options market structure copilot — GEX, gamma levels, dealer positioning, LLM agent

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages