get_dur_bbg | R Documentation |
Get time-series duration of asset from Bloomberg. It is a generic function which means new duration functions can be easily added for new assets
get_dur_bbg(instruments_df, start_date = as.Date("1994-01-01"), end_date = today(), fill = TRUE)
instruments_df |
A dataframe containing the columns 'identifier' and 'asset_class' |
start_date |
A Date variable |
end_date |
A Date variable |
fill |
A boolean indicating whether NAs in the data should be filled, data is only filled upwards |
A dataframe containing the the time-series duration of the assets, with the identifier as the name
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_dur_bbg(inst)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.