Learn
Guides to US company data
How SEC filings work, how to read the numbers in them, and how to test a strategy without fooling yourself. Each guide lists its sources and the date we checked them.
SEC filings
How EDGAR works, how to find a company's filings, and the identifiers and limits that trip people up.
- EDGAR vs a stock data API: what free gets you and where it stopsExplainerSEC EDGAR gives you free filings and XBRL financials for every SEC filer. It has no prices, keys data by CIK and returns the latest value, not the first one.
- How to read SEC companyfacts JSONTutorialRead data.sec.gov companyfacts in Python: the fields, why one period has several rows, how to pick one value per period, and what the file leaves out.
- SEC filing types explained: 10-K, 10-Q, 8-K, 13F and Form 4ExplainerWhat each SEC form is for, how often it is filed, what it holds and how its name appears in EDGAR's data, with real Apple, Berkshire and TSMC examples.
- SEC rate limits and the User-Agent ruleExplainerWhy data.sec.gov returns 403 to curl and python-requests, the User-Agent SEC asks for, the 10 requests per second limit, and the bulk files that avoid it.
- Ticker to CIK: how to map symbols to SEC company IDsTutorialSEC data is keyed by CIK, not ticker. Which SEC file to use, why ticker.txt is out of date, how to pad CIKs, and how one ticker can point to two companies.
Financial statements
Reading income statements, balance sheets and cash flows from filings, and the choices you make when you turn them into numbers.
- Quarterly vs trailing-twelve-month (TTM) numbersExplainerSEC filings have no fourth-quarter report, and cash flow often comes year to date. How to build quarterly and TTM figures, using Apple's filings as the example.
- Standardized vs as-reported financial statementsExplainerAs-reported data keeps each company's own lines and tags. Standardized data maps every company onto one field list. What each gives up, with Apple's SEC data.
Point-in-time data
When each number became public, why restatements matter, and how to keep a backtest honest.
- First-filed date vs period end: which date should a backtest use?ExplainerThe period end says what span a number covers. The first-filed date says when the public could see it. Use the first-filed date to keep a backtest honest.
- Look-ahead bias: why your backtest looks too goodExplainerLook-ahead bias is a backtest using numbers before they were public. The common causes with company financials, and four checks to find it in your code.
- Restatements: the original value vs the latest valueExplainerCompanies sometimes change numbers they already reported. How to tell the original value from the latest one in SEC data, and when to use each.
Ownership
13F filings, ETF holdings and the dates and identifiers you need to use them correctly.
- How to map 13F CUSIPs to tickersTutorialA 13F lists CUSIPs, not tickers. Map them with the free OpenFIGI API, tested on all 30 CUSIPs in Berkshire Hathaway's Q3 2026 13F, plus three traps.
- The 13F 45-day lag: what it does to a backtestExplainerA 13F is 45 to 48 days old when it appears. Real Berkshire Hathaway filing dates, and the date rule to use when you test a strategy on 13F data.
- Where ETF holdings data comes from: issuer files and SEC N-PORTExplainerETF holdings come from the issuer's own file or from SEC Form N-PORT. How the two differ for SPY on dates, identifiers, cash lines and weights.
Prices
Raw and adjusted prices, splits, dividends and the biases that hide in price history.
- Adjusted close vs raw close: which one to useExplainerThe raw close is what a share traded at that day. The adjusted close is rebuilt for later splits and dividends. Which to use for returns, charts and fills.
- Survivorship bias in stock price dataExplainerA backtest built on today's ticker list leaves out companies that failed or were bought. A real case in SEC data, and how to keep delisted companies in.
- Why adjusted prices differ between providersExplainerTwo providers can give different adjusted closes for the same day. The five causes, shown on a made-up stock, and a checklist for finding which one applies.
Data rights
What a data licence lets you do: use data yourself, show it to your users, or pass it on.
- A licence checklist for choosing a stock data APIChecklistTwelve questions to answer in writing before you pay for a stock data API: who sees the data, what you may store, derived numbers, AI use and attribution.
- Can I show stock API data to my users?ExplainerUsually not on a personal or starter plan. What four data vendors' own pages said on 2 December 2026, and a five-step check to run before you launch.
- Internal use, display and redistribution: which one is your project?ExplainerThree questions decide which stock data licence you need: who sees the data, whether customers see it, and whether anyone can pull the raw values out.
Choosing a data API
How to compare stock data APIs, and how to avoid being stuck when a vendor changes.
- EDGAR or a paid stock data API? A decision tableComparisonChoose free SEC EDGAR or a paid API by the job you need done. Twelve common jobs, each with a verdict and the EDGAR limit behind it, checked on SEC data.
- How to avoid a forced stock data API migrationGuideIEX Cloud shut down three months after its notice; Polygon.io became Massive with both hosts live. Seven habits that make a data vendor change cheap.
- How to choose a US stock data APIGuideDecide by data rights, datasets, history and how a vendor handles change. Then run eight checks with known SEC answers during a free trial, before you pay.
AI agents
Giving an AI agent market data it can cite: sources, dates and the tools agents read.
- Free SEC MCP server or a stock data API?ComparisonTwo open-source SEC EDGAR MCP servers, read and compared: what they return, what they leave out, and the agent questions that need another data source.
- Which financial data can your AI agent trust?GuideAn agent can trust a number only as far as it can say where it came from and when. Seven fields to attach to every value, and traps found in SEC data.