Type: | Package |
Title: | Easily Source Publicly Available Data on Derivatives |
Version: | 0.4.0 |
Description: | Post Global Financial Crisis derivatives reforms have lifted the veil off over-the-counter (OTC) derivative markets. Swap Execution Facilities (SEFs) and Swap Data Repositories (SDRs) now publish data on swaps that are traded on or reported to those facilities (respectively). This package provides you the ability to get this data from supported sources. |
License: | GPL-2 |
URL: | https://github.com/imanuelcostigan/dataonderivatives, http://imanuelcostigan.github.io/dataonderivatives/ |
BugReports: | https://github.com/imanuelcostigan/dataonderivatives/issues |
Depends: | R (≥ 4.1.0) |
Imports: | httr2, readr, tibble, vetr |
Suggests: | covr, testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
Config/testthat/parallel: | true |
Encoding: | UTF-8 |
RoxygenNote: | 7.1.2 |
NeedsCompilation: | no |
Packaged: | 2022-01-04 01:29:34 UTC; imanuel |
Author: | Imanuel Costigan [aut, cre] |
Maintainer: | Imanuel Costigan <i.costigan@me.com> |
Repository: | CRAN |
Date/Publication: | 2022-01-04 13:20:02 UTC |
Get Bloomberg SEF data
Description
The Bloomberg Swap Execution Facility (SEF) offers customers the ability to
execute derivative instruments across a number of different asset classes.
It is required to make publicly available price, trading volume and other
trading data. It publishes this data on its website. 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
bsef(start, end = start, asset_class)
Arguments
start |
the date from which data is required as Date or DateTime object. Only the year, month and day elements of the object are used. Must be of length one. |
end |
the date for which data is required as Date or DateTime object.
Only the year, month and day elements of the object are used. Must be of
length one. Defaults to the |
asset_class |
the asset class for which you would like to download
trade data. Valid inputs are |
Value
a tibble containing the requested data, or an empty tibble if data is unavailable
References
Examples
## Not run:
bsef(as.Date("2021-05-12"), as.Date("2021-05-14"), "IR")
## End(Not run)
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
|
asset_class |
the asset class for which you would like to download trade
data. Valid inputs are |
show_col_types |
if |
Value
a tibble containing the requested data, or an empty tibble if data is unavailable
References
Examples
## Not run:
cme(as.Date("2015-05-06"), "CO")
## End(Not run)
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. Column specs are
inferred from all records in the file (i.e. guess_max
is set to Inf
when calling readr::read_csv).
Usage
ddr(date, asset_class, show_col_types = FALSE)
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 |
show_col_types |
if |
Value
a tibble that contains the requested data. If no data exists on that date, an empty tibble is returned.
References
DDR Real Time Dissemination Platform
Examples
## Not run:
ddr(as.Date("2017-05-25"), "IR") # Not empty
ddr(as.Date("2020-12-01"), "CR") # Not empty
## End(Not run)