What Is SEC Form 4? A Developer's Guide to Insider Transaction Data
When corporate insiders executives, directors, major shareholders buy or sell shares in their own company, they are required by law to report it. That report is SEC Form 4. For decades, this data lived in a regulatory filing cabinet, reviewed mostly by compliance teams and financial journalists. Today, it feeds quantitative models, powers fintech dashboards, and gets pulled in real-time by AI agents making sense of market activity. This guide covers what Form 4 is, how it works at the data level, and how developers and product teams can access and use insider transaction data programmatically.

The Regulatory Background
The Securities Exchange Act of 1934 established the basic framework for insider reporting in the United States. Section 16 of the Act requires that officers, directors, and shareholders owning more than 10% of a registered equity class disclose their transactions in that security.
Form 4 is the mechanism for that disclosure. It was standardized by the Securities and Exchange Commission and is filed through EDGAR, the Electronic Data Gathering, Analysis, and Retrieval system which has been publicly accessible since 1996.
The core rule is that insiders must file Form 4 within two business days of the transaction. This deadline was tightened from a 10-day window by the Sarbanes-Oxley Act of 2002, which significantly increased the real-time value of the data. Before Sarbanes-Oxley, by the time a filing appeared publicly, the market had often already moved. After it, the data started arriving fast enough to be actionable.
Who Is Considered an Insider?

The SEC defines reporting persons under Section 16 in three categories:
- Officers: CEO, CFO, COO, General Counsel, and any other officers the company designates as subject to Section 16 reporting.
- Directors: All members of the board of directors, including independent directors.
- 10%-Plus Shareholders: Any individual or entity holding more than 10% of any class of registered equity.
It is worth clarifying that the 10% shareholder threshold refers specifically to beneficial ownership of a registered class. Large institutional investors, asset managers, pension funds, mutual funds operate under a separate reporting regime called the 13F filing system. They are not Form 4 filers unless they also hold board seats or cross the 10% threshold in a specific issuer.
What Form 4 Actually Contains
A Form 4 filing is built around two core tables. Each table captures a distinct type of transaction, and understanding the difference between them matters for anyone working with the data.
Table 1: Non-Derivative Securities
This table covers direct purchases and sales of shares. Each row represents a single transaction or a group of same-day transactions in the same security. The information recorded includes the name of the security, the date of the transaction, a code identifying the type of transaction, the number of shares acquired or disposed of, the price per share, the insider's total ownership position after the transaction, and whether the ownership is direct or indirect.
Table 2: Derivative Securities
This table covers options, warrants, convertible securities, and similar instruments. It tracks exercises, grants, and dispositions of derivatives including the underlying security and the conversion or exercise price. An option exercise typically generates entries in both tables: one in Table 2 for the derivative being exercised, and a corresponding entry in Table 1 for the shares acquired as a result.
Transaction Codes: The Most Important Field
Every transaction recorded in Form 4 is tagged with a single-letter code. This code identifies the nature of the activity and is the primary field used for filtering and analysis. Understanding these codes is essential for making sense of insider transaction data.
Code | Description |
|---|---|
P | Open market or private purchase of non-derivative or derivative security |
S | Open market or private sale of non-derivative or derivative security |
A | Grant, award or other acquisition pursuant to Rule 16b-3(d) |
D | Disposition to the issuer of issuer equity securities pursuant to Rule 16b-3(e) |
F | Payment of exercise price or tax liability by delivering or withholding securities incident to the receipt, exercise or vesting of a security issued in accordance with Rule 16b-3 |
M | Exercise or conversion of derivative security exempted pursuant to Rule 16b-3 |
G | Bona fide gift |
V | Transaction voluntarily reported earlier than required |
J | Other acquisition or disposition (describe transaction) |
For most market analysis, P and S carry the most analytical weight, they represent voluntary, open-market activity. An executive choosing to purchase shares on the open market using personal capital is considered a qualitatively different signal than an A transaction, which is a grant the company awarded them, or an F, which is a forced share sale to cover tax obligations on a vested award.
Filtering by transaction code is one of the first decisions made when building any insider-signal feature or research pipeline.
The EDGAR Filing Structure
Every Form 4 submitted to the SEC is stored in EDGAR as an XML document. The SEC introduced machine-readable XML for Form 4 in 2003, which is what makes structured data extraction practical at scale.
Each filing is assigned a unique accession number, a 20-digit identifier that serves as the permanent reference for that document within the EDGAR system. This identifier links directly back to the source filing, providing a verifiable audit trail for every transaction record.
For production applications, directly querying EDGAR has practical limitations: rate limits on the public API, variable filing timing throughout the day, and the overhead of parsing raw XML before any normalization can happen. This is why most developers working with insider transaction data at scale use a dedicated financial data API as RyxelData rather than building and maintaining a direct EDGAR integration from scratch.
What a Normalized Insider Transaction Record Looks Like

