cme: Get CME SDR data

Description Usage Arguments Value References Examples

View source: R/cme.R

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.

Usage

1
2
3
cme(date, asset_class, field_specs = NULL)

cme_field_specs(asset_class)

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.

field_specs

a valid column specification that is passed to readr::read_csv() with a default value provided by cme_field_specs(). Note that you will likely need to set your own spec as the CME file formats have changed over time.

Value

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

References

CME SDR

Examples

1
2
3
4
5
## Not run: 
library(lubridate)
cme(ymd(20150506), "CO")

## End(Not run)

imanuelcostigan/dataonderivatives documentation built on Feb. 14, 2018, 9:20 a.m.