get_ret_bbg | R Documentation |
Get time-series daily returns of asset from Bloomberg. It is a generic function which means new return functions can be easily added for new assets
get_ret_bbg(instruments_df, start_date = as.Date("1994-01-01"), end_date = today())
instruments_df |
A dataframe containing the columns 'asset_class' and 'identifier' |
start_date |
A Date variable |
end_date |
A Date variable |
A gathered dataframe containing timeseries daily returns with columns 'date', 'instrument' and 'return'
inst <- data.frame(asset_class = c("ilb", "govt", "fut", "cds"), identifier = c("germany_ilb_5y", "us_govt_10y", "fut_rx1", "cdx_us_ig"), stringsAsFactors = FALSE) get_ret_bbg(inst)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.