How do I retrieve historic, intraday values for specific prices from Bloomberg using datafeed?
4 次查看(过去 30 天)
显示 更早的评论
I would like to use the Datafeed toolbox to retrieve historic, intraday prices from Bloomberg. However, I would also like to get certain prices, such as 'Bid' and 'Ask' as well as 'Trade' prices.
采纳的回答
MathWorks Support Team
2009-6-27
For raw intraday tick requests, all ticks are returned and the user will need to filter out the ticks they want.
For example,
D = fetch(c,'ABC US Equity','TIMESERIES','12/10/2008','12/15/2008');
I = (D(:,1) == 1 | D(:,1) == 31 | D(:,1) == 32);
D(~I,:) = [];
This will filter out any ticks that are not Trade, Bid Best, or Ask Best. The command
x = dftool('ticktypes')
returns the list of tick types that can be converted to numeric tick type values with, for example,
find(strcmp('Trade',x))
Trade == 1, Bid Best == 31 and Ask Best == 32.
The intraday tick fields are different from the current and historical data fields. This is the way Bloomberg maps them.
Also,
The best way to request a range is to include the timestamps in the dates, for example.
D = fetch(c,'SPX Index','TIMESERIES',{'12/05/2008 00:00:00','01/05/2009 23:59:59'});
The second column is the date/timestamp. The user should use the entire date/timestamp input form to get the right output date/times.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Price and Analyze Financial Instruments 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!