get_edgar_fin_data: Imports data from Edgar (SEC/US)

Description Usage Arguments Details Value Examples

View source: R/get_edgar_fin_data.R

Description

Every company trades in the US must deliver its financial statements to the SEC. Edgar is the system that organizes such information and allows user to query the documents.

Usage

1
2
3
4
get_edgar_fin_data(companies, years = seq(2009,
  lubridate::year(Sys.Date())), type_data = "yearly",
  consolidated = TRUE, do_cache = TRUE,
  cache_folder = "GetEdgarData-cache")

Arguments

companies

Name of companies (see get_info_companies() for querying available names)

years

Years of datasets (numeric vector)

type_data

Type of dataset ('yearly' or 'quarterly')

consolidated

Consolidade financial statements? TRUE (default) or FALSE

do_cache

Use memoise cache system? TRUE (default) or FALSE

cache_folder

Path of cache folder to save all memoise files and downloaded zip files

Details

This function downloads data from zip files available at SEC/DERA (<https://www.sec.gov/dera/data>).

Value

A dataframe with financial statements

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 

my.company <- 'APPLE INC'
my.years <- 2016:2018
my.type <- 'yearly'

out <- get_edgar_fin_data(companies = my.company,
                         years = my.years,
                         type.data = my.type,
                         consolidated = TRUE)

## End(Not run)

msperlin/GetEdgarData documentation built on Jan. 21, 2021, 9:14 a.m.