| sfa_load_statements {simfinapi} | R Documentation |
Get financial statements
Description
Fundamentals and derived figures can be retrieved here.
Usage
sfa_load_statements(
ticker = NULL,
id = NULL,
statements,
period = "fy",
fyear = NULL,
start = NULL,
end = NULL,
ttm = FALSE,
asreported = FALSE,
api_key = getOption("sfa_api_key"),
cache_dir = getOption("sfa_cache_dir")
)
Arguments
ticker |
integer Ticker of the companies of interest. |
id |
integer 'SimFin' IDs of the companies of interest. Any
|
statements |
character vector of statements, available values: pl (Profit & Loss), bs (Balance Sheet), cf (Cash Flow), derived (Derived Ratios and Indicators). |
period |
character Filter for periods. As a non-SimFin+ user, you have to provide exactly one period. As SimFin+ user, this filter can be omitted to retrieve all statements available for the company.
|
fyear |
integer Filter for fiscal year. As a non-SimFin+ user, you have to provide exactly one fiscal year. As SimFin+ user, this filter can be omitted to retrieve all data available for the company. |
start |
Date Filter for the report dates (reserved for SimFin+ users). With this filter you can filter the statements by the date on which the reported period ended ('Report Date'). By specifying a value here, only statements will be retrieved with report dates ending AFTER the specified date. |
end |
Date Filter for the report dates (reserved for SimFin+ users). With this filter you can filter the statements by the date on which the reported period ended ('Report Date'). By specifying a value here, only statements will be retrieved with report dates ending BEFORE the specified date. |
ttm |
logical If |
asreported |
logical If |
api_key |
character Your 'SimFin' API key. It's recommended to set the API key globally using sfa_set_api_key. |
cache_dir |
character Your cache directory. It's recommended to set the cache directory globally using sfa_set_cache_dir. |
Value
data.table containing the statement(s) data.
Parallel processing
This function supports parallel processing via future.apply. If your
machine has several cores (most have), you can make the API calls in
parallel. To do so, define a future::plan() before calling the function.