Bloomberg getdata() issue: Nothing returned
2 views (last 30 days)
Show older comments
I used the following code to request some historical and current data from Bloomberg:
c = blp
startdate = '01/01/1950';
enddate = '12/31/2020';
c.DataReturnFormat = 'table';
c.DatetimeType = 'datetime';
[k, d] = history(c, 'AAPL US Equity', 'PX_LAST', startdate,enddate, [], [])
[g,sec] = getdata(c, 'MSFT US Equity', {'LAST_PRICE';'OPEN'} )
I had two issues. I am writing both here as they might be related.
(1) I had to run the history() function twice to get a result, as the first time it returned an error (‘Error using blp/history>eventHandler (line 467) No securities specified [nid:128]’).
(2) I did not manage to retrieve any data using the getdata() function. (please see attached screenshot). You can see (in the top right corner) that there is no output in neither ‘g’ nor ‘sec’.
Any help with these issues would be highly appreciated.

0 Comments
Answers (0)
See Also
Categories
Find more on Bloomberg Desktop in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!