Closed skiamu closed 4 years ago
Guessing here but is it possible you'd want bdh()
rather than bdp()
?
First of all thank you for you answer.
I tried that as well
library(Rblpapi)
blpConnect()
ticker <- "KORS UN Equity"
ovr <- c(HISTORICAL_ID_TM_RANGE_START_DT='20100105')
w <- bdh(securities = ticker, fields = "HISTORICAL_IDS_TIME_RANGE",
overrides = ovr,
start.date = as.Date("2010-05-05")) # must specify a start.date
> w
[1] date HISTORICAL_IDS_TIME_RANGE
<0 rows> (or 0-length row.names)
The result is always and empty data.frame
Can you try with verbose=TRUE
? That might shed some light
Here's the code and the result
library(Rblpapi)
blpConnect()
ticker <- "KORS UN Equity"
ovr <- c(HISTORICAL_ID_TM_RANGE_START_DT='20100105')
w <- bdh(securities = ticker, fields = "HISTORICAL_IDS_TIME_RANGE",
overrides = ovr,
start.date = as.Date("2010-05-05"),
verbose = TRUE)
HistoricalDataResponse = {
securityData = {
security = "KORS UN Equity"
eidData[] = {
}
sequenceNumber = 0
fieldExceptions[] = {
fieldExceptions = {
fieldId = "HISTORICAL_IDS_TIME_RANGE"
errorInfo = {
source = "3890::bbdbh1"
code = 1
category = "BAD_FLD"
message = "Not valid historical field"
subcategory = "NOT_APPLICABLE_TO_HIST_DATA"
}
}
}
fieldData[] = {
}
}
}
The same happens also if I set overrides
to NULL
.
Just to give you some context: if I use bdp
with a similar field (e.g. fields = "HISTORICAL_ID_POINT_TIME"
) it works:
library(Rblpapi)
blpConnect()
ticker <- "KORS UN Equity"
ovr <- c(HISTORICAL_ID_TM_RANGE_START_DT='20100105')
bdp(securities = ticker, fields = "HISTORICAL_ID_POINT_TIME", overrides = ovr)
HISTORICAL_ID_POINT_TIME
KORS UN Equity CPRI US
I want to use HISTORICAL_IDS_TIME_RANGE
because it gives you all the historical evolution and not just the current ticker
Maybe bds
then?
oh yes, that worked! thanks
Great!
Hi, is there a way to make the function
bdp
return bulk data? here's my code:it raises the following error:
Therefore, I tried
but it returns an empty data.frame.
The data i'm expecting is this
Thanks for your help