Technical writing
SEC Form 4: The Insider Trading Disclosure Behind Every Officer and Director Stock Transaction
Every time a corporate officer, director, or ten-percent shareholder buys or sells stock in their own company, federal law requires a public disclosure within two business days. The disclosure vehicle is SEC Form 4, filed electronically on EDGAR and available to the world the moment the SEC accepts it. Three decades of academic research have confirmed that the open-market purchase subset of this data contains genuine informational content — one of the few corners of public regulatory data that demonstrably predicts future stock returns.
Section 16(a) and the Insider Disclosure Requirement
Section 16(a) of the Securities Exchange Act of 1934 requires officers, directors, and any person beneficially owning more than ten percent of a registered class of equity securities to file reports of their ownership and changes in ownership with the SEC. The requirement applies to public companies whose equity is registered under Section 12 of the Exchange Act — which covers essentially every company listed on a national exchange and many over-the-counter issuers above the registration threshold.
The rationale is disclosure of conflicts. Corporate insiders possess material non-public information by virtue of their positions: they know what earnings look like before the press release, what the board discussed about a merger target, what the FDA told management about a drug application. Mandatory real-time disclosure of their transactions does not prevent them from trading on this information — that is the province of Rule 10b-5 insider trading liability — but it creates a public record that allows regulators, journalists, and researchers to scrutinize the timing and pattern of their transactions against the subsequent release of material news.
The two-business-day deadline for Form 4 was imposed by the Sarbanes-Oxley Act of 2002, tightening the prior regime that allowed reports up to forty days after month-end. Electronic EDGAR filing became mandatory for Section 16 reporters in August 2004. Since then the Form 4 feed has been a near-real-time public window into insider transaction activity.
The Three Insider Ownership Forms
Section 16(a) creates three distinct reporting instruments, each covering a different stage of an insider's relationship with the issuer:
- Form 3 — Initial statement of beneficial ownership. Filed when a person first becomes subject to Section 16 reporting — on becoming an officer, being appointed to the board, or crossing the ten-percent ownership threshold. Form 3 captures the insider's opening position. It must be filed within ten days of the triggering event. Form 3 is a one-time snapshot; subsequent changes flow through Form 4.
- Form 4 — Statement of changes in beneficial ownership. The primary ongoing disclosure. Filed within two business days of any transaction that changes the insider's beneficial ownership of issuer securities. This is the workhorse of Section 16 data and the focus of nearly all academic and practitioner analysis of insider activity.
- Form 5 — Annual statement of beneficial ownership. Due within forty-five days after the issuer's fiscal year end. Covers transactions that were exempt from Form 4's two-day deadline, such as small acquisitions under Rule 16a-6, or transactions that were simply overlooked in the year. Form 5 filings are relatively rare; most issuers file them only when an insider has a missed or exempt transaction to report.
The three-form structure means that a comprehensive picture of an insider's position requires combining the Form 3 opening balance with all subsequent Form 4 changes and any Form 5 amendments. In practice, most analytical work begins with Form 4 and treats the post-transaction shares-owned field as a running position tracker without reconstructing the full Form 3 history.
Form 4 Data Fields
A Form 4 filing is structured in XML on EDGAR. Each filing covers one reporting person and one issuer, but may contain multiple individual transactions. The fields that matter for analysis:
- Reporting person name and CIK. The SEC assigns a persistent Central Index Key to each filer. Using the CIK rather than the name string is essential for longitudinal tracking — executive names appear in many variations across filings (middle initial present or absent, name order differences, post-name suffixes), while the CIK is stable across career changes and company changes.
- Issuer name and CIK. The company whose securities were transacted. The issuer CIK is the join key for linking Form 4 data to every other EDGAR filing by that company: 10-K annual reports, 8-K current reports, proxy statements, and Form 13F institutional holdings.
- Relationship to issuer. Checkboxes for officer, director, and ten-percent owner, plus a free-text title field. The title field (“Chief Executive Officer,” “EVP and General Counsel,” “Lead Independent Director”) is not standardized and requires normalization for systematic role-based filtering.
- Transaction date. The date the transaction was executed — the trade date for market transactions, the award date for grants, the exercise date for options. Not the settlement date and not the date the Form 4 was filed. All event-study analysis uses the transaction date as the event date, not the filing date.
- Security type. Common stock is the typical non-derivative security. Derivative securities — stock options, restricted stock units (RSUs), convertible notes, stock appreciation rights — are reported on a separate table within the Form 4 XML and require different handling because the economic exposure is to the underlying shares, not the derivative itself.
- Transaction code. A single letter identifying the nature of the transaction. Discussed in detail in the next section.
- Number of shares transacted. For non-derivative securities, a share count. For derivative securities, the number of derivative units, with the underlying share count in a separate field.
- Price per share. The transaction price for open-market purchases and sales. For grants (code A), typically the grant date fair value or $0. For option exercises (code M), the exercise price, not the market price. The price field is blank or zero for gifts (code G) and certain other non-market transactions.
- Direct or indirect ownership. “D” means the insider holds the shares directly in their own name or account. “I” means indirect beneficial ownership through a trust, LLC, partnership, family member's account, or other vehicle, with a required footnote explaining the arrangement. Direct purchases are the cleanest signal; indirect purchases through investment vehicles introduce ambiguity about the insider's personal economic commitment.
- Total shares owned following the transaction. The insider's cumulative position in that security class after the reported transaction. Reported separately for direct and indirect holdings. This running balance allows reconstruction of the insider's full position history without returning to Form 3.
Footnotes play an outsized role in Form 4 interpretation. Complex ownership structures, 10b5-1 plan notations, vesting schedules for RSU grants, and explanations of indirect ownership arrangements all appear in free-text footnotes attached to individual transactions. The footnote XML is unstructured and requires natural language processing or targeted pattern matching for systematic extraction.
Transaction Code Taxonomy
The transaction code field is the most analytically consequential field on Form 4. The SEC defines the following codes for non-derivative transactions:
- P — Open-market purchase. The insider purchased shares at the prevailing market price using personal capital, with no obligation or pre-arrangement to do so. This is the highest-signal code. An officer or director writing a personal check to buy their company's stock is making an unambiguous, costly, voluntary expression of confidence.
- S — Open-market sale. The insider sold shares at the prevailing market price. Sales are informationally ambiguous: insiders sell for diversification, tax planning, major personal expenditures, estate planning, and execution of pre-planned 10b5-1 schedules — none of which reflect a bearish view of the company. The academic literature consistently finds that open-market sales carry little predictive power for future returns after controlling for other factors.
- A — Grant or award. The company granted equity compensation to the insider: restricted stock, restricted stock units, performance shares, or similar instruments. The insider exercised no discretion in receiving the award. A-coded transactions are the highest-volume code by raw filing count, driven by annual equity compensation cycles, and carry no directional signal.
- D — Disposition to issuer. Shares returned to the company, most commonly to satisfy tax withholding obligations on RSU vesting through a net-settlement arrangement. Also appears on clawback forfeitures. Often paired with an A-coded grant in the same filing or a near-simultaneous filing.
- M — Exercise of derivative security. The insider exercised a stock option or warrant, converting it into common shares. An M-coded exercise followed immediately by an S-coded same-day sale (a cashless or “exercise and sell” transaction) indicates the insider is capturing option value with no intention of holding the underlying shares. An M-coded exercise followed by a holding period (“exercise and hold”) is a materially different economic signal. Parsing the combination requires comparing transaction dates within a filing or across filings for the same issuer and filer on the same date.
- F — Payment of exercise price or tax withholding. Shares withheld by the company to cover the cash owed on an option exercise or the income tax due on a vesting event. Mechanically generated by compensation plan administration, not a voluntary decision.
- G — Gift. A transfer of shares to a charitable organization or family member. Frequently used when executives donate appreciated stock to donor- advised funds or foundations. No informational content about the insider's view of the company.
- J — Other acquisition or disposition. A catch-all for transactions outside the above categories: inheritances, divorce settlements, judicial orders, reclassifications. Excluded from systematic signal analysis.
The practical implication: filtering the raw Form 4 universe to code P alone eliminates roughly 90 percent of filings by count but preserves the only transactions where the insider exercised personal discretion and committed personal capital. RSU vesting events, option exercises, and compensation grants collectively dominate Form 4 volume but carry no discretionary signal. Every serious insider buying screen begins with the P-code filter.
The 10b5-1 Plan Problem
SEC Rule 10b5-1, adopted in 2000, created an affirmative defense against insider trading liability for trades made pursuant to a pre-established written trading plan. An insider who establishes a 10b5-1 plan while not in possession of material non-public information — specifying the amount, price, and timing of future transactions in advance — can execute those trades even if MNPI comes into the insider's possession afterward. The rationale is that the trading decision was made when the insider was clean; execution is mechanical.
The academic literature identified a structural flaw in the original rule. Research by Alan Jagolinzer (2009) in The Accounting Review and by Lauren Cohen, Christopher Malloy, and Lukasz Pomorski (2012) in the Journal of Finance documented that insiders were gaming 10b5-1 plans: entering plans shortly before expected positive news, exploiting the short mandatory cooling-off period that existed at the time, and executing trades immediately after. Insiders trading under 10b5-1 plans outperformed insiders trading outside plans by a statistically significant margin — the opposite of what the “pre-planned, non-informational” framing would predict.
The SEC addressed this in December 2022 with amendments to Rule 10b5-1 that took effect in 2023. The amended rule imposed a mandatory cooling-off period of 90 days (or the next quarterly earnings release date, whichever is later) for officers and directors between plan adoption and the first trade, capped single-trade plans in some circumstances, and required disclosure of 10b5-1 plan adoptions, modifications, and terminations on quarterly reports. For signal-building purposes, the 2023 amendments make 10b5-1 plan trades somewhat less contaminated but do not eliminate the issue entirely. The conservative analytical posture is to flag 10b5-1 plan transactions separately and weight them lower than non-plan purchases.
Identifying 10b5-1 plan transactions requires parsing the footnotes on each Form 4 filing. The filing does not include a structured field for this in the XML; instead, filers add a footnote to the transaction referencing the plan. Pattern matching on the footnote text — looking for phrases like “Rule 10b5-1 trading plan” or “adopted pursuant to” — identifies most plan transactions, but the lack of a structured field means any systematic approach will have false positives and negatives.
Accessing EDGAR Form 4 Data
All Form 4 filings are publicly available on EDGAR through several access paths:
- EDGAR company or person search. Navigating to
https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&type=4with a CIK or name query returns a paginated list of Form 4 filings for a specific issuer or reporting person. Useful for manual lookup of a specific executive's transaction history, impractical for bulk analysis. - Quarterly bulk index files. The most efficient path for large-scale analysis. The SEC publishes quarterly index files at
https://www.sec.gov/Archives/edgar/full-index/, organized by year and quarter. Theform.idxfile in each directory is a fixed-width text file listing every EDGAR filing for that quarter: form type, company name, CIK, date filed, and the relative path to the filing within the archive. Filtering for form type “4” yields all Form 4 filings; the path field points to the XML document on the archive server. - EDGAR full-text search API. The EDGAR full-text search system at
https://efts.sec.gov/LATEST/search-indexsupports text searches across all EDGAR filings with form type filtering. Useful for finding filings that mention a specific company name in a Form 4 context, or for searching footnote text across filings. Rate-limited for programmatic use. - EDGAR submissions API. The endpoint
https://data.sec.gov/submissions/CIKfollowed by a ten-digit zero-padded CIK and.jsonreturns a JSON document listing recent filings for a company or person, including Form 4s with accession numbers. This is the preferred path for pulling all Form 4 filings for a specific issuer CIK without parsing the quarterly index files.
The SEC's fair access policy requires automated requests to include a descriptive User-Agent header (name, organization, and contact email) and to limit request rates to no more than ten requests per second. Bulk download scripts that ignore rate limiting risk IP blocks that affect all users on a shared network.
The research community has also built secondary databases on top of EDGAR Form 4 data. OpenInsider at openinsider.com provides a filtered interface focused on open-market buys and sells, with filters by transaction size, insider type, company, sector, and date range. Quiver Quantitative provides programmatic API access to structured insider transaction data. Both services are derivative of the EDGAR primary source and update with a short lag after new filings are accepted.
Academic Research on Insider Buying as a Signal
The predictive content of insider transactions has been studied for more than four decades, beginning with work by Jeffrey Jaffe (1974) and H. Nejat Seyhun (1986). The consensus findings are stable across methodological approaches, sample periods, and markets:
Open-market purchases predict positive abnormal returns. Seyhun's 1992 study in the Journal of Business documented that aggregate insider buying across all public companies predicts broad market returns, with insiders collectively buying more before market upswings and selling more before downturns. At the individual stock level, insider purchases predict positive excess returns of roughly 3 to 6 percent over the six months following the transaction, with the effect strongest for small-cap companies where information asymmetry is greatest. Large-company insider purchases show smaller but still statistically significant effects, diluted by the depth of analyst coverage and the volume of other information production about the firm.
Open-market sales do not reliably predict negative returns. Lakonishok and Lee (2001) in the Review of Financial Studies established this asymmetry rigorously. After controlling for size, book-to-market, and momentum, insider sales carry no statistically significant predictive power for future returns. The contamination comes from the many non-informational reasons insiders sell: they sell to diversify concentrated positions, to fund real estate purchases, to make charitable gifts of appreciated stock, and to execute scheduled 10b5-1 programs. The subset of informed sales is swamped in the data by the uninformed majority.
Cluster buying is the strongest signal. Jeng, Metrick, and Zeckhauser (2003) in the Journal of Finance reported that insider purchases earn abnormal returns of approximately 6 percent over the following six months. More importantly, cluster buying — defined as purchases by three or more distinct insiders within the same company within a 30-day window — substantially amplifies the signal relative to single-insider purchases. Cohen, Malloy, and Pomorski (2012) further decomposed the insider universe into “routine” traders (insiders who buy or sell in the same calendar month year after year, suggesting mechanical behavior) and “opportunistic” traders (insiders with non-routine transaction timing). Opportunistic insider purchases predict 12-month abnormal returns of more than 8 percent, while routine purchases carry no significant predictive power. Separating the two categories requires at least three years of transaction history per insider to establish a baseline.
The Congressional parallel. The STOCK Act of 2012 created a Form 4 analog for members of Congress and senior congressional staff — the periodic transaction report. Research on congressional trading (Ziobrowski et al. 2004, 2011) found that senators and representatives also earned abnormal returns on their equity portfolios before the STOCK Act's enhanced disclosure requirements, a finding that contributed to the legislative push for the Act. The STOCK Act dataset provides a parallel insider-trading disclosure corpus for government insiders rather than corporate insiders.
Python: Screening EDGAR Form 4 for Open-Market Officer Purchases
The script below downloads the Form 4 quarterly bulk index for a given quarter, fetches the underlying XML for each filing, and extracts direct open-market purchases by officers above $100,000 in transaction value. The SEC's quarterly index files cover all quarters from 1993 onward; mandatory electronic Form 4 filing began in 2004, so pre-2004 filings are sparse. The approach scales to full historical coverage by looping across years and quarters.
import requests
import xml.etree.ElementTree as ET
import datetime
BASE_INDEX = "https://www.sec.gov/Archives/edgar/full-index"
BASE_ARCHIVE = "https://www.sec.gov/Archives"
HEADERS = {"User-Agent": "research@example.com"}
def get_form4_index(year, quarter):
"""Return all Form 4 entries from the quarterly full-text index."""
url = BASE_INDEX + "/" + str(year) + "/QTR" + str(quarter) + "/form.idx"
r = requests.get(url, headers=HEADERS, timeout=60)
r.raise_for_status()
rows = []
for line in r.text.splitlines():
if not line.startswith("4 "):
continue
form_type = line[0:12].strip()
company = line[12:74].strip()
cik = line[74:86].strip()
filed = line[86:98].strip()
filename = line[98:].strip()
if form_type == "4":
rows.append({"company": company, "cik": cik,
"filed": filed, "filename": filename})
return rows
def parse_open_market(xml_text, min_shares=0):
"""Extract P-coded (open-market purchase) non-derivative transactions."""
results = []
try:
root = ET.fromstring(xml_text)
except ET.ParseError:
return results
issuer_name = (root.findtext(".//issuerName") or "").strip()
issuer_cik = (root.findtext(".//issuerCik") or "").strip()
filer_name = (root.findtext(".//rptOwnerName") or "").strip()
is_officer = (root.findtext(".//isOfficer") or "0").strip() == "1"
is_director = (root.findtext(".//isDirector") or "0").strip() == "1"
for txn in root.findall(".//nonDerivativeTransaction"):
code = txn.findtext(".//transactionCode") or ""
if code != "P":
continue
shares_text = txn.findtext(".//transactionShares/value") or "0"
price_text = txn.findtext(".//transactionPricePerShare/value") or "0"
date_text = txn.findtext(".//transactionDate/value") or ""
direct_text = txn.findtext(".//directOrIndirectOwnership/value") or ""
post_text = txn.findtext(".//sharesOwnedFollowingTransaction/value") or "0"
try:
shares = float(shares_text)
price = float(price_text)
except ValueError:
continue
if shares < min_shares:
continue
results.append({
"issuer_cik": issuer_cik,
"issuer_name": issuer_name,
"filer_name": filer_name,
"is_officer": is_officer,
"is_director": is_director,
"txn_date": date_text,
"shares": shares,
"price": price,
"value_usd": shares * price,
"direct": direct_text.strip() == "D",
"post_shares": float(post_text) if post_text else 0.0,
})
return results
# Scan the most recent complete quarter for officer open-market purchases > $100k.
# Adjust year/quarter as needed; remove index_rows[:300] slice for full scan.
year, quarter = 2025, 1
index_rows = get_form4_index(year, quarter)
print("Form 4 filings in index: " + str(len(index_rows)))
purchases = []
for row in index_rows[:300]:
url = BASE_ARCHIVE + "/" + row["filename"]
try:
xml = requests.get(url, headers=HEADERS, timeout=30).text
hits = parse_open_market(xml, min_shares=0)
for h in hits:
h["date_filed"] = row["filed"]
if h["value_usd"] >= 100_000 and h["is_officer"] and h["direct"]:
purchases.append(h)
except Exception:
continue
purchases.sort(key=lambda x: x["value_usd"], reverse=True)
print("Officer open-market purchases >= $100k:")
for p in purchases[:10]:
name = p["filer_name"][:28].ljust(30)
issuer = p["issuer_name"][:28].ljust(30)
val = str(int(round(p["value_usd"]))).rjust(12)
print(" " + name + " " + issuer + " $" + val + " " + p["txn_date"])
A few implementation notes. The quarterly index form.idx file is a fixed-width text file, not CSV, so substring slicing at defined column offsets is more reliable than split-based parsing. The XML document paths are relative to the EDGAR archive base URL; prepend https://www.sec.gov/Archives/ to each filename field. The script filters to direct ownership only: indirect purchases through trusts or LLCs reduce the signal quality because the economic commitment is less clear. For a cluster-buying screen, group the resulting purchase list by issuer CIK and transaction date, then count distinct filer CIKs within rolling 30-day windows.
Practical Applications
Investment signal generation. Quantitative equity strategies have used Form 4 open-market purchase data as a factor input since at least the early 2000s. The factor is typically constructed as a binary indicator (cluster buying occurred in the prior 30 days) or a continuous score (aggregate insider buying as a percentage of shares outstanding), then used in combination with valuation, momentum, and quality factors in a multi-factor model. Standalone reliance on insider buying as a trading signal requires careful handling of the illiquidity risk in small-cap stocks, where the signal is strongest.
Corporate governance monitoring. Institutional investors and proxy advisory firms track Form 4 data to assess alignment between executive incentives and shareholder interests. An executive who receives large equity grants (code A) but consistently sells (code S) through immediately-executed cashless exercises (code M same-day code S) is retaining little net equity exposure to the company's long-term performance. Form 4 data, integrated with the proxy statement's ownership tables, quantifies the degree to which executives are genuinely exposed to the stock price they are paid to maximize.
Investigative journalism. The two-day filing deadline makes Form 4 a near-real-time investigative source. Reporters monitor the EDGAR Form 4 feed for anomalous transactions — large sales in the days before a negative announcement, purchases immediately before an undisclosed acquisition, patterns of spring-loaded grants timed to precede positive news. Several SEC enforcement actions against insider trading originated as journalism, where a reporter noticed suspicious transaction timing in public Form 4 data, published a story, and the Commission opened an investigation.
M&A arbitrage intelligence. Ten-percent shareholders who are activist investors must file on Form 4 once they cross the reporting threshold, giving a transaction-level window into how the activist is managing its position through a campaign. Purchases after the initial 13D disclosure signal continued conviction; sales before a proxy contest vote can signal a settlement or exit. The Form 4 timestamp — accurate to the transaction date — makes it possible to reconstruct the activist's position changes week by week through the campaign.
Form 4 is one instrument in the EDGAR ecosystem. For financial statement data filed by the same companies whose insider transactions appear in Form 4 — 10-K annual reports, 10-Q quarterly reports, and the XBRL-tagged financials accessible via the EDGAR API — see SEC EDGAR Financials: Accessing Structured Financial Data from 10-K and 10-Q Filings.
Insider trading enforcement, including the criminal prosecutions and civil injunctions that Form 4 patterns have helped trigger, is documented in the DOJ Corporate Prosecution Registry. For the federal database of deferred prosecution agreements, non-prosecution agreements, and corporate guilty pleas that result from securities fraud investigations, see Corporate Prosecution Registry: DPAs, NPAs, and Federal Corporate Criminal Resolutions.
Public company financial reporting is subject to auditor oversight by the PCAOB, whose inspection reports and enforcement actions bear on the reliability of the financial statements that provide context for Form 4 transaction timing analysis. See PCAOB Audit Oversight: Inspection Reports, Deficiency Data, and Enforcement Actions.