Loop icon
List icon
Download icon
Script icon
Query icon
IonToCsv icon
Log icon
SlackIncomingWebhook icon
Trigger icon

Report Institutional Holdings Changes from SEC 13F Filings with DuckDB and Slack

Compare a fund manager's 13F holdings quarter over quarter and get its new positions, exits and largest changes in Slack and the logs.

Categories
BusinessData

Follow what institutional managers buy and sell, from the 13F holdings reports they file with the SEC each quarter. No API key or paid data feed.

How it works

  1. new_13f (EDGAR trigger) runs the flow when a followed manager files a 13F or an amendment; a triggered run reports only the managers that filed.
  2. each_filer lists 13 months of 13F filings per CIK, and each_filing downloads each one's cover page and information table.
  3. parse (Python, standard library) writes one row per information-table entry.
  4. changes (DuckDB) compares each manager's latest quarter with the one before:
    • rows of the same security (one per sub-manager) are added up; options and bonds stay apart
    • a RESTATEMENT replaces the report; a NEW HOLDINGS amendment adds to it, unless it repeats most of the original, as some managers file the whole report again under that label
    • values reported in thousands instead of dollars are converted
  5. digest writes one message per manager, logged and posted to Slack.

What you get

  • Per manager: positions, total value and its change, new positions, exits, the largest increases and cuts, and a note when a quarter was filed as a 13F notice (holdings in another manager's report).
  • A changes CSV of every position in both quarters with its status and change.

Who it's for

Equity analysts, investor relations teams and allocators who follow other managers' portfolios.

Why orchestrate this with Kestra

The EDGAR trigger replaces a polling script, each filing's files stay with the run, and the 13F rules are one SQL query versioned with the flow.

Prerequisites

Kestra 2.0 with plugin-edgar 1.0.0 (auto-installed on save in a local OSS instance, otherwise kestra plugins install io.kestra.plugin:plugin-edgar:1.0.0), and Docker for the Python task.

Secrets

  • SLACK_WEBHOOK_URL (optional): without it the Slack step ends in a warning; the digest stays logged.

Quick start

  1. Namespaces > company.team > KV Store: key SEC_EDGAR_USER_AGENT, type STRING, value your name and email (Example Co admin@example.com). SEC rejects requests without one.
  2. Execute with the CIKs of the managers you follow, then check the logs and changes.
  3. Copy the CIKs into the trigger's ciks and enable it.

How to extend

  • Track one security across managers: filter changes on its CUSIP.
  • Known limits: 13Fs list long US positions only, 45 days after quarter end; option rows hold the underlying's value, not the premium.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.