Blog / Insider trading
Insider trading

Form 4 Transaction Codes: P, S, A, M, F and More Explained

Every Form 4 transaction code explained, from open market purchases and sales to option exercises, gifts, and transactions exempt under Rule 16b-3.

By the SecFeed teamOctober 12, 20266 min read
Key takeaways

A Form 4 line can report many different kinds of events, and the only thing that tells you which one happened is a single letter, sometimes two, in the transaction code column. Reading the code correctly is the difference between seeing a deliberate purchase and mistaking an option exercise or a tax withholding event for one. This guide lists every official Form 4 transaction code and groups them by what they actually represent.

Where the codes come from

The SEC's General Instructions to Form 4 define a fixed set of transaction codes, grouped into a few categories: general market transactions, transactions exempt under Rule 16b-3, derivative security transactions, other exempt and small acquisition transactions, and a handful of other codes for less common events. Every filer uses the same codes, which is what makes the data comparable across companies.

General transaction codes

CodeMeaning
POpen market or private purchase of securities
SOpen market or private sale of securities
VA transaction voluntarily reported earlier than the form otherwise requires

These are the codes most people mean when they talk about insider buying or selling. A P or S reflects an actual purchase or sale decision made at or near the transaction date, rather than a mechanical event tied to compensation.

Get this data as clean JSON

SecFeed turns SEC filings into structured data with one API call: GET /v1/insider-trading?code=P&minValue=100000. 500 free calls a month.

Get a free API key →

Codes exempt under Rule 16b-3

Rule 16b-3 exempts certain transactions between an insider and the issuer from the short swing profit rules of Section 16(b), as long as they meet specific conditions, typically approval by the board or a committee of non-employee directors.

CodeMeaning
AGrant, award or other acquisition of securities from the company, such as a stock or option grant
DDisposition of securities back to the issuer
FPayment of the exercise price or a tax liability by delivering or having the company withhold securities, usually tied to vesting or exercise
IA discretionary transaction under an employee benefit plan, such as a 401(k) plan, resulting in an acquisition or disposition of issuer securities
MExercise or conversion of a derivative security that is exempt under Rule 16b-3
Codes A, F and M together explain most of the Form 4 activity tied to equity compensation: a grant (A), later an exercise (M) and the tax consequence of that exercise (F). None of the three represents a choice to buy or sell stock at the current market price.

Derivative security codes

These codes cover transactions in derivative securities, such as stock options, that are not otherwise exempt under Rule 16b-3.

CodeMeaning
CConversion of a derivative security into the underlying security
EExpiration of a short derivative position
HExpiration of a long derivative position, with value received at expiration
OExercise of an out of the money derivative security
XExercise of an in the money or at the money derivative security

Codes E and H appear less often than the others, since most options are either exercised before expiration or simply lapse worthless, which is reported as an expiration rather than a sale.

Other exempt and small acquisition codes

CodeMeaning
GBona fide gift, given or received
LSmall acquisition under Rule 16a-6, for acquisitions below a set dollar and share threshold that qualify for deferred reporting on Form 5
WAcquisition or disposition by will or the laws of descent and distribution, following a death
ZDeposit of securities into, or withdrawal from, a voting trust

A code G transaction, for example, tells you that shares changed hands as a gift rather than at a market price, which is why the reported price per share is often zero or blank.

Other transaction codes

CodeMeaning
JOther acquisition or disposition, described in a footnote on the filing since it does not fit another code
KTransaction in an equity swap or a similar instrument whose value is tied to the issuer's securities
UDisposition of securities pursuant to a tender offer in a change of control transaction

Code J is a catch-all, so whenever you see it, check the filing's footnotes for the actual description rather than relying on the code alone.

Reading codes together with the rest of the row

The code only tells you the category of event. To understand a specific transaction, read it alongside:

A large dollar figure next to code F or M is not the same signal as the same figure next to code P or S. Filtering by code before looking at dollar amounts avoids treating routine compensation events as discretionary trades.

Working with transaction codes in code

SecFeed extracts the transaction code into its own field on every insider trading row, so you can filter without parsing the filing yourself. To see only open market purchases above a threshold:

curl "https://secfeedapi.com/v1/insider-trading?code=P&minValue=100000&size=25" \
  -H "Authorization: Bearer YOUR_API_KEY"

To compare how often different codes occur for one company, pull a broader set and group by code in Python:

from secfeed import Client
from collections import Counter

sf = Client("YOUR_API_KEY")
rows = sf.insider_trades(ticker="NVDA")
counts = Counter(r["code"] for r in rows)
print(counts)

The table parameter on the same endpoint lets you separate non-derivative transactions, mostly common stock, from derivative transactions, mostly options, if you want to analyze each table independently. See the full parameter list at the insider trading endpoint, and the surrounding form structure in SEC Form 4 Explained.

Frequently asked questions

What is the most common Form 4 transaction code?

Across most companies, codes A, F, M, P and S account for the large majority of filings, since they cover ordinary equity compensation grants, exercises, tax withholding and open market trades.

Does code S always mean an insider is bearish?

No. An open market sale can be driven by diversification, taxes, a planned expense or a prearranged Rule 10b5-1 plan set up months in advance. The code identifies the type of transaction, not the reason behind it.

Why do some Form 4 rows show no price?

Transactions like gifts (code G), inheritance (code W) and some grants (code A) do not involve a market price, so the price field is often zero or left blank on those lines.

Is there a code for stock buybacks by the company itself?

No. Form 4 reports transactions by individual insiders under Section 16, not company level buyback programs, which are disclosed separately, such as in periodic reports.

Where can I find the official list of codes?

The complete, authoritative list is published in the General Instructions to Form 4 on sec.gov. SecFeed extracts the same codes directly from each filing's data.

Get this data as clean JSON

SecFeed turns SEC filings into structured data with one API call: GET /v1/insider-trading?code=P&minValue=100000. 500 free calls a month.

Get a free API key →

For information only, not investment advice. Data from public SEC filings; verify important figures on SEC.gov. See our AI Disclosure.