Learn R Programming

dataonderivatives (version 0.2.1)

get_ddr_data: Get DDR data

Description

The DTCC Data Repository is a registered U.S. swap data repository that allows market participants to fulfil their public disclosure obligations under U.S. legislation. This function will give you the ability to download trade-level data that is reported by market participants. The field names are (and is assumed to be) the same for each asset class.

Usage

get_ddr_data(date, asset_class = NULL, curate = TRUE)

Arguments

date
the date for which data is required as Date or DateTime object. Only the year, month and day elements of the object are used and it must of be length one.
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 reviews at the time the formatting was coded.

Value

a tbl_df that contains the requested data. If no data exists on that date, an empty data frame (zero columns and rows) is returned.

References

https://rtdata.dtcc.com/gtr/

Examples

Run this code
## Not run: ------------------------------------
# library("lubridate")
# get_ddr_data(ymd(20140430), "IR")
## ---------------------------------------------

Run the code above in your browser using DataLab