Oil terminal
A Bloomberg-style screen for oil markets that runs on free data. I built it in Python so a starting oil trader can get the morning view (curves, spreads, options, inventories, positioning and tanker flows) without paying for a terminal.
- Built with
- Python, Streamlit, Plotly, pandas
- Data
- Yahoo Finance, CBOE, EIA, CFTC, aisstream.io
- Code
- 2,244 lines in one file, available on request
HOW TO READ · WTI − Brent is the US export arbitrage: more negative means US crude is cheap and exports get pulled. The shaded bands are ±1 and ±2 standard deviations around the 1-year average. Readings outside ±2σ are statistically stretched and often mean-revert, but a real change (outage, sanctions, new pipeline) can keep a spread there for months.



Try it: click a function or type one and press Enter. SPRD is redrawn here from EIA daily spot prices up to 3 November 2026; in the app it reads delayed futures. TANK, CAL and HELP are captures of the running app.
What's on it
You type a function and press Enter, the same way you would on a Bloomberg. MON is the morning monitor. CURVE draws forward curves for WTI, Brent, gasoline, heating oil and gas, with last week's and last month's curves on top. SPRD tracks the WTI–Brent, crack and calendar spreads against their usual range. OMON reads the USO and BNO option chains for implied volatility, the smile and the term structure.
EIA puts weekly US stocks, production and demand against their five-year seasonal range, and COT splits CFTC positioning into managed money, producers and swap dealers. TANK maps the main crude routes and chokepoints, and plots live tanker positions once you add a free AIS key.
How it's built
Everything comes from free sources: delayed CME and ICE futures through Yahoo Finance, CBOE's oil volatility index, the EIA and CFTC APIs, and an AIS websocket for ships. One cached download feeds most screens, slow calls run in parallel, and a failed request shows an error instead of breaking the page.
Futures expiry dates come from the CME and ICE contract rules with a NYMEX holiday calendar, so the curve and the calendar always agree on which month is front. The desk chat keeps an append-only log where each line carries a SHA-256 hash of the one before, so an edited or deleted line breaks the chain and shows up straight away.