Learn R Programming

dataonderivatives (version 0.4.0)

cme: Get CME SDR data

Description

The CME Swap Data Repository (SDR) is a registered U.S. swap data repository that allows market participants to fulfil their public disclosure obligations under U.S. legislation. CME is required to make publicly available price, trading volume and other trading data. It publishes this data on an FTP site. Column specs are inferred from all records in the file (i.e. guess_max is set to Inf when calling readr::read_csv).

Usage

cme(date, asset_class, show_col_types = FALSE)

Arguments

date

the date for which data is required as Date or DateTime object. It will only use the year, month and day elements 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 "IR" (rates), "FX" (foreign exchange), "CO" (commodities). This must be a string.

show_col_types

if FALSE (default), do not show the guessed column types. If TRUE always show the column types, even if they are supplied. If NULL only show the column types if they are not explicitly supplied by the col_types argument.

Value

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

References

CME SDR

Examples

Run this code
# NOT RUN {
cme(as.Date("2015-05-06"), "CO")
# }

Run the code above in your browser using DataLab