-
-
Notifications
You must be signed in to change notification settings - Fork 106
FindingThings
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 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.
def find(search_id: Union[str, int]) -> Union[Filing, EntityData, CompanySearchResults, Fund, FundClass, FundSeries]:
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 aFund
object if the ticker is a fund ticker -
Company name: Returns
CompanySearchResults
object
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")
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)
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")
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")
After you get the results you can get the company by the index of the search results.
company = search_results[0]
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()
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.
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:
- 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
# 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")
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"])
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)
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.
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.
- 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)
The edgartools library offers powerful tools for navigating SEC Edgar filings efficiently.
Key features include:
- The versatile find function for locating various types of SEC data.
- Extensive filtering capabilities to refine search results.
- Ability to combine filters for precise data retrieval.
- 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!