/Rblpapi

an api to fetch data from a certain vendor which has a habit of asking for its name to be redacted

Primary LanguageC++

Rblpapi Build Status License

R Access to Bloomberg API

Background

Rblpapi provides R with API access to data and calculations from Bloomberg Finance L.P.

Requirements

A valid and working Bloomberg installation, and the Bloomberg API libraries.

Examples

Here are a few simple examples.

library(Rblpapi)
con <- blpConnect()

spx <- bdh(con,securities="SPX Index", fields="PX_LAST", start.date="20130301")
spx.ndx <- bdh(conn,securities=c("SPX Index","NDX Index"), fields="PX_LAST",
               start.date="20130301", include.non.trading.days=TRUE)

monthly.options <- structure(c("ACTUAL", "MONTHLY"),
                             names=c("periodicityAdjustment","periodicitySelection"))
spx.ndx.monthly <- bdh(con,securities=c("SPX Index","NDX Index"), fields="PX_LAST",
                       start.date="20120101", options=monthly.options))

goog.ge.div <- bdh(con, securities=c("GOOG Equity","GE Equity"),
                   fields=c("PX_LAST","CF_DVD_PAID"), start.date="20121101")
goog.ge.px <- bdp(con, securities=c("GOOG Equity","GE Equity"),
                  fields=c("PX_LAST","DS002")

Status

Fully functional on Linux.

Authors

Whit Armstrong, Dirk Eddelbuettel and John Laing

License

GPL-3