View source: R/searchFilings.R
searchFilings | R Documentation |
searchFilings
Search EDGAR filings for specific keywords
searchFilings(cik.no, form.type, filing.year, word.list, useragent)
cik.no |
vector of CIK number of firms in integer format. Suppress leading zeroes from CIKs. Keep cik.no = 'ALL' if needs to download for all CIK's. |
form.type |
character vector containing form type to be downloaded. form.type = 'ALL' if need to download all forms. |
filing.year |
vector of four digit numeric year |
word.list |
vector of words to search in the filing |
useragent |
Should be in the form of "YourName Contact@domain.com" |
searchFilings function takes search keyword vector, CIK(s), form type(s), and year(s) as input parameters. The function first imports available downloaded filings in the local woking directory 'edgar_Filings' created by getFilings function; otherwise, it automatically downloads the filings which are not already been downloaded. It then reads the filings and searches for the input keywords. The function returns a dataframe with filing information and the number of keyword hits. Additionally, it saves the search information with surrounding content of search keywords in HTML format in the new directory "edgar_searchFilings". These HTML view of search results would help the user to analyze the search strategy and identify false positive hits. User must follow the US SEC's fair access policy, i.e. download only what you need and limit your request rates, see www.sec.gov/os/accessing-edgar-data.
Function returns dataframe containing filing information and the number of word hits based on the input phrases. Additionally, this function saves search information with surrounding content of search keywords in HTML file in directory "Keyword search results".
## Not run:
word.list = c('derivative','hedging','currency forwards','currency futures')
output <- searchFilings(cik.no = c('1000180', '38079'),
form.type = c("10-K", "10-K405","10KSB", "10KSB40"),
filing.year = c(2005, 2006), word.list, useragent)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.