Insider Alerts — Autonomous SEC Signal Pipeline
This Ospina case study documents how Carlos Rico-Ospina approached a specific risk, infrastructure, revenue, or research problem and what was built to address it.
Autonomous pipeline that turns raw SEC Form 4 filings into scored insider signals—with an isolated AI agent that must earn approval before any alert fires.

The Problem
SEC Form 4 filings are the closest thing to a legal insider trading signal—corporate insiders must disclose purchases and sales within two business days. But the data arrives as XML buried in EDGAR, at high volume, mixed with noise: routine option exercises, scheduled sales, and compensation events that mean nothing. Retail traders either miss the signal entirely or waste hours manually filtering filings through basic screener dashboards.
The Insight
The value isn't in seeing the filing—it's in scoring the behavior behind it. A CEO quietly accumulating $13M in stock on the open market is a fundamentally different signal than a CFO exercising options on a vesting schedule. By building a deterministic scoring system that measures net buy/sell bias, transaction scale, and insider role—then routing scored signals through an isolated AI agent with hard approval guardrails—you get a system that surfaces conviction, not noise.
What I Built
- Built SEC EDGAR polling pipeline with rate-limited ingestion, idempotent storage, multi-pass XML locator heuristic, and Form 4 canonical fact extraction—including behavioral flag detection for 10b5-1 plans, equity compensation, tax withholding, and 13D filings
- Implemented novelty-aware scoring engine (0–100) with five weighted components—transaction size (log-scaled), net share flow, holdings-change ratio, insider role, and discretionary alpha bonus—plus 12+ cumulative novelty penalties that filter 10b5-1 plans, equity comp grants, tax withholding sales, passive 10% owner accumulation, and option exercises
- Engineered isolated quant AI agent (via OpenClaw) with batched evaluation interface, multi-strategy JSON extraction, and hard approval guardrails—score ≥ 90, net buy > 0, confidence ≥ 0.7—with deterministic rules engine fallback when agent is unavailable
- Designed deadletter/replay pattern for failed packets with full audit trail preservation and operator recovery tooling
- Integrated push notification delivery via NTFY with structured trade signal formatting and retry/backoff
Outcomes
- End-to-end autonomous pipeline: SEC RSS → parse → score → AI decide → notify—zero manual intervention required
- Safety-by-design: isolated agent workspace prevents decision tampering; deterministic guardrails override AI confidence; rules engine fallback ensures pipeline continuity when agent is unavailable
- Compliance-grade SEC access with rate limiting (5 rps), proper User-Agent, and typed error handling for feed drift
- Production ops tooling: deadletter recovery, manual decision overrides, batch processing, and full audit reconstruction—backed by 17 test suites with 90% coverage enforcement
Why It Matters
Most insider-tracking tools are dashboards that show you what happened. This system decides what matters and tells you—with an AI layer that must justify its conviction before the alert fires.
Demonstrates the pattern of using AI as a decision layer within hard safety bounds—not as an autonomous actor with unchecked authority.
Related Projects
View All
AI / MLQuantitative Risk Engine
2024Built an ML-driven risk platform that processes 89 million trades and identifies dangerous behavior before blowouts happen.
AI / MLWeather Market Probabilistic Forecasting
2025Built two probabilistic models that identify conditions where forecast skill beats market consensus—turning calibrated edge into directional trading signals.
Have a Similar Challenge?
Let's discuss how I can help you achieve similar results.
Start a Conversation