Basic Prerequisites: 02 · SEC EDGAR & XBRL (the filings these datasets are parsed from).


1. Intuition & Practical Objective

Corporate filings fall into two kinds: what the company says about itself (10-K, 10-Q) and what insiders and large holders say about their own positions (Form 4, 13-D/G, 13-F, DEF 14A). The second family is a different kind of data - it is timestamped by law, tied to specific people, and it answers questions the financial statements cannot: who owns this, and what have the people closest to it been doing with their own money?

Three datasets, three questions:

  • Form 4 - insider transactions. Filed within 2 business days of a transaction by officers, directors, and >10% holders. The most timely, least aggregated dataset in this folder. Aggregators like OpenInsider make it screenable (cluster buys, open-market purchases vs. routine grants).
  • Schedule 13-D / 13-G - beneficial ownership. Filed when a holder crosses 5%; Schedule 13D within 5 business days (activist-flavoured); Schedule 13G (passive/qualified-institutional) within 5 business days for passive filers (or 45 days after quarter-end for Qualified Institutional Investors), with all 13G amendments due quarterly (SEC 2024 amendments).
  • Form 13-F - institutional holdings. Every institutional manager with >$100M AUM reports its long positions within 45 days of quarter end. Aggregators like WhaleWisdom turn the quarterly deluge into ownership percentages and fund-level views.

The single most important fact about this family is a timing fact: each has a legally mandated filing lag, and the lag is data. A “13-F ownership” number is never today’s - it is at best 45 days old, and often 4.5 months old by the time the next one lands.


2. Mathematical Ground Truth & Derivations

The lag schedule (the that governs usability):

FormWho filesTriggerDeadlineTypical staleness
Form 4officers, directors, >10% holdersany transaction2 business daysdays
13-Dany holder crossing 5%crossing 5%5 business daysdays–weeks
13-Gpassive/qualified-institutional >5% holdereligible for short-form5 business days (passive) / 45 days after quarter end (QII); quarterly amendmentsup to ~1 quarter
13-Finstitutional manager >$100M AUMquarter end45 days after quarter end45–135 days
DEF 14A (proxy)the companyannual meetingvariesmonths

Net insider flow and the cluster signal. For a window , with transactions carrying code , shares , price :

The cluster buy signal is a count condition, not a dollar condition - the theory being that several insiders independently choosing to buy open-market () in a short window carries more information than one large purchase:

Ownership concentration. With reporting institutions holding shares and shares outstanding:

The critical trap - codes carry opposite meanings. (grant/award) and (option exercise) are compensation events; only (open-market purchase) is a discretionary open-market buy. Counting and as “insider buying” is the single most common error in this dataset - and aggregators exist largely to let you exclude them.


3. Computational Implementation - Form 4 flow, cluster detection, and 13-F ownership

Offline and fully runnable (stdlib only). It parses a small embedded Form 4 ledger, computes net open-market flow, detects a 30-day cluster buy with real date arithmetic, and reports institutional ownership.

Read the output carefully: the firm shows a modestly positive net insider flow (+PSA/M$, and (c) look at distinct insider counts within a window rather than a raw dollar total.

Where the data comes from, and what to use.

DatasetUpstream filingFree routeConvenience route
Insider transactionsForm 4EDGAR full-text / daily indexOpenInsider (free)
5% beneficial ownership13-D / 13-GEDGARaggregators
Institutional holdings13-FEDGARWhaleWisdom (freemium)
Compensation & holdingsDEF 14AEDGARvendored “insider” feeds

4. Failure Modes & First-Principles Breakdowns

  1. Counting grants and awards as buying (first principle: only is discretionary). Codes (grant) and (option exercise) are compensation, mechanically scheduled, and carry no bullish information. A “net buying” screen that includes them is measuring the compensation calendar, not insider conviction.
  2. Ignoring the 45-day 13-F lag (first principle: the lag is the data). “Institutional ownership was 55%” is a statement about a quarter that ended ≥45 days ago, and the live number may be materially different. Backtesting on 13-F data without lagging by the filing date leaks ~1.5–4.5 months of information, exactly as in 01.
  3. Double-counting in 13-F aggregation (first principle: holdings are a set, not a sum). The same shares are reported by multiple managers; naive summation overstates ownership, and the same manager appears under different filer names/CIKs across quarters. Always key on CIK, and reconcile against shares outstanding.
  4. 10b5-1 plans and routine sells (first principle: a pre-scheduled sale is not a vote). Many senior insiders sell on automatic 10b5-1 schedules regardless of outlook. Treat programmatic sales as noise; weight discretionary buys (and clusters) much more heavily.
  5. Survivorship in the insider universe. Tickers delisted since a Form 4 was filed often drop out of aggregator screens - reintroducing exactly the bias 05 formalizes.
  6. Amended Form 4s (4/A). Reports are corrected; a parser that ignores amendments can double-count or miss the true transaction. Key on accession number and take the latest version.

5. References

  • SEC, EDGAR filing-type documentation
  • OpenInsider (openinsider.com)
  • WhaleWisdom (whalewisdom.com)
  • Loughran & McDonald (JF, 2011)
  • Jensen & Meckling, “Theory of the Firm…” (JFE, 1976) and Jensen, “Agency Costs of Free Cash Flow…” (AER, 1986)

6. Connected Graph Bridges