Description Usage Arguments Value Examples
Returns Bloomberg data as zoo object; it relies on Rblpapi package but simplifies download and output
1 2 3 4 |
tickers |
character vector of Bloomberg ticker(s) |
field |
optional character vector of Bloomberg field(s) |
names |
optional character vector of column name(s) for zoo object; default uses 'tickers' vector |
start |
optional start date for data download; format is 'dd/mm/yyyy' |
end |
optional end date for data download; format is 'dd/mm/yyyy' |
time |
optional string to specify start date; options are 'D' (Days), 'W' (Weeks), 'M' (Months), 'Q' (Quarters), 'Y' (Years), or 'YTD' (Year-to-Date), e.g. '3M', '4Q', '5Y', 'YTD' |
freq |
optional frequency for data download; options are 'DAILY', 'WEEKLY', 'MONTHLY', 'QUARTERLY', 'YEARLY'; default is 'MONTHLY' |
na |
optional boolean to replace NAs with the last observation if set to FALSE |
last |
optional boolean to toggle appending of the latest data points |
fut_dt |
optional boolean to toggle deletion of data points that lie in the future |
returns a zoo object with the downloaded Bloomberg data
1 2 3 4 5 | zoo <- getBBG(tickers = 'VIX Index', time = 'YTD')
zoo <- getBBG(tickers = 'VIX Index', names = 'VIX', freq = 'DAILY', time = '30Y', na = FALSE)
zoo <- getBBG(tickers = c('CPI YOY Index', 'PPI YOY Index'), names = c('CPI', 'PPI'), start = '01/01/2000')
zoo <- getBBG(tickers = c('CPI YOY Index', 'PPI YOY Index'), names = c('CPI', 'PPI'), start = '01/01/2000', end = '01/01/2018')
zoo <- getBBG(tickers = c('NAPMPMI', 'MPMIEZMA', 'MPMIEMMA'), names = c('United States (ISM)', 'Eurozone', 'Emerging Markets'), time = '3Y')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.