imanuelcostigan / dataonderivatives Goto Github PK
View Code? Open in Web Editor NEWEasily source publicly available data on derivatives
Home Page: http://imanuelcostigan.github.io/dataonderivatives/
Easily source publicly available data on derivatives
Home Page: http://imanuelcostigan.github.io/dataonderivatives/
Rule of Silence: When a program has nothing surprising to say, it should say nothing.
This isn't really an issue, more of a question. Do you need to dedupe transactions that may be reported to multiple SDRs? Have you given any thought about how to dedupe if so?
Nice work on putting this together. I've been scraping DTCC data and storing them in my own personal S3 on AWS. If you need an extract or something let me know. Thanks
> str(get_bsef_eod_data('ir', today() - days(1)))
'data.frame': 66 obs. of 12 variables:
$ tradeDate : chr "2014-09-18T00:00:00.000+00:00" "2014-09-18T00:00:00.000+00:00" "2014-09-18T00:00:00.000+00:00" "2014-09-18T00:00:00.000+00:00" ...
$ security : chr "CHF SWAP VS 6M 10YR" "EUR SWAP VS 3M 30YR" "EUR SWAP VS 3M 15YR" "EUR SWAP VS 6M 9YR" ...
$ priceOpen : chr "0.8774999999999999" "1.9925" "1.628" "1.139" ...
$ priceHigh : chr "0.8774999999999999" "1.9925" "1.628" "1.139" ...
$ priceLow : chr "0.8774999999999999" "1.9925" "1.628" "1.139" ...
$ priceClose : chr "0.8774999999999999" "1.9925" "1.628" "1.139" ...
$ settlementPrice : chr "0.8774999999999999" "1.9925" "1.628" "1.139" ...
$ totalVolume : chr "20000000" "180000" "300000" "500000" ...
$ blockTradeVolume : chr "0" "0" "0" "0" ...
$ totalVolumeUsd : chr "21326500" "232056" "386730" "644600" ...
$ blockTradeVolumeUsd: chr "0" "0" "0" "0" ...
$ currency : chr "CHF" "EUR" "EUR" "EUR" ...
Will allow things like method dispatch and enforce constructor to check that data sets have the right sort of field names and types.
Hi,
I am new to R. This is my first use of a package so it is possible I am missing something very basic.
Note that I am trying to get transaction level data.
1)When I try to get Bloomberg SDR data, I get the following error:
df1 <- get_bsdr_data(lubridate::ymd(20170109), "CR", 0)
Error: lexical error: invalid char in json text.
request validation fail
(right here) ------^
2)When I try to get DTCC SDR data,, I get the following error:
df1 <- get_ddr_data(lubridate::ymd(20170109), "CR", 0)
Error in return(readr::read_csv(ddrfile[1]), col_types = NULL) :
multi-argument returns are not permitted
In addition: Warning message:
url_ok(x)
is deprecated; please useidentical(status_code(x), 200L)
instead.
Can you please help me understand the issue here? Your help will be greatly appreciated!
Thanks!
Doesn't seem to have data access
See ticker.js
Payload seems to trip server side validation tests and returns http status code 500
Location. Seems to require login
The FTP site that contains the CME trade files uses inconsistent file name patterns. More recently files tend to end with .csv.zip
.However, files from further back (and occasionally more recently) don't have the .csv
pattern in the file name.
The URL scheme has changed
When trying to access BloombergSDR data, the following fails:
bsdr(lubridate::ymd(20150504), "IR")
#> Error in curl::curl_fetch_memory(url, handle = handle) :
#> Proxy CONNECT aborted
#> Run `rlang::last_error()` to see where the error occurred.
This will allow getter to be called in loop with result DFs being bound like this:
df <- NULL
for (date in dates) {
df <- bind_rows(df, get_ddr_data(date))
}
bind_row(NULL, df)
returns NULL
where df
is NULL
and df
otherwise.
Existing functionality implemented as part of #7 may only grab trade data for transactions captured under US regs.
Example of different headers on the same date
# ICAP US 31/7/2014
head -n 1 /var/folders/9f/kz67r0rn3qb9tx_rmgbps94r0000gq/T//Rtmp7b11UG/icus/*20140731*
BATCHDATE,TRADEINSTRID,ASSETCLASS,Trade Volume (USD),Trade Volume (Local Currency),OPENPRICE,HIGHPRICE,LOWPRICE,CLOSEPRICE
# IGDL 31/7/2014
head -n 1 /var/folders/9f/kz67r0rn3qb9tx_rmgbps94r0000gq/T//Rtmp7b11UG/igdl/*20140731*
BACTHDATE,TRADEINSTRID,ASSET CLASS,TRADEVOLUME USD,TRADEVOLUME,OPENPRICE,HIGHPRICE,LOWPRICE,CLOSEPRICE
Example of different headers for the same file but on different dates:
head -n 1 /var/folders/9f/kz67r0rn3qb9tx_rmgbps94r0000gq/T//Rtmp7b11UG/igdl/*20140630*
BATCHDATE,TRADEINSTRID,ASSETCLASS,Trade Volume (Local Currency),Trade Volume (Local Currency),OPENPRICE,HIGHPRICE,LOWPRICE,CLOSEPRICE
head -n 1 /var/folders/9f/kz67r0rn3qb9tx_rmgbps94r0000gq/T//Rtmp7b11UG/igdl/*20140701*
BATCHDATE,TRADEINSTRID,ASSETCLASS,Trade Volume (USD),Trade Volume (Local Currency),OPENPRICE,HIGHPRICE,LOWPRICE,CLOSEPRICE
We see the following:
ddr(lubridate::ymd(20201130), "IR")
#> # A tibble: 0 x 0
I.e. don't do this:
df %>%
dplyr::mutate(date = lubridate::ymd_hms(tradeDate),
assetclass = factor(assetclass))
Use mutate_
instead. Means I don't need to declare global variables.
Don't need to copy download function from packrat: https://github.com/wch/downloader
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.