STARFISH — Market Dynamics

Inspiration

In equities, there are really only two edges that matter: time and data. Everything else — strategy, conviction, timing — is downstream of those two things. Institutional desks at JPMorgan, Citadel, and Jane Street win because they have both in abundance: Bloomberg terminals, proprietary data feeds, teams of quants, and infrastructure most people will never touch.

I come from a middle-class family. I could never justify a $24,000/year Bloomberg Terminal subscription just to learn how markets actually work. And that gap bothered me — not because I think retail traders should "beat" institutions, but because the asymmetry of information itself feels like the real problem. A person walking into the market today is already competing against entities with more data, more compute, and more people, before they've even placed a single trade.

STARFISH is my attempt to close that gap, even slightly: a single-file, zero-cost platform that gives anyone institutional-style market intelligence — live prices, technicals, fundamentals, macro data, AI-driven analysis, and even alternative data like shipping and satellite imagery — for free, in the browser, in real time.

What it does

STARFISH is a full-stack market intelligence dashboard that fuses together:

  • Live US Equities — a 12-stock watchlist streamed through a 4-tier price waterfall (Alpaca WebSocket → Alpaca REST trades/quotes/bars → yfinance fallback), so there's always a live number on screen.
  • Live Crypto — a 31-asset watchlist (BTC, ETH, SOL, and 28 others across Layer 0/1/2, DeFi, Oracle, and meme categories) refreshed every 10 seconds via CoinGecko, complete with real 24h sparkline charts.
  • Interactive Charting Engine — candlestick and line charts with SMA/EMA, Bollinger Bands, RSI, MACD, and volume overlays, rendered with Plotly.
  • A 5-model AI Trading Desk — Llama 3.3 70B, Llama 3.1 8B, Llama 4 Scout, GPT-OSS 20B, and GPT-OSS 120B (via Groq), each fed the same structured brief: 12+ technical indicators, live FRED macro data, fundamentals, shipping context, and a real-time price snapshot — so the model never has to guess a number it can verify. Every analysis comes back as a structured JSON verdict (BUY/SELL/HOLD, confidence, entry/stop/targets) and supports grounded follow-up chat.
  • Monte Carlo GBM Simulation — forward price projections calibrated on two years of real historical log-returns, run client-side against up to 1,000 simulated paths.
  • Prediction Market Consensus — live cross-referencing of Manifold Markets and PredScope (Polymarket-based) to sanity-check the AI's own read on an event.
  • Sector Intelligence — 11 GICS sectors, each with live-scraped news from 8 financial sources (Reuters, CNBC, WSJ, Yahoo Finance, MarketWatch, FT, Benzinga, Seeking Alpha) and 30 curated satellite-imagery targets per sector (refineries, ports, fabs, mines — real infrastructure that moves the stock).
  • Live Sentinel-2 Satellite Viewer — powered directly by the Copernicus Data Space Ecosystem, with 5 spectral layers (True Color, False Color, NDVI, SWIR, Geology), cloud-cover filtering, and automatic OAuth2 token refresh.
  • Live AIS Vessel Tracking & ADS-B Aircraft Tracking — real-time shipping and aviation traffic overlaid on a Leaflet map, because supply chains move markets before earnings calls do.
  • Native Acceleration Layer — on first run, STARFISH silently attempts to JIT-compile C++ and Rust extensions for its hottest math (EMA, RSI, ATR, OBV, tile projection), falling back to pure NumPy/pandas if no compiler is present, so it runs anywhere and runs faster where it can.

Alongside STARFISH, I've also been building RUN01 — a fully browser-based Python IDE (Pyodide + Monaco + Flask) that runs NumPy, Pandas, SciPy, Scikit-Learn, Statsmodels, Matplotlib, Seaborn, and Plotly entirely client-side via WebAssembly, with live Yahoo Finance and FRED proxies built in. It's the natural companion to STARFISH: one platform pulls and analyzes the data, the other lets you write your own code against that same live data, with zero setup and zero server-side compute cost.

How we built it

