Bloomberg getdata() issue: Nothing returned

2 views (last 30 days)
ckara
ckara on 8 Feb 2020
Edited: ckara on 8 Feb 2020
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.

Answers (0)

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!