Error in bdh_Impl(con, securities, fields, start.date, end.date, options, : Choice sub-element not found for name 'securityData'.
connector<-blpConnect() bdh("AAPL US EQUITY", start.date = Sys.Date() - 365, end.date = Sys.Date(), fields = "RK003", con = connector)
I simply called the code above but get this type of error. What does that mean?
No idea what is RK003 supposed to be.
R> bdh("AAPL US Equity", fields="PX_LAST", start.date=Sys.Date()-7, end.date=Sys.Date()-1)
date PX_LAST
1 2017-10-03 154.48
2 2017-10-04 153.48
3 2017-10-05 155.39
4 2017-10-06 155.30
5 2017-10-09 155.84
R>
bdh() works fine for me.
@Derek-Ych-Qi your code works as-is for me:
> connector<-blpConnect()
> bdh("AAPL US EQUITY", start.date = Sys.Date() - 365, end.date = Sys.Date(), fields = "RK003", con = connector)
date RK003
1 2016-10-11 22.796
2 2016-10-12 22.832
...
252 2017-10-10 19.575
I suggest you ask BBG about your data permissions. Also why not use the more descriptive field name, which is VOLATILITY_60D? You will get the same results.
> connector<-blpConnect()
> d<-bdh("AAPL US EQUITY", start.date = Sys.Date() - 365, end.date = Sys.Date(), fields = "RK003", con = connector)
> d1<-bdh("AAPL US EQUITY", start.date = Sys.Date() - 365, end.date = Sys.Date(), fields = "VOLATILITY_60D", con = connector)
> identical(d$RK003,d1$VOLATILITY_60D)
[1] TRUE
Hello @eddelbuettel I have ran into the same problem as mentioned in the topic of this post. I have done some looking into the topic and I saw you commented on another post that there could be settings in the terminal itself causing issues. Any chance you could elaborate further on this?
Best, Paul
Can you see the data in your terminal? If not check your data permissions. Also try an alternative field name for this as I mentioned above.
BABA <- bdh(securities = 'BABA US EQUITY','PX_LAST',start.date = as.Date('2019-01-01'),overrides = c('FX'='CNY'))
it raised the same error when I run the above code.
Try turning verbose=TRUE to see more. In most cases it means that if some data came back in came in a form that upset our parsing.
Thanks Dirk, also thanks for making the package. Really appreciated.
On Wed, Feb 27, 2019 at 6:26 AM Dirk Eddelbuettel [email protected] wrote:
Try turning verbose=TRUE to see more. In most cases it means that if some data came back in came in a form that upset our parsing.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Rblp/Rblpapi/issues/246#issuecomment-467826454, or mute the thread https://github.com/notifications/unsubscribe-auth/AHbOArU-BP_J89N9AkTR3SeQ9JPKzlsJks5vRmtRgaJpZM4P0UC4 .
Thanks @eddelbuettel , by running BABA <- bdh(securities = 'BABA US EQUITY','PX_LAST',start.date = as.Date('2019-01-01'),overrides = c('currency'='CNY')), I get the right result.
Same problem with economic indicators. They are not returned, and setting verbose = TRUE doesn’t give details about what could be overwritten:
bdh("ROGDESD Index", "PX_LAST", start.date="2020-01-01", verbose = TRUE)
gives the error mentioned above. I hoped the code in Python will show me details but, alas, it works:
blp.bdh(tickers='ROGDESD Index', flds=['PX_LAST', 'last_price'],start_date='2020-01-01', )
returns both (identical) values: 'PX_LAST' and 'last_price'. Any help is appreciated! thanks @eddelbuettel !
You can get this message from bdh() if you've breached a request limit. The terminal condition becomes apparent if you try to use getBars() instead of bdh(), you'll then get a proper request limit error message.