EDGAR-CORPUS: Billions of Tokens Make The World Go Round

Lefteris Loukas, Manos Fergadiotis, Ion Androutsopoulos, Prodromos MalakasiotisarXiv 2021 · DOI

TL;DR

Researchers from the Athens University of Economics and Business and EY have released EDGAR-CORPUS, the largest publicly available financial NLP dataset to date, featuring 6.5 billion tokens extracted from 25+ years of SEC filings. Alongside the corpus, they’ve open-sourced a specialized web crawler and domain-specific Word2Vec embeddings that significantly outperform generic models on financial reasoning tasks.

What Problem Does This Paper Address?

While Natural Language Processing (NLP) has revolutionized many fields, the financial domain has lagged behind due to a "data accessibility" gap. The U.S. Securities and Exchange Commission (SEC) maintains the EDGAR system, a treasure trove of annual reports (10-K filings) from every publicly traded company. However, these documents are a nightmare to parse: they are often hundreds of pages long, formatted in messy HTML, and filled with complex tables.

Previously, researchers had to either pay for expensive subscription services or build fragile custom crawlers. Existing open datasets were often limited to specific years, a small number of companies, or only specific sections of the reports. This lack of a standardized, large-scale, and clean dataset has hindered the development of robust financial AI.

Methods

The authors took a three-pronged approach to solve this:

  1. EDGAR-CRAWLER: They developed a Python toolkit to automate the downloading of 10-K filings. The tool doesn't just grab the files; it uses Beautiful Soup to strip HTML and regular expressions to split the massive documents into their 20 standardized sections (e.g., "Risk Factors," "Legal Proceedings," "Management’s Discussion").
  2. EDGAR-CORPUS Construction: Using the crawler, they processed every 10-K filing from 1993 to 2020. Crucially, they removed all tables to focus purely on the textual narrative, resulting in a clean JSON-formatted dataset.
  3. EDGAR-W2V Embeddings: To demonstrate the corpus's utility, they trained Word2Vec skip-gram embeddings (200-dimensional) on the 6.5 billion tokens. They used spaCy for tokenization and Gensim for the heavy lifting of training the model on a 100,000-word vocabulary.

Datasets

The paper introduces EDGAR-CORPUS, which stands as a new benchmark in the field:

  • Scale: 6.5 billion tokens (compared to the previous largest at 359 million).
  • Breadth: 38,009 companies.
  • Depth: 27 years of history (1993–2020).
  • Structure: Organized into 20 distinct items/sections per report.

For evaluation, the authors compared their new embeddings against generic GloVe embeddings and the previous state-of-the-art financial embeddings by Tsai et al. (2016).

Key Insights and Ideas

  • Domain Specificity is King: The authors used UMAP (a dimensionality reduction technique) to visualize their embeddings. They found that EDGAR-W2V naturally clusters words by entity type—grouping months, industries, and financial terms (like "volatility" and "liquidity") with high precision.
  • The "Stemming" Pitfall: Interestingly, the previous state-of-the-art financial embeddings (Tsai et al.) performed similarly to generic GloVe. The authors hypothesize this is because Tsai et al. used stemming, which likely removed critical semantic information necessary for understanding technical financial discourse.
  • Contextual Neighbors: The nearest neighbors for words in EDGAR-W2V are highly relevant. For example, the word "economy" is closely linked to "downturn," "recession," and "slowdown"—associations that are vital for sentiment analysis in finance but might be diluted in general-purpose corpora.

Key Results

The authors tested their embeddings across three distinct financial NLP tasks, and EDGAR-W2V won across the board:

  • FinSim-3 (Hypernym Classification): Classifying economic terms into categories like "Bonds" or "Stocks." EDGAR-W2V achieved 87.9% accuracy, beating GloVe (85.3%).
  • FinT (Financial Tagging): A sequence labeling task for accounting taxonomies. EDGAR-W2V reached an F1 score of 77.3, outperforming GloVe’s 75.8.
  • FiQA (Sentiment Analysis): Predicting sentiment scores for financial tweets. EDGAR-W2V achieved an R² of 0.176, a massive jump over GloVe’s 0.119.

Limitations and Future Work

While the current corpus is massive, it is currently limited to 10-K (annual) filings. The authors acknowledge that the financial world moves faster than once a year. They plan to extend the EDGAR-CRAWLER to support 10-Q (quarterly) and 8-K (significant event) filings to capture more real-time data.

Additionally, while Word2Vec is a solid baseline, the authors suggest that the next logical step is leveraging this massive corpus to train or fine-tune Transformer-based models (like BERT or RoBERTa) specifically for the financial domain, which remains a relatively understudied area in the era of Large Language Models.

Summary updated

BibTeX
@misc{loukas2021edgar,
  author = {Lefteris Loukas and Manos Fergadiotis and Ion Androutsopoulos and Prodromos Malakasiotis},
  title = {{EDGAR-CORPUS: Billions of Tokens Make The World Go Round}},
  year = {2021},
  eprint = {2109.14394},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2109.14394},
}
Figure