Description Usage Arguments Value Examples
View source: R/gitrd_GetITRData.R
Quarterly and annual financial reports are downloaded from B3 for a combination of companies and time period. The easist way to get started with gitrd.GetITRData is looking for the official name of traded companies using function gitrd.search.company('nametolookfor'). Alternatively, you can use function gitrd.get.info.companies('companies') to import a dataframe with information for all available companies and time periods.
1 2 3 4 | gitrd.GetITRData(name.companies, first.date = Sys.Date() - 12 * 30,
last.date = Sys.Date(), type.info = "individual",
periodicy.fin.report = "annual", inflation.index = "dollar",
max.levels = 3, folder.out = tempdir(), be.quiet = FALSE)
|
name.companies |
Official names of companies to get financial reports (e.g. 'ELETROPAULO METROPOLITANA EL.S.PAULO S.A'). Names of companies can be found using function gitrd.search.company('nametolookfor') or gitrd.get.info.companies('companies') |
first.date |
First date (YYYY-MM-DD) to get data. Character or Date. E.g. first.date = '2010-01-01'. |
last.date |
Last date (YYYY-MM-DD) to get data. Character or Date. E.g. last.date = '2017-01-01'. |
type.info |
Type of financial statements, 'individual' (default) or 'consolidated'. Argument can be a single value or a vector with the same length as name.companies. The individual type only includes financial statements from the company itself, while consolidated statements adds information about controlled companies |
periodicy.fin.report |
The frequency of financial reports: 'annual' (default) or 'quarterly' |
inflation.index |
Sets the inflation index to use for finding inflation adjusted values of all reports. Possible values: 'dollar' (default) or 'IPCA', the brazilian main inflation index. When using 'IPCA', the base date is set as the last date found in itr/dfp dataset. |
max.levels |
Sets the maximum number of levels of accounting items in financial reports |
folder.out |
Folder where to download and manipulate the zip files. Default = tempdir() |
be.quiet |
Should the function output information about progress? TRUE (default) or FALSE |
A tibble (dataframe with lists) object with all gathered financial statements, with each company as a row in the tibble.
1 2 3 4 5 6 7 8 9 10 | ## Not run: #dontrun: keep cran check time short
name.companies <- 'ELETROPAULO METROPOLITANA EL.S.PAULO S.A'
first.date <- '2005-01-01'
last.date <- '2006-01-01'
df.statements <- gitrd.GetITRData(name.companies = name.companies,
first.date = first.date,
last.date = last.date)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.