Rblp / Rblpapi

R package interfacing the Bloomberg API from https://www.bloomberglabs.com/api/
Other
166 stars 75 forks source link

Fast bds #298

Closed klin333 closed 4 years ago

klin333 commented 4 years ago

Allows bds to fetch data for more than 1 security at a time. Provides significant speedup compared to user looping over the securities and calling bds each time on one security per call. This speedup can be almost 50x when the number of securities is in the thousands.

It is currently super buggy and causes R to crash sometimes, probably segfaults somewhere. Not surprised given how badly I am using Rcpp - I am as novice as it gets with this. Roughly over 500 securities and 500 bds fields per security, it takes 1.5 hours and crashes R roughly twice, very. The crashes are random as far as I can tell. I also suspect it drops a few results here and there - again not surprised given how badly I am using Rcpp to stitch together request return payloads.

Please assist as even though this pull request is very buggy, but the potential is huge. It reduces the request time from days to hours when requesting bds data over thousands of securities.

Related to https://github.com/Rblp/Rblpapi/issues/151