Why am I not able to access Bloomberg trade data outside of market hours using Datafeed Toolbox 3.2 (R2008b)?
3 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2011-12-16
编辑: MathWorks Support Team
2017-1-25
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
2017-1-25
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Bloomberg Desktop 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!