secReportingOwners
Many studies published in Accounting journals address the connections between owners (term used by the SEC to designate persons who own stocks of a company) as a driver of observable phenomena. In this page, you find a Python module that helps you retrieve information related to those owners from the SEC Edgar environment. While doing that, you will get in touch with other Python packages, such as Pandas, BeautifulSoup, edgar, functools, glob and tqdm.
First of all, it is imperative to know that the abusive use of proprietary webpages such as the SEC Edgar environment is not welcome and, therefore, should be banned. Any automated crawling of data, even when allowed, should not extrapolate the limits established by the website owner. Check the SEC rules for that before you run any loops to download data from their website. I do not assume responsibility for abusive behaviour, for this text is merely a non-commercial for educational purposes only explanation of how important the SEC Edgar systems are for research. It is fundamentally that it remains open for access as it is. So, do not overuse it!
The main interest here is the table that reports ownership of a given company. Let's use one real example. The company with CIK number 0000000020 has its table at this page. As you can see, there are two tables: one is the ownership report and, the other, brings details regarding the insider trades of each one of the names listed in the first table. In this post, we are going to retrieve the first table and then do some work with it.
To download and store that table, we are using the function getOwners() from my GitHub page. Look for the repository called sec and copy the code or download the repository, whatever works for you. Go to your Python interpreter, import the module and then type:
df = getOwners(['0000000020'])
That assigns the table to a Pandas DataFrame called df and, once printed to your screen, should look like this:
Note that, besides the owner's CIK, we also have some dates. Those dates are respectively the first and last dates reported as insider trade dates with that company.
To be continued...