Py-Sec-Edgar – Download filings from SEC Edgar

As a Research Analyst, I’ve probably read a couple thousand filings from companies over the years.  They contain great information about the companies businesses, including revenue sources, descriptions, outlooks, and financial information.

My favorite ones to look at are the Annual Reports (Form 10-K for US Based companies, 20-F for Foreign based companies traded in US) , Registration Statements (Form S-1 for companies looking to issue shares, aka IPO), and Current Reports (Form 8-K for companies filing important information, especially investor presentations).

Py-Sec-Edgar is a tool used to download data from SEC Edgar website.

https://github.com/ryansmccoy/py-sec-edgar

Command line interface

Quick Start Guides:

Setup Environment:

conda create -n py-sec-edgar python=3.6 pandas numpy lxml -y
activate py-sec-edgar
pip install -r requirements/requirements.txt

Configure Settings:
py_sec_edgar/settings.py

# for complete list see py-sec-edgar/refdata/filing_types.xlsx
# to filter against specific forms, add to list
forms_list = ['10-K', '20-F']
# the urls of all filings are stored in index files
# so need to download these index files
# below just says download all of them
start_date = "1/1/1993"
end_date = "1/1/2020"
# add tickers to tickers.csv
tickers_filepath = os.path.join(EXAMPLES_DIR, 'tickers.csv')

Run Example:

 python py_sec_edgar/example.py

Result:

x2scrap.png

In a later post I’ll show how to extract useful information from the filings.

Leave a Reply

Your email address will not be published. Required fields are marked *