← Back
Case Study

SATS

Social Arbitrage Trading System

13
containers
8
signal gates
10
agents
7
signal sources

SATS is a fully autonomous paper trading system running on self-hosted infrastructure: a GMKtec NucBox M5 Ultra mini PC running Ubuntu Server, hostname murderbot. Signals flow through an 8-gate pipeline staffed by 10 specialized AI agents before a single trade is submitted.

The system ingests signals from seven independent sources — Reddit, StockTwits, HackerNews, Polygon News, X/Twitter cashtags, SEC EDGAR 8-K filings, and Google Trends — then validates them against market data, macro conditions, and cross-platform corroboration before a risk guardian issues a GO. Three sub-agents (1B, 1C) handle value dislocation and fundamental signals independently of the social pipeline. It operates autonomously, monitored and controlled entirely through Telegram.

Not a prototype. A working system, built the way you'd build anything meant to hold.

8-gate signal pipeline
SIGNAL SOURCES
Reddit
StockTwits
HackerNews
Polygon News
X/Twitter
SEC EDGAR
Google Trends
Claude API
INGESTgates 01 – 02
GATE 01
Multi-source ingestion
Agent-1 · Social Trend Scout

Polls seven signal sources: Reddit (Apify), StockTwits, HackerNews, Polygon News, X/Twitter cashtags, SEC EDGAR 8-K filings, and Google Trends. Volume thresholds and sentiment polarity scoring per source.

GATE 02
Signal deduplication & CCS scoring
Agent-2 · Information Arbitrageur

Hash-based dedup at ingestion prevents duplicate signals under high volume. Scores novelty, source authority, and cross-platform corroboration (CCS) before passing downstream.

VALIDATEgates 03 – 04
GATE 03
Cross-platform corroboration
Agent-3 · Quantitative Validator

Requires 2+ independent strategies agreeing on the same ticker. Statistical significance testing against Polygon.io market data. Price correlation and z-score checks. Configurable thresholds via env.

GATE 04
Regime classification
Agent-5 · Macro Intelligence

FRED macro data and VIX regime detection. Scores market conditions on a 0–100 scale. Adjusts signal scoring thresholds dynamically — REDUCED_75PCT or REDUCED_50PCT regimes hard-limit position sizing.

ANALYZEgates 05 – 06
GATE 05
Technical entry
Agent-4 · Technical Entry Analyst

RSI, MACD, and ATR-based stop levels via Polygon.io historical data. Momentum confirmation and entry price targeting. Technical breakout scanner runs independently as a signal source alongside social signals.

GATE 06
Macro clearance
Agent-5 · Macro Intelligence

Fed calendar and economic event overlay. DXY macro feed via FRED. Macro-clears or hard-rejects signal before risk review. Geopolitical event detection via NewsAPI sector bias scoring.

CONTROLgate 07
APPROVAL GATE
GATE 07
Risk guardian
Agent-6 · Risk Guardian

The single approval gate. 5-state circuit breaker (NORMAL → CAUTION → WARNING → CRITICAL → HALT), portfolio exposure limits, PDT compliance. All 6 upstream gates must pass before a GO signal is issued. SYSTEM_HALT authority.

EXECUTEgate 08
GATE 08
Order execution
Agent-7 · Executioner

Quarter-Kelly position sizing with ATR-based stop placement. Idempotent order submission to Alpaca prevents duplicate trades on retry. T+1 settlement tracking. Syncs AUM and settled_cash on startup and every 5 minutes.

Alpaca Markets API
paper tradinglive-ready · $25K AUM target
Infrastructure
PostgreSQL
Signal + trade history
Redis
Real-time signal queue + credential TTL
Docker Compose
13-container orchestration
Tailscale
Secure remote access
Vaultwarden
Secret management — agent credentials distributed by Agent-0 at session open
Telegram
Alerts, kill-switch + mobile control
Notable engineering challenges
Gate 7 false position close
Empty Alpaca API response during a network blip caused Agent-6 to log phantom position closes, tripping the circuit breaker and halting the system. Fixed by requiring confirmed fill data before any position state change.
Alpaca 422 idempotency bug
422 responses on duplicate order IDs were counted as rejections, tripping the circuit breaker. Fixed by treating 422 as success at the executor layer — idempotent by design.
Signal deduplication at scale
Duplicate social signals were passing Gate 2 under high volume. Fixed with hash-based dedup at Agent-2 ingestion before scoring. Redis stores article/post IDs with 24hr TTL.
Polygon atomic rate limiter
Burst requests during market open were hitting API limits across concurrent agents. Implemented a Lua-based atomic sliding window rate limiter in Redis — shared across all agents, no double-counting.