Skip to content

FindingThings

Dwight Gunning edited this page Aug 6, 2024 · 4 revisions

🔎 Finding things with edgartools

This guide provides examples of how to use the find function to locate filings, entities, companies, funds, and other types of SEC data.

The find Function

The find function is a versatile search tool that can handle various types of input and return appropriate objects. It's designed to be a one-stop solution for finding different types of SEC data.

Function Signature

def find(search_id: Union[str, int]) -> Union[Filing, EntityData, CompanySearchResults, Fund, FundClass, FundSeries]:

Description

This function can take a variety of search identifiers and return the appropriate object based on the input:

  • Accession number: Returns a Filing object
  • CIK: Returns an Entity object
  • Class/Contract ID: Returns a FundClass object
  • Series ID: Returns a FundSeries object
  • Ticker: Returns a Company or a Fund object if the ticker is a fund ticker
  • Company name: Returns CompanySearchResults object

Code Examples

Finding by Accession Number

If you know the accession number of the filing you're looking for, you can use the find function to retrieve the filing object. This works for any filing going back to 1993.

# Find by accession number
filing = find("0000123456-22-123456")

Find a company or person by CIK

If you know the CIK (Central Index Key) of a company or person, you can use the find function to retrieve the entity object. This takes the cik as a number or a string representation of the number.

0000320193, "320193", 320193 works equally well for Apple Inc.

apple = find(320193)

Apple by CIK

Find a company by ticker

You can also find a company by its ticker symbol. This works by using the ticker to do a cik lookup, then it finds the company by cik.

company = find("AAPL")

Find by company name

You can search for a company by its name. This returns a list of companies that match the search term. The search term is case-insensitive and can be a partial match on the ticker or company name.

search_results = find("Biomedical")

Biomedical

After you get the results you can get the company by the index of the search results.

company = search_results[0]

Finding Filings

Related Filings

You can find related filings for a given filing. The link between filings is defined by the file number and so the related filings result are all filing that share the file number with the current filing. this is useful for seeing the history of offerings.

filing = find("0001213900-24-063635")
filing.related_filings()

Related Filings

Filtering Filings

The filter method in edgartools provides a powerful way to narrow down your search results. You can filter filings based on various criteria such as form type, date, CIK, and ticker.

Method Signature

def filter(self,
           form: Optional[Union[str, List[IntString]]] = None,
           amendments: bool = False,
           filing_date: Optional[str] = None,
           date: Optional[str] = None,
           cik: Union[IntString, List[IntString]] = None,
           ticker: Union[str, List[str]] = None) --> Filings:

Parameters

  • form: The form or list of forms to filter by (e.g., "10-K", ["10-K", "8-K"])
  • amendments: Whether to include amendments to the forms (e.g., include "10-K/A" if filtering for "10-K")
  • filing_date or date: The filing date (these are aliases)
  • cik: The CIK or list of CIKs to filter by
  • ticker: The ticker or list of tickers to filter by

Filtering by Date

# Get filings
filings = get_filings()

# On a specific date
filings.filter(date="2020-01-01")

# Up to a date
filings.filter(date=":2020-03-01")

# From a date
filings.filter(date="2020-01-01:")

# Between dates
filings.filter(date="2020-01-01:2020-03-01")

Filtering by Company

Filter filings by CIK or ticker:

# Filter by CIK
filings.filter(cik="0000320193")

# Filter by multiple CIKs
filings.filter(cik=["0000320193", "0000789019"])

# Filter by ticker
filings.filter(ticker="AAPL")

# Filter by multiple tickers
filings.filter(ticker=["AAPL", "MSFT"])

By Form Type

Filter filings by their form type:

# Filter for a single form type
filings.filter(form="10-K")

# Filter for multiple form types
filings.filter(form=["10-K", "8-K"])

# Include amendments
filings.filter(form="10-K", amendments=True)

Combining multiple filters

You can combine multiple filters in a single call:

filings.filter(
    form="10-K",
    date="2020-01-01:2020-12-31",
    ticker="AAPL"
)

This will return all 10-K filings for Apple Inc. filed in the year 2020.

Return Value

The filter method returns a new Filings object containing the filtered results. If an invalid date is provided, it will log an error and return None. Remember that filtering is cumulative, so you can chain multiple filter calls to further refine your results.

Best practices

  • Use the filter function to narrow to the smallest set of filings you need. e.g. 10-K filings for Apple Inc. filed in the year 2020
  • If you have a list of tickers to get filings for, consider whether it might be faster to loop through the companies to get the filings, or loop through the filings and filtering by companies. If the list of companies is large, use the second approach.
tickers = ["AAPL", "MSFT", ....] # a large list of tickers

Instead of

for ticker in tickers:
    company = find(ticker)
    company_filings = company.get_filings()

Do

filings = get_filings()
for ticker in ["AAPL", "MSFT"]:
    company_filings = filings.filter(ticker=ticker) 

Conclusion

The edgartools library offers powerful tools for navigating SEC Edgar filings efficiently.

Key features include:

  1. The versatile find function for locating various types of SEC data.
  2. Extensive filtering capabilities to refine search results.
  3. Ability to combine filters for precise data retrieval.
  4. User-friendly design suitable for both beginners and advanced users.

Edgartools streamlines the process of accessing and analyzing SEC filings, making it an invaluable resource for financial research, due diligence, and staying informed about company disclosures.

For further assistance, refer to our documentation or reach out to the community.

Happy exploring with edgartools!