Rblp / Rblpapi

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

Error downloading data #310

Closed alexandrsanches closed 4 years ago

alexandrsanches commented 4 years ago

I was trying to download daily data from a few tickers from Bloomberg with Rblpapi. I wanted all calendar data, not just trading days, but, when I put these options, my data return with a lot of NA.

Code used:

options <- c("periodicitySelection" = "DAILY", 
             "nonTradingDayFillOption" = "NON_TRADING_WEEKDAYS", 
             "nonTradingDayFillMethod" = "NIL_VALUE")

data <- bdh("BCSWFPD BGN Curncy", c("PX_LAST"), start.date = ymd("2000-01-01"), options = options)

If I remove the options and leave only the periodicitySelection, it works fine. I'm using R 3.6.2 with Windows 10.

johnlaing commented 4 years ago

I don't understand what the problem is. If you ask for all days, including non-trading days, you should expect to get NA values back for those days. Can you be more specific about which aspect of this behavior you think is an error?

alexandrsanches commented 4 years ago

I'm sorry, I realize that I made a mistake.