Quant Memo
Core

Mining SEC Filings with NLP

The end-to-end practice of extracting usable trading signals from 10-Ks, 10-Qs, and 8-Ks — parsing messy legal documents into clean text, comparing filings across time to find what actually changed, and turning that change into a number a strategy can act on.

Prerequisites: Bag of Words and TF-IDF, The Loughran-McDonald Financial Lexicon

SEC filings are public, free, and enormous — a large company's 10-K can run to hundreds of pages of dense legal and accounting prose, refiled every year with 90%+ of the text unchanged. The raw text isn't a signal by itself; the signal is usually in what's different from the last filing, and finding that difference across thousands of companies and years requires an automated pipeline, not a human reading every document.

The analogy: proofreading a contract renewal

Imagine a landlord re-signs the same lease with a tenant every year, and almost every clause is copied verbatim. A careful lawyer doesn't re-read all forty pages from scratch each time — they diff this year's lease against last year's, and only the changed clauses get scrutiny. SEC filing NLP is built on the same instinct at scale: don't read a filing in isolation, compare it against its own prior version, because the change is usually more informative than the level.

The pipeline, piece by piece

  1. Parse the raw filing. SEC filings arrive as HTML or plain text with tables, footnotes, and boilerplate legal formatting; the first step is stripping markup and splitting the document into sections (Item 1A "Risk Factors," Item 7 "MD&A," and so on).
  2. Normalize across filers and years. Company names, dates, and dollar figures vary in format; text is lowercased, tokenized, and often stripped of numbers so that comparisons focus on language rather than incidental figures.
  3. Compare to the prior filing. A similarity measure — commonly cosine similarity on TF-IDF vectors — quantifies how much a section changed year over year. A low similarity score flags a section that was substantially rewritten.
  4. Score tone or content. Loughran-McDonald word counts, a trained classifier, or an LLM prompt turns the (changed) text into a tone score or a category.
  5. Align to trading dates. The resulting scores are timestamped to the filing's public release and merged onto a price panel, respecting the point-in-time availability of the filing to avoid look-ahead bias.

Worked example: measuring year-over-year similarity

A company's Risk Factors section from last year and this year are each represented as TF-IDF vectors over a shared vocabulary. Cosine similarity between the two vectors is

cos(θ)=abab.\cos(\theta) = \frac{\mathbf{a}\cdot\mathbf{b}}{\|\mathbf{a}\|\,\|\mathbf{b}\|} .

Suppose the computed value is 0.970.97 — very close to 1, meaning the two vectors point in nearly the same direction, i.e., the risk-factor language was almost unchanged. A different company's filing scores 0.710.71: substantially rewritten, and worth a closer read. Research using this kind of similarity score has found that filings with the most year-over-year change are, on average, associated with worse subsequent stock returns — the market appears to underreact to how much language actually shifted.

Worked example: a tone-change signal

Suppose Loughran-McDonald net tone (computed earlier in this domain) was 0.10-0.10 last year and 0.40-0.40 this year for the same company's MD&A section. The tone-change signal is Δtone=0.40(0.10)=0.30\Delta\text{tone} = -0.40 - (-0.10) = -0.30 — a meaningfully more negative shift in management's own language, timestamped to the filing date and usable as one input into a broader model, alongside fundamentals and price data, rather than as a standalone signal.

Filing, year t-1 Filing, year t similarity score / tone change → merged onto price panel
The signal usually isn't the filing's content in isolation, but the measured change between consecutive filings — a similarity score or tone shift — timestamped and merged onto a price history.

What this means in practice

The hard part of SEC filing NLP is rarely the modeling step — it's the plumbing: correctly parsing inconsistent HTML across thousands of filers, aligning sections that get renamed or reorganized, and making sure every signal is timestamped to when the filing was actually public, not when it was later cleaned and added to a research dataset. Getting the timing wrong is the single most common way a filings-based backtest silently leaks future information into the past.

SEC filing NLP pipelines usually find their signal in what changed between consecutive filings — measured via text similarity or tone shift — rather than in the level of any single filing's content, since most of a filing's text is boilerplate repeated year after year.

Filings are sometimes amended or restated after their original filing date, and datasets that aren't point-in-time can silently substitute the amended version for the original in a historical backtest. Always confirm a filings dataset preserves the exact text and timestamp as it was originally available, not a later corrected version.

Related concepts

Practice in interviews

Further reading

  • Loughran & McDonald, Textual Analysis in Accounting and Finance: A Survey
  • Cohen, Malloy & Nguyen, Lazy Prices, Journal of Finance
ShareTwitterLinkedIn