Datafeed Toolbox: Retrieving tick data for a specific time range from Bloomberg

Hi all,
I am trying to retrieve tick data for a specific ticker for a specific time range from Bloomberg. In the documentation for the 'timeseries' function I found an example:
However, when running the sample code, also by opening the example itself in MATLAB using the command
openExample('datafeed/RetrieveTimeSeriesTickDataForDateTimeRangeWithFieldExample')
I get the following error:
Error using blp/timeseries (line 463)
Java exception occurred:
java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
at java.util.Vector.elementAt(Unknown Source)
Error in deleteme (line 9)
d = timeseries(c,s,{startdate:enddate,starttime,endtime},interval,field);
Is anyone familiar with this error and a possible fix? Or is there a workaround available?
Thanks in advance for your response(s)!

1 Commento

You should be able to get the desired data without any error when using the following command:
d = timeseries(c,s,{datetime("11/13/2018 01:01:00","InputFormat","MM/dd/yyyy HH:mm:SS") datetime("11/13/2018 23:59:59","InputFormat","MM/dd/yyyy HH:mm:SS")},interval,field)
Please note that the 4 input syntax is only used when the user wants to get data for a range of data for the same block of times over a range of days.
As for your case, you are making a request for a contiguous data request which only needs two date inputs.

Accedi per commentare.

Risposte (0)

Prodotti

Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by