This function uses the Bloomberg API to retrieve 'bdp' (Bloomberg Data Point) queries
bdp(securities, fields, options = NULL, overrides = NULL, verbose = FALSE,
identity = NULL, con = defaultConnection())
A character vector with security symbols in Bloomberg notation.
A character vector with Bloomberg query fields.
An optional named character vector with option values. Each field must have both a name (designating the option being set) as well as a value.
An optional named character vector with override values. Each field must have both a name (designating the override being set) as well as a value.
A boolean indicating whether verbose operation is desired, defaults to ‘FALSE’
An optional identity object.
A connection object as created by a blpConnect
call, and retrieved via the internal function
defaultConnection
.
A data frame with as a many rows as entries in
securities
and columns as entries in fields
.
# NOT RUN {
bdp(c("ESA Index", "SPY US Equity"), c("PX_LAST", "VOLUME"))
## using overrides (cf https://github.com/Rblp/Rblpapi/issues/67)
bdp("EN00 Index", "MLI_OAS", overrides=c(MLI_DATE="20150831"))
## another override example (cf http://stackoverflow.com/a/39373019/143305)
ovrd <- c("CALC_INTERVAL"="10Y", "MARKET_DATA_OVERRIDE"="PE_RATIO")
bdp("SPX Index", "INTERVAL_AVG", overrides=ovrd)
# }
Run the code above in your browser using DataLab