- Download Master Index Files: process critical lookup index for each Edgar filing (company name, filing date, filing url, etc.)
- Extract Filing Headers: additional filing metadata (contents within filing's
<SEC_HEADER>
tag) - Download Filings: in this case, the annual proxy filings (
formtype="DEF 14A"
)
- Detect Compensation Table: Random Forest classifier finds the compensation table out of 100s of random/noisy tables in the raw DEF14A document
- Parse Table Contents: Messy and inconsistent raw HTML tables get translated into structured JSON objects with Salary details (total, base, bonus, options, etc.)
- Decoupled into functional units:
- a self-contained event processor (e.g. idx_downloader.py)
- a batch process that queues-and-invokes a series of events (e.g. batch_idx_downloader.py).
- Multiple output options: Local directories or S3
- Multiprocessing can be toggled on/off via
config.py
- Designed to work as a script (via CLI) or as an imported module within Python
usage: idx_downloader.py [-h] [--local_output LOCAL_OUTPUT] yyyyqq
downloads individual quarterly master index files from SEC edgar
positional arguments:
yyyyqq <yyyyqq> formatted year-quarter pair (eg 202001) to download from edgar
optional arguments:
-h, --help show this help message and exit
--local_output LOCAL_OUTPUT
where to send output on local machine; defaults to 's3', which uploads to the config.Aws.OUPUT_BUCKET defined in
config.py)
Output Example
S3 naming convention: <config.Aws.OUPUT_BUCKET>/masteridx/year=2020/qtr=1.txt
Local naming convention: ./ceopay/data/masteridx/year=2020/qtr=1.txt
usage: hdr_extractor.py [-h] [--local_output LOCAL_OUTPUT] yyyyqq formtype
extract additional metadata (contents within each filing's <SEC-HEADER> tags) across all filings within an individual master index file
(filtered on a given 'formtype')
positional arguments:
yyyyqq <yyyyqq> formatted year-quarter pair (eg 202001) to download from edgar
formtype eg "DEF 14A", "10-K", "10-Q", etc
optional arguments:
-h, --help show this help message and exit
--local_output LOCAL_OUTPUT
where to send output on local machine; defaults to 's3', which uploads to the config.Aws.OUPUT_BUCKET defined in
config.py)
Output Example
S3 naming convention: <config.Aws.OUPUT_BUCKET>/filing_metadata/formtype=def14a/year=2020/qtr=1.txt
Local naming convention: ./ceopay/data/filing_metadata/formtype=def14a/year=2020/qtr=1.txt