Why am I not able to access Bloomberg trade data outside of market hours using Datafeed Toolbox 3.2 (R2008b)?

3 次查看(过去 30 天)
I am not able to access trade data using the following code outside of market hours. I am using the following code for this
 
c=bloomberg;
a = fetch(c,'C Equity','TIMESERIES',{'05/20/2011 04:00','05/20/2011 09:30'});
However, I am able to access the BID and ASK data without any issues. I faced a similar issue with Excel, but found a workaround for it by using the following BDH code
 
BDH("SPY US EQUITY","BID, TRADE, ASK","5/20/2011 9:00:00 AM","5/20/2011 9:29:59 AM","Dir=V","Dts=S","Sort=A","IntrRw=True","CondCodes=S","QRM=S","ExchCode=H","BrkrCodes=H","RPSCodes=H","BICMICCodes=H","Type=S","Price=S","Size=S")
"CondCodes=S"and "QRM=S" are the condition code used to display all the trades pre and post market.
When I Used, "CondCodes=H"and "QRM=H" I saw the same issue as with MATLAB.

采纳的回答

MathWorks Support Team
The old Bloomberg V2 API which MATLAB supports with the BLOOMBERG constructor and FETCH method, it does not support the ConditionCodes or QRM flags (or any of these flags for that matter). To get this functionality, you need to move to the new BLP constructor and TIMESERIES method that use the Bloomberg V3 API.
The syntax is
 
c = blp;
d = timeseries(c,'SPY US Equity',{'05/20/2011 09:29:57','05/20/2011 09:29:59'},[],{'BID','ASK','TRADE'},{'includeConditionCodes','includeNonPlottableEvents'},{true,true});
The includeNonPlottableEvents is the equivalent of QRM=S used in the BDH code for MS Excel.
The "includeConditionCodes" command will return a comma delimited list of exchange information. 
For more information on the support for Bloomberg V3 API see Datafeed Toolbox Version 3.5 (R2010a) release notes below:

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Bloomberg Desktop 的更多信息

标签

产品


版本

R2008b

Community Treasure Hunt

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

Start Hunting!

Translated by