Skip to main content
Every weekday at 5:30pm ET, a ranked digest of the day’s most-significant insider buys lands in Slack. Total cost per year: less than what a junior analyst makes in a week.

What This Example Shows

  • A four-stage SequentialWorkflow — Parser → Insider Profile Lookup → Cluster Detector → Signal Scorer — applied to every Form 4 the SEC publishes
  • How to ingest the EDGAR Form 4 RSS firehose (500-1000 filings/day) without your job choking on it
  • Insider history lookups that anchor each transaction against the person’s prior trading behavior
  • Cluster-buy detection: multiple distinct insiders buying the same ticker within 30 days
  • A 0-100 significance score that filters the firehose down to a handful of HIGH conviction signals
  • /v1/swarm/batch/completions running the whole day’s filings in a single overnight job
EDGAR publishes 500-1000 Form 4s every trading day. Single-shot /v1/swarm/completions calls breach Free-tier rate caps by mid-morning. The batch endpoint is the right tool — note that it requires a premium tier (Pro, Ultra, or Premium) — see Rate Limits for the per-tier numbers and upgrade at https://cloud.swarms.world/settings for Pro/Ultra/Premium throughput.

Why This Matters

Cluster insider buying has 30+ years of peer-reviewed alpha behind it — when three or more insiders at the same company open-market-buy stock inside a thirty-day window, forward returns over the next 6-12 months beat the market by a meaningful margin in nearly every cut of the data. The signal is not the hard part. The hard part is the firehose: EDGAR publishes 500-1000 Form 4s per day, the vast majority are options exercises, automatic 10b5-1 sales, or token grants that mean nothing. Filtering 800 filings down to the three that actually matter — a CFO buying open-market for the first time in two years, alongside two directors inside the same week — is a parsing, classification, and scoring problem at scale. That is exactly what a sequential swarm running over a batch endpoint is built for.

The Architecture

Step 1: Setup

Step 2: Define the Function Tools

Each agent calls into one or more of these tools. The schemas are OpenAI function-call shape and are attached per-agent via tools_list_dictionary.

Step 3: Define the Four Pipeline Agents

The first two stages are mechanical parsing and history retrieval — gpt-4.1-mini handles them cheaply. Cluster detection needs a stronger model that can reason about overlap windows; gpt-4.1 does that work. The final significance score is the only step that exercises real judgment, so claude-sonnet-4-5 gets the closing call.
The Parser and Profile Lookup stages are pure extraction — they almost never need to think. Reserving claude-sonnet-4-5 for the Signal Scorer is where the cost-per-Form-4 math stays under three cents.

Step 4: Process One Form 4 End-to-End

Before scaling, prove the pipeline on a single filing.
The Signal Scorer’s final JSON is the row you persist. The other three stages are the audit trail — every score is fully reproducible from the parsed filing, the insider history snapshot, and the cluster counts that fed into it.

Step 5: End-of-Day Batch Pipeline

EDGAR’s Form 4 RSS feed publishes accession numbers in close to real time. Pull the day’s list at 5:30pm ET and submit it in chunks — /v1/swarm/batch/completions accepts at most 50 swarms per request.
Now ship the digest to Slack.
Wire the whole thing to cron:
Run fetch_todays_form4_accessions once at 5:30pm ET — that captures the full filing window, since Form 4 has a two-business-day reporting deadline and most issuers file in the last hour before EDGAR’s evening cutoff.

Real Cost vs. Quantitative Signal Provider

Per-Form-4 cost is dominated by the Signal Scorer’s claude-sonnet-4-5 call; the three preceding mini/gpt-4.1 stages add only fractions of a cent. You are buying the same firehose-to-signal transform a quant data vendor sells, for roughly 2% of what they charge — and you own the prompt, the scoring rubric, and the audit trail row-by-row.

Next Steps