Exploring 10-K & 10-Q SEC Filings for Mentions of Bitcoin

in #python4 months ago

secfilings.jpg

Public companies file 10-K, 10-Q, and other documents to SEC where they disclose various financial information about the company. 10-K documents are annual reports and 10-Q documents are quarterly reports. This information is publicly available at sec.gov, and SEC has an easy to use search tool called Edgar. Using Edgar, investors can find information about companies, company filings, etc for their research.

10-K documents usually contain information about companies main operations, risk factors, various financial data, management's discussions and analysis, as well as financial statements. I was looking at Tesla's 10-K to see what they were saying about their bitcoin investment strategy. Under sub-title We hold and may acquire digital assets that may be subject to volatile market prices, impairment and unique risks of loss, they say:

In January 2021, we updated our investment policy to provide us with more flexibility to further diversify and maximize returns on our cash that is not required to maintain adequate operating liquidity. As part of the policy, which was duly approved by the Audit Committee of our Board of Directors, we may invest a portion of such cash in certain alternative reserve assets including digital assets, gold bullion, gold exchange-traded funds and other assets as specified in the future. Thereafter, we invested an aggregate $1.50 billion in bitcoin under this policy and may acquire and hold digital assets from time to time or long-term. Moreover, we expect to begin accepting bitcoin as a form of payment for our products in the near future, subject to applicable laws and initially on a limited basis, which we may or may not liquidate upon receipt.

By now Tesla's purchase of bitcoin, its interest in bitcoin and intentions to accept bitcoin as form of payment for their products is an old news. While in the document word bitcoin is mentioned 9 times, the same paragraph quoted above is mentioned in several sections.

I also looked at 10-K filed by MicroStrategy and searched for the mention of bitcoin in their filing. They mentioned bitcoin 349 times. For them it seems bitcoin is a bigger strategy. One sentence out of many explains their vision:

One strategy is to grow our enterprise analytics software business and the other strategy is to acquire and hold bitcoin.

Now I am curious how many more public companies are investing in bitcoin and taking a look at their 10-K or 10-Q reports can help with finding out. As I was preparing to see if I could automate downloading these 10-K files for multiple companies, I found this python module - sec-edgar-downloader, that makes downloading these filings super easy in couple lines of code.

Just like any other module it needs to be pip installed first as following:

pip install -U sec-edgar-downloader

Afterwards, getting needed files can be done like this:

from sec_edgar_downloader import Downloader
dl = Downloader("/path/to/valid/save/location")
dl.get("10-K", "MSFT", amount=1)

That's it.

For more details, feel free to visit the documentation here:

https://sec-edgar-downloader.readthedocs.io/en/latest/

Downloading the files is half of the work. Next steps are to go through the files, read them and find the paragraphs where bitcoin is mentions. Once files are available, more research can be done based on the what we are looking for. All of this can be automated and needed data analyzed programmatically.

I wrote a script to do just that. This scrip would go through list of company ticker symbols list and download all the documents from sec edgar. Afterwards, it locates the files in the local machines, reads them and displays all the mentions of the bitcoin if there are any. For this initial test I only used two companies mentioned above: Tesla and MicroStrategy. At a later time, I will make a larger list of companies to explore their 10-K filings for the mentions of bitcoin.

And here is the script that downloads 10-K filings and checks for mentions of bitcoin:

from sec_edgar_downloader import Downloader
from bs4 import BeautifulSoup
import os
import re

companies = ['TSLA', 'MSTR']
report = '10-K'

def get_report_path(company, report):
    os.chdir(os.path.expanduser("~"))
    path = os.getcwd()
    path = f'{path}/Desktop/edgar/sec-edgar-filings/{company}/{report}'
    os.chdir(path)
    path = os.getcwd()
    folder = os.listdir(path)[0]
    path = f'{path}/{folder}/filing-details.html'
    return path

for company in companies:
    path = f"{os.getcwd()}/Desktop/edgar/"
    dl = Downloader(path)
    dl.get(report, company, amount=1)

for company in companies:
    report_file_path = get_report_path(company, "10-K")
    soup = BeautifulSoup(open(report_file_path), "html.parser")
    count = 1
    for x in soup(text=re.compile(r'bitcoin')):
        print(count)
        print(x)
        print('----')
        count += 1

Coin Marketplace

STEEM 0.38
TRX 0.06
JST 0.041
BTC 34540.87
ETH 2160.43
USDT 1.00
SBD 6.38