How it works

From SEC data sets to an Excel workbook

Three queries and a Python script. Nothing is scraped, estimated or rekeyed by hand.

The data is downloaded from the SEC — this link.

This handy document describes the contents of and relationships in the data.

The three queries

One query returns all the items on the financial statements from the most recent filing (including amended filings) including Domestic (10-K), Foreign (20-F), or Canadian (40-F) companies.

A second query returns where all the data came from (this becomes the left most column in the excel file).

A third query is a research log and returns when firms changed the XBRL tags they used on the financial statements (this is reported in the Tag Aliases sheet).

Assembling the workbook

Python combines the results of the 3 queries into an excel file.

Python then opens the excel file and checks each financial statement to look for errors, and if it finds them it notes them directly in the excel file.

Go have a look

The workbooks are free. If you find something that looks wrong, that’s the most useful email you can send: olsent@gonzaga.edu. I’d love to hear from you!