-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Too many fields problem #235
Comments
The code you pasted doesn't quite run as is. But it's close enough that I was able to reproduce the bug.
So it is the case that the |
Update: this appears to be an issue with the response we are getting from Bloomberg. I wrote 2 R scripts that differ only by a single day in the start date:
I run them and compare results via verbose printing of the BB responses:
For one script (later date) we get thousands of data points for this field, while for the other we get none. Which explains why that field is blank in our response. This will have to be a question for the helpdesk. They don't support R so I'll have to code it up in C++ for them. |
When downloading more then 12 fields at once for one ticker with bdh, always the second, thrid and fourth field will not retrieve any data, no matter which fields they are (get NA values). The problem is linked with setting an appropriate start date: if the start date is close to today it works, if it lies in the very past it doesn't. Is there a download limitation or something?
Example code: (returns NA in second, third and fourth column):
ticker="MXUS INDEX"
fields=c("PX_LAST","PX_TO_CASH_FLOW","GROSS_AGGTE_DVD_YLD","PROF_MARGIN", "RETURN_ON_ASSET","BEST_PE_RATIO","INDX_GENERAL_EARN","INDX_GENERAL_EST_EARN", "IDX_EST_EARNINGS_NXT_YR GEN_EST_EARNINGS_FY3_AGGTE", "PCT_MEMB_ABOVE_MOV_AVG_200D", "NUM_DAILY_ADV_MINUS_DECL", COUNT_INDEX_MEMBERS","TOT_RETURN_INDEX_NET_DVDS","PE_RATIO PX_TO_BOOK_RATIO","PX_TO_EBITDA","PX_TO_SALES_RATIO","MOV_AVG_50D", "MOV_AVG_200D"
)
bdh(ticker, fields, start.date=as.Date("1970-01-01"),...)
The text was updated successfully, but these errors were encountered: