get_ret_bbg: Get time-series daily returns of asset from Bloomberg. It is...

get_ret_bbgR 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

Description

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

Usage

get_ret_bbg(instruments_df, start_date = as.Date("1994-01-01"),
  end_date = today())

Arguments

instruments_df

A dataframe containing the columns 'asset_class' and 'identifier'

start_date

A Date variable

end_date

A Date variable

Value

A gathered dataframe containing timeseries daily returns with columns 'date', 'instrument' and 'return'

Examples


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)


yunching/tidymas documentation built on Feb. 5, 2023, 1:42 p.m.