When Form 4 data is extracted from EDGAR and normalized into a clean, structured format, each transaction record typically contains the following information:
Company identifiers: The stock ticker symbol and full company name, mapped from EDGAR's internal CIK (Central Index Key) numbering system.
Filer identity: The name of the reporting person (the insider) and their role at the company, such as Chief Executive Officer or Board Director.
Transaction details: The date the transaction occurred, the date the filing was submitted to the SEC, the transaction code, the number of shares involved, the price per share, and the total dollar value of the transaction.
Position data: The insider's total ownership stake after the transaction, and whether that ownership is held directly in their name or indirectly through a trust, LLC, or other vehicle.
Filing reference: The accession number linking back to the original EDGAR document.
The gap between transaction date and filing date is worth noting for latency-sensitive applications. The transaction may have occurred two business days before the filing appeared in EDGAR. With the Sarbanes-Oxley two-day rule, this window is bounded but not zero.
The Normalization Problem
Raw Form 4 data from EDGAR is publicly available, but it requires substantial work before it becomes usable in a product context. This is the normalization problem and it is what creates the most friction for development teams building on insider transaction data.
CIK-to-ticker mapping is the first challenge. EDGAR identifies companies by a numeric CIK, not by ticker symbol. Converting CIKs to tickers requires a reference file that EDGAR publishes but does not always keep current. Tickers change when companies rebrand or relist and delist entirely. CIKs occasionally get reassigned. Maintaining an accurate, up-to-date mapping requires ongoing maintenance work.
Filer identity disambiguation is another layer. The same executive, a CFO who sits on two boards, for example, can appear under slightly different name variations across filings for different issuers. Resolving these into a consistent identity record across the full EDGAR corpus is a non-trivial entity resolution problem.
Amendment handling is where data quality problems tend to compound. When an insider corrects a filing, they submit a Form 4/A, which supersedes the original. A raw firehose of EDGAR data contains both originals and amendments. If the amendment is not detected and applied correctly, transaction counts and ownership totals become inaccurate.
Price normalization adds another dimension. Shares acquired through certain plan transactions such as Rule 10b5-1 trading plans or dividend reinvestment programs may show blended or averaged pricing that does not reflect a single market transaction. These need to be flagged and handled differently from pure open-market activity.
Split adjustments are required for historical analysis. Share counts and prices in filings from before a stock split reflect pre-split figures. Any historical comparison requires retroactive adjustment for splits and reverse splits.
APIs like RyxelData handle all of this upstream normalizing, deduplicating, and split-adjusting the data before it reaches the consumer and delivering clean records through a single REST endpoint. For teams that want to work with insider transaction data without rebuilding the entire EDGAR pipeline, that kind of pre-normalized delivery is the practical path.
How Developers and Product Teams Use Insider Transaction Data

