simfinR_get_fin_statements: Get financial statements from simfin

Description Usage Arguments Value Examples

View source: R/get_fin_statements.R

Description

Uses the simfim api <https://simfin.com/> for downloading corporate financial datasets available at the website. In order to use the function, you'll need a valid api key from <https://simfin.com/data/access/api>. All data from the site is locally cached with package memoise, meaning it will never grab repeated data from the api.

Usage

1
2
3
4
5
6
7
8
simfinR_get_fin_statements(
  id_companies,
  api_key,
  type_statements = c("pl", "bs", "cf"),
  periods = "FY",
  years = 2018,
  cache_folder = "simfin_cache"
)

Arguments

id_companies

Simfin Id of companies to get data (see simfinR_get_available_companies for details)

api_key

Your api key (get one at <https://simfin.com/data/access/api>)

type_statements

Types of financial statements ('pl' - profit loss, 'bs' - balance sheet, 'cf' - cashflow)

periods

Time periods to grab the data: 'FY' - fiscal year (only for 'pl' and 'cf', use 'Q4' for end of year 'bs'), 'Q1' - first quarter, 'Q2', 'Q3', 'Q4'

years

The years to grab data (vector or single value)

cache_folder

Directory for cache files

Value

A dataframe with financial statements

Examples

1
2
3
4
5
6
7
## Not run: 
id_companies <- 59265
api_key <- 'YOURAPIHERE'

df_fin <- get_fin_statements(id_companies, api_key = api_key)

## End(Not run)

simfinR documentation built on April 2, 2021, 5:06 p.m.