← Cloud Compute
Client delivery · Serverless data platform

Multi-Market Discovery Engine on AWS

A serverless platform for a trading client: every night it collects end-of-day and intraday data for ~19,000 shares on nine exchanges, runs the client's proprietary ranking engine across 28 timeframes, and serves the next morning's ranking in a signed-in web app. Live every night since October 2026 and built in weekly sprints that each end in a review of real output — 1,268 commits in the first three weeks, every release checked by a live UI robot that rolls the deploy back on its own if anything fails.

Python 3.12 AWS SAM Lambda (container image) Step Functions EventBridge Scheduler SQS + DLQ S3 Parquet + DuckDB DynamoDB Cognito Vue 3 + TypeScript GitHub Actions
⚡
Built with agentic AI. Development on this project runs through multi-agent Claude Code workflows — developer → independent-reviewer cycles with evidence gates, batched into unattended runs that execute overnight and resume from committed ledgers. How the agent system works →
~19,000
shares on 9 exchanges, refreshed every night
28
timeframes ranked per share, from one data request
1,268
commits in the first three weeks
1,700+
automated tests, plus a 233-case live UI robot

The nightly pipeline

Each exchange is collected about four hours after its own close, in its own timezone and holiday calendar. At night one state machine ranks the whole universe; by morning the app shows the result.

Collect
18 EventBridge schedules (9 markets × weekday + Saturday catch-up). A plan Lambda splits each market into chunks on SQS; capped workers fetch them, failures go to a dead-letter queue.
→
Store & rank
Bars land as Parquet on S3 and are queried with DuckDB. A Step Functions run plans, fans out over up to 20 chunks in parallel and reduces the result to one ranking file.
→
Serve
One Lambda behind an API Gateway HTTP API with a JWT authorizer serves both the API and the web app; Cognito holds the users, a warm-up ping removes cold starts.

The data API as a hard budget

  • The market-data provider allows a fixed number of calls a day and a minute; a shared counter in DynamoDB tracks every call, and a run stops on the first throttle instead of recording a partial night as a result.
  • Two base series per share are fetched; every other timeframe is derived locally, so one request serves many timeframes. History is back-filled once, then only new bars are fetched.
  • Removing duplicate and non-share listings from the universe cut about 3,400 calls a night.

Checked against an outside reference

  • The engine's output was compared bar by bar with 42 exports from the client's charting platform, with a written report of every difference and its cause.
  • The UI robot checks the numbers the app shows against an independent second implementation of the calculations, so a refactor cannot quietly move a number.
  • Every market keeps its own session calendar, timezone and holidays — there is no single US schedule anywhere in the code.

Releases that roll themselves back

  • A rollout script deploys, then runs a live UI robot that presses every control of the app (233 cases); if any fails, the previous version is restored automatically.
  • All infrastructure comes from five SAM stacks — base, config, ingest, engine, dashboard — with alarms on every stage; nothing is created by hand in the console.
  • All five Lambdas share one container image, built in CodeBuild. Nothing runs when there is no work.

The web app

  • Vue 3 + TypeScript + PrimeVue, installable on phone and desktop: ranking table, search, a detail panel per share, settings, CSV export, dark mode and a phone layout.
  • Invite-only access: only an admin creates users, from a users tab inside the app.
  • Its own design system — tokens, components and self-hosted fonts — shared by every screen.
  • Next in delivery: a markets × timeframes grid, saved searches, charts, a watch list and invite-only Google sign-in.

Delivered in sprints the client can see

Stage gates on real output

  • Five sprints, each ending in a review of real output — collected data, a ranked night, a working app — never of a slide.
  • A roadmap, weekly status pages and sprint reports go to the client as PDFs, alongside data-collection and comparison reports that explain every open question in plain words.
  • The client is a collaborator on the repository: every commit, task brief and open blocker is visible to them as it happens.

An agent team on a ledger

  • Work is cut into small tasks in batch files; a GitHub Actions dispatcher starts one cloud Claude Code session per task, and an independent review gates every change.
  • Progress lives in a committed ledger, so a run resumes after any interruption and the client can read exactly what is done.
  • About 143 tasks across 18 batches shipped in the first three weeks.