R/functions.r
storethat_equity_book.Rd
Retrieve equity historical book data previously stored in a storethat SQLite database. Books include 'key stats', 'income statement', 'balance sheet', 'cash flow statement' and 'ratios'.
storethat_equity_book(file = NULL, book, tickers, start, end, verbose = T)
file | a scalar chatacter vector. Specifies the target storethat SQLite database file. |
---|---|
book | a scalar chatacter vector, 'key stats', 'income statement', 'balance sheet', 'cash flow statement' or 'ratios'. |
tickers | a chatacter vector. Specifies the Bloomberg equity tickers to query data for. |
start | a scalar character vector. Specifies the starting date for the query in the following format: 'yyyy-mm-dd'. |
end | a scalar character vector. Specifies the end date for the query in the following format: 'yyyy-mm-dd'. |
verbose | a logical scalar vector. Should progression messages be printed? Defaults to TRUE. |
An S4 object of class EquityKS (book = 'key stats'
),
EquityIS (book = 'income statement'
), \linkS4classEquityBS
(book = 'balance sheet'
), EquityCF
(book = 'cash flow statement'
), EquityRatios
(book = 'ratios'
).
if (FALSE) { storethat_KS <- storethat_equity_books(book = 'key stats', tickers = c("BP/ LN Equity", "WEIR LN Equity"), start = "2010-01-01", end = as.character(Sys.Date())) storethat_PL <- storethat_equity_books(book = 'income statement', tickers = c("BP/ LN Equity", "WEIR LN Equity"), start = "2010-01-01", end = as.character(Sys.Date())) storethat_BS <- storethat_equity_books(book = 'balance sheet', tickers = c("BP/ LN Equity", "WEIR LN Equity"), start = "2010-01-01", end = as.character(Sys.Date())) storethat_CF <- storethat_equity_books(book = 'cash flow statement', tickers = c("BP/ LN Equity", "WEIR LN Equity"), start = "2010-01-01", end = as.character(Sys.Date())) storethat_R <- storethat_equity_books(book = 'ratios', tickers = c("BP/ LN Equity", "WEIR LN Equity"), start = "2010-01-01", end = as.character(Sys.Date())) }