Fri, 14 Aug 2015

Rblpapi: Connecting R to Bloomberg

big deal

Whit, John and I are thrilled to announce Rblapi, a new CRAN package which connects R to the Bloomberg backends.

Rebuilt from scratch using only the Bloomberg C++ API and the Rcpp and BH packages, it offers efficient and direct access from R to a truly vast number of financial data series, pricing tools and more. The package has been tested on Windows, OS X and Linux. As is standard for CRAN packages, binaries for Windows and OS X are provided (or will be once the builders caught up). Needless to say, a working Bloomberg installation is required to use the package.

Please see the Rblapi package page for more details, including a large part of the introductory vignette document. As a teaser, here are just three of the core functions:

## Bloomberg Data Point Query
bdp(c("ESA Index", "SPY US Equity"), c("PX_LAST", "VOLUME"))

## Bloomberg Data Set Query

## Bloomberg Data History Query
bdh("SPY US Equity", c("PX_LAST", "VOLUME"),

## Get OHLCV bars (by default hourly and just six of them)
getBars("ES1 Index")

## Get Tick Data (by default last hour)
getTicks("ES1 Index")

Source code for the package is at the Rblpapi GitHub repo where issue tickets can be filed as well. The sibbling blp GitHub repo contains the Bloomberg code required to build and link the package (which is automated during the build of the CRAN package). Last but not least the Rblpapi package page has more details about the package.

This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

/code/rblpapi | permanent link