Get Bloomberg SDR data

Description

The Bloomberg Swap Data Repository (BSDR) is a registered U.S. swap data repository that allows market participants to fulfil their public disclosure obligations under U.S. legislation. BSDR is required to make publicly available price, trading volume and other trading data reported to its U.S. repository. It publishes this data on its website in real-time and also on a historical basis. I have reverse engineered the JavaScript libraries used by its website to call the Bloomberg Application Service using POST requests to a target URL.

Usage

1
get_bsdr_data(date, asset_class = NULL, curate = TRUE)

Arguments

date

the date for which data is required as Date or DateTime object. It will use all date-time elements including year, month, day, hour, minute, second (incl. fractional seconds) and time zone information to determine the set of trades to return. It will return the set of trades for the day starting on date.

asset_class

the asset class for which you would like to download trade data. Valid inputs are "CR" (credit), "IR" (rates), "EQ" (equities), "FX" (foreign exchange), "CO" (commodities). Can be a vector of these. Defaults to NULL which corresponds to all asset classes.

curate

a logical flag indicating whether raw data should be returned or whether the raw data should be processed (default). The latter involves selecting particular fields and formatting these as seemed appropriate based on data and API reviews at the time the formatting was coded.

Value

a data frame containing the requested data, or an empty data frame if data is unavailable

References

BSDR search

Examples

1
2
3
4
5
6
7
8
## Not run: 
library (lubridate)
# All asset classes for day starting 6 May 2015
get_bsdr_data(ymd(20150506))
# Only IR and FX asset classes
get_bsdr_data(ymd(20150506), c("IR", "FX"))

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.