I'm getting an error with history function in Datafeed v4.3 when I try to download multiple securities from Bloomberg

3 views (last 30 days)
Vincent on 4 Feb 2016
I have previously been able to download multiple securities from Bloomberg using this method so something has changed. I'm getting the following error:
Error in blp/history>eventHandler (line 418)
outInd(i) = j(1);
Error in blp/history (line 245)
[d,sec] = eventHandler(b,s,f);
I took a deeper look and traced the problem to lines 333/334 in history():
sec{i} = char(dElement.getElement('security'));
sec{i} = sec{i}(12:end-2);
The first line gets 'security = "DKK Curncy"' while the second line parses this into '"DKK Curncy"' leaving quotations in place. However, later, in line 417 just before the error, it tries to compare strings and comes up empty because it tries to find 'DKK Curncy' without the quotations.
j = find(strcmp(s(i),sec));
And therefore, j is empty and throws an error. Seams like just a parsing issue where parsing out the quotation marks earlier would fix the problem, however, this is not a function I can modify. And since it worked earlier, did Bloomberg and some other function change the way it returns the security name adding quotations? Does later versions of Datafeed fix this problem?

Answers (1)

Subin Kuttappan Stellal Mary
Edited: Subin Kuttappan Stellal Mary on 9 Feb 2016
This error is caused due to a change in the Bloomberg API. You can try replacing the line 334 in history() with the following:
sec{i} = sec{i}(13:end-3);
Also you could consider upgrading MATLAB to version R2015b for resolving this issue.

Community Treasure Hunt

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

Start Hunting!

Translated by