STARFISH is intentionally a single Python file (starfish.py) — no database, no frontend build step, no separate services to deploy. Flask serves the shell HTML and proxies everything that needs server-side execution (Yahoo Finance scraping, FRED, Piston-style compute, Groq calls, Copernicus OAuth2), while the browser handles rendering, WebSockets, and live map/chart interactivity.

The stack:

Layer Technology
Server Flask (single WSGI app)
Live equities Alpaca paper-trading WebSocket + REST
Live crypto CoinGecko REST
Historical data Custom multi-tier Yahoo Finance scraper (v8 chart API → v7 CSV → yfinance library fallback)
Macro data FRED official REST API
AI inference Groq (Llama 3.x, Llama 4 Scout, GPT-OSS 20B/120B)
Charting Plotly
Maps Leaflet + Leaflet.draw
Satellite Copernicus Data Space Ecosystem / Sentinel Hub Process API
Native hot paths C++ (g++) and Rust (rustc), JIT-compiled on first run
Deployment Vercel (@vercel/python), zero-config

RUN01, the companion Python sandbox, runs on Pyodide (Python 3.x → WebAssembly) with Monaco as the editor, and a thin Flask layer purely for CORS-bypassing proxies (Yahoo Finance, FRED) and compiled-language execution (C++/C#/Rust via Piston). No user code ever touches the server.

Challenges we ran into

  • Nothing on the site is static or mocked — every chart, every price, every satellite tile is a live fetch, which means every subsystem can fail independently and has to degrade gracefully instead of breaking the page.
  • Live Sentinel-2 imagery needed to refresh automatically (roughly every 5 minutes) while respecting Copernicus's OAuth2 token lifecycle (27-minute expiry) and cloud-cover filtering — getting the tile-proxy math (XYZ → WGS-84 bbox) right and fast enough was its own small project, which is part of why it ended up as one of the native C++/Rust hot paths.
  • Yahoo Finance has no official public API, so the scraper needed a 3-tier fallback (v8 chart JSON → v7 CSV download → yfinance library) with rotating crumbs and user agents just to stay reliable.
  • Grounding the AI, not just prompting it — making sure the model never hallucinates a live price required literally overriding the model's numeric context with a verified real-time snapshot (Alpaca WebSocket → REST → yfinance) before every single analysis and follow-up question.
  • Real-time without a real budget — building all of this against free-tier APIs (FRED, CoinGecko, AISStream, adsb.lol, Manifold) meant designing careful caching, rate limiting, and graceful fallbacks everywhere, since there was no infrastructure budget to fall back on.

Accomplishments that we're proud of

  • A genuinely free, single-file platform that puts institutional-grade data — live prices, macro, fundamentals, technicals, shipping, and satellite intelligence — in front of anyone with a browser.
  • An AI trading desk that is explicitly instructed, and architecturally forced, to ground every claim in real fetched data rather than guesswork — including a live price override, a data-quality report in every prompt, and price-target consistency validation.
  • A native acceleration layer that quietly makes the whole platform faster wherever a C++/Rust toolchain happens to be available, with zero configuration required from the user.
  • Getting live satellite imagery, AIS shipping data, ADS-B flight tracking, and financial markets all rendering on the same dashboard, at the same time, for free.

What we learned

Flask API design and deployment, production-level systems engineering across Python/C++/Rust, the practical realities of scraping and grounding live financial data, OAuth2 token lifecycle management, WebAssembly-based Python execution via Pyodide, and — maybe most importantly — how much careful engineering it takes to make "real-time" actually mean real-time when you're building on free infrastructure.

What's next for STARFISH

The long-term goal is to merge STARFISH and RUN01 into one continuous pipeline: STARFISH pulls and structures the live data, RUN01 becomes the execution environment where AI agents can autonomously write and run the quantitative analysis — backtests, custom indicators, risk models — the way a real quant desk would, without a human needing to write a line of code.

The endpoint I'm working toward is a platform where a common person, with no capital for a terminal and no team of analysts, can have an autonomous AI agent do real quantitative work on their behalf — and where "the odds are stacked against the little guy" stops being an excuse and starts being a solvable engineering problem.

Share this project:

Updates

Submission history