Back to work

Market-intelligence pipeline

SPY GEX + AI Morning Call

A daily pipeline that turns options, volatility, calendar and headline data into a short market brief. Every level is computed and stored before a language model writes any text.

Product Surface

Bar chart of SPY net gamma exposure by strike from 680 to 790 for November 20, 2026, mostly negative below 731. Spot 708.21, gamma flip 731, put wall 710, and call wall and magnet strike 775 are marked. A table lists full-chain and 0DTE levels.
Net gamma exposure by strike and the derived levels for November 20, 2026, drawn for this page from the values the pipeline stored in SQLite.
SPY GEX and AI Morning Call architecture diagram
Daily orchestration across market data, gamma analytics, model-generated brief text, and X publishing controls.

Problem

A morning market note has to be ready before the open on every trading day, and it is only as good as the numbers under it. Asking a language model for commentary gives fluent text with nothing to check it against. The numbers needed to be computed first, stored so any day can be reviewed later, and kept apart from the step that writes and publishes the text.

Solution

Two Python pipelines share the work. CalculateGamma pulls the SPY options chain and SPY and VIX prices, then computes gamma exposure for the full chain and for same-day (0DTE) options. From that it derives the levels a reader looks for. These are the gamma flip, the magnet strike, the top call and put walls, and the put/call open-interest ratio. ATR and VIX set an expected range for the day, and a prior-day comparison shows how the levels moved. The results go to SQLite, CSV files, TradingView Pine inputs and a written brief.

AI Morning Call adds macro indicators, futures, ETFs, the economic calendar and FinancialJuice headlines. The database held 1,798 stored headlines at the time of review. Four hosted models answer the same prompt, and a local Qwen model combines their answers by equal vote. The run stops before the vote if fewer than two models respond, and every raw answer is saved next to the final post.

Daily Output

Daily brief for November 20, 2026 with sections for key levels, scenario map, market structure and catalyst context, followed by the post-ready text.
The brief and post-ready text the pipeline wrote for November 20, 2026, rendered for this page from its output files. Market commentary, not advice.

Workflow

SPY GEX workflow diagram
The pipeline computes analytics first, then uses model generation and post validation as later stages.

Design Decisions

Analytics Before Language

Gamma levels, VIX context, ATR ranges and prior-day shifts are computed before any model text is generated, so the brief describes numbers a reader can check.

SQLite Replayability

Daily market state, briefs, generated posts, model answers and outcomes are stored so any run can be reviewed later. The gamma tables are written with upserts, so rerunning a day replaces its rows instead of duplicating them.

Publishing Separation

The post step validates credentials, content file, and length separately from data collection and brief generation.

Model Accountability

A scorecard stores each day's stated range next to the actual high, low and close. Each model's answer is logged with the day's outcome instead of living only in a one-off prompt.

Operations And Reliability

Both runners work in Eastern Time and check the market calendar. On a non-trading day the morning call still stores its data but skips the model calls, and it does not post on half-days. A failed gamma run sends an email or ntfy alert, and the morning call alerts over Telegram. The morning call prunes its tables on 30-day and 180-day retention windows. Posting to X is optional and has a dry-run mode.

The GexLevels account on X is the public output for the brief. The output is market commentary. It is not investment advice, and the project makes no trading-performance claim.