Signal detection in quantitative research
Open-market purchases by C-suite executives specifically Code P transactions using personal capital have been studied in academic finance literature as a statistically meaningful signal for forward-looking returns. The logic is that an executive voluntarily buying shares with their own money has access to operational and strategic context that no external analyst can replicate. The Form 4 data is the mechanism through which that activity becomes visible.
Portfolio monitoring and real-time alerting
A common use case in financial applications is triggering user notifications when insiders trade in securities a user holds or follows. This requires a polling or streaming integration against the Form 4 feed: the system monitors filings for a defined set of tickers and surfaces relevant activity as it appears in EDGAR.
RyxelData's insider transactions endpoint updated within minutes of each SEC filing and it is built specifically for this kind of latency-sensitive use case.
Compliance and surveillance platforms
Broker-dealers and compliance teams use Form 4 data to cross-reference employee trading activity against known insider filings. When an employee trades in a security shortly before or after a filing by a covered person, it surfaces as an exception for review and a standard function in surveillance systems.
AI agent context and grounding
With AI agents increasingly operating within financial workflows, insider transaction data is being used as structured, verifiable context for model queries. An agent asked to summarize recent executive activity at a company can pull Form 4 records directly, grounding its output in SEC filings rather than relying on web search results or unverified sources. RyxelData supports this use case through its MCP server, which allows AI assistants to query insider transaction data directly from a chat interface.
Form 4 vs. Form 3 and Form 5
Form 4 belongs to a trio of Section 16 filings. Each serves a distinct purpose in the overall insider reporting framework.
Form 3 is the initial ownership statement. It is filed when a person first becomes subject to Section 16 reporting upon joining the board, being designated as an officer, or crossing the 10% ownership threshold. It establishes the baseline ownership position before any ongoing transaction reporting begins.
Form 4 is the ongoing transaction report. Filed within two business days of each reportable change in ownership, it is the primary data source for transaction-level analysis.
Form 5 is an annual catch-all for transactions that were exempt from Form 4 reporting during the year. It is less common in practice and typically captures deferred compensation arrangements and small gift transactions that fell below the threshold for immediate disclosure.
For any application concerned with transaction-level data, Form 4 is the primary source. Form 3 provides baseline context for calculating an insider's accumulated position over time. Form 5 fills edge cases that Form 4 does not capture.
Summary
SEC Form 4 is a mandatory regulatory disclosure filed by corporate insiders like officers, directors, and shareholders holding more than 10% of a registered equity class within two business days of any transaction in their company's securities. The data is collected by the SEC through EDGAR, available in structured XML format since 2003, and covers every public company registered in the United States.
For developers and product teams, the raw EDGAR data carries significant normalization overhead: CIK-to-ticker mapping, filer identity resolution, amendment handling, pricing normalization, and split adjustments. Production applications typically consume this data through a dedicated financial data API rather than building and maintaining direct EDGAR pipelines.
The transaction code field with Code P for open-market purchases and Code S for open-market sales carrying the most analytical relevance is the primary filter for most signal detection, monitoring, and research applications. The data is used across quantitative strategies, portfolio alert systems, compliance platforms, and increasingly as structured context for AI agents operating in financial workflows.
Frequently Asked Questions
What is SEC Form 4 used for? Form 4 is the mandatory disclosure form that corporate insiders like officers, directors, and shareholders with more than 10% ownership file with the SEC when they buy, sell, or otherwise transact in their company's securities. It is the primary regulatory instrument for insider trading transparency in the United States.
How quickly must Form 4 be filed after a transaction? Under the Sarbanes-Oxley Act of 2002, insiders are required to file Form 4 within two business days of the transaction. Before 2002, the filing window was 10 days, which significantly limited the real-time value of the data.
What is the difference between a Form 4 open-market purchase and a grant? An open-market purchase (Code P) means the insider used their own money to buy shares on the stock exchange. A grant (Code A) means the company awarded them shares or options as compensation. The two are analytically distinct open-market purchases are generally considered a stronger directional signal because they reflect voluntary, personal capital commitment.
Where are Form 4 filings publicly available? All Form 4 filings are public records stored in the SEC's EDGAR system, accessible at edgar.sec.gov. The filings are available in XML format and can be searched by company, filer name, or filing date.
What is a Form 4/A? A Form 4/A is an amendment to a previously filed Form 4. It supersedes the original filing and is used when an insider needs to correct or update information in a prior disclosure. Applications consuming raw EDGAR data must correctly identify and apply amendments to avoid counting or displaying inaccurate transaction records.
What is the difference between Form 4 and Form 13F? Form 4 covers insider transactions, individual executives, directors, and large shareholders reporting their own trades. Form 13F is a quarterly filing by large institutional investment managers (those with over $100 million in assets under management) disclosing their aggregate portfolio holdings. The two filings are separate regulatory instruments covering different classes of market participants.
How do developers access Form 4 data programmatically? Form 4 data can be accessed directly through EDGAR's public API, though direct access requires handling XML parsing, CIK-to-ticker mapping, amendment resolution, and split adjustments. Most production applications use a dedicated financial data API such as RyxelData which delivers normalized, clean insider transaction records through a single REST endpoint, covering all US public companies from 2006 to the present.
What is a Rule 10b5-1 plan and how does it affect Form 4 data? A Rule 10b5-1 plan is a pre-arranged trading plan that allows insiders to sell shares at predetermined times or prices, reducing their exposure to insider trading liability. Transactions executed under these plans are still reported on Form 4, but they are typically flagged separately because they reflect a plan set up in advance rather than a real-time trading decision. Analysts and developers often filter or discount 10b5-1 sales when building signal models.