使用 Bloomberg Java API 获取随日期和时间变化的 VWAP 交易量
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12265504/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Getting VWAP volume over date and time using Bloomberg Java API
提问by Marianna
I am trying to use the open Bloomberg API to gather the VWAP volume on a specific date for a specific time range. For example, how can I get the VWAP_VOLUME between 11AM and 11:15AM on August 27th?
我正在尝试使用开放的彭博 API 来收集特定日期特定时间范围内的 VWAP 交易量。例如,如何在 8 月 27 日上午 11 点到上午 11:15 之间获取 VWAP_VOLUME?
Using Excel, I can use
使用 Excel,我可以使用
BDP("MSFT US Equity", "VWAP_VOLUME", "VWAP_START_TIME=11:00:00", "VWAP_END_TIME=11:15:00", "VWAP_START_DT=20120827", "VWAP_END_DT=20120827")
BDP("MSFT US Equity", "VWAP_VOLUME", "VWAP_START_TIME=11:00:00", "VWAP_END_TIME=11:15:00", "VWAP_START_DT=20120827", "VWAP_END_DT=20120827")
Since I can do it in Excel, it stands to reason that I should be able to do the same thing in Java. I've tried using a ReferenceDataRequest with overrides for the date and time fields. I also tried using a HistoricalDataRequest with the overrides set on the time fields. Neither returns with any data. How can I do this?
因为我可以在 Excel 中完成,所以我应该能够在 Java 中完成同样的事情。我尝试使用 ReferenceDataRequest 覆盖日期和时间字段。我还尝试使用在时间字段上设置覆盖的历史数据请求。两者都不返回任何数据。我怎样才能做到这一点?
采纳答案by assylias
What timezone are you in? I'm in the UK and it works for me if I use 15:00 as a starting time and 15:15 as an end time (I get 0 with your parameters), with the following elements, using a "ReferenceDataRequest":
你在哪个时区?我在英国,如果我使用 15:00 作为开始时间和 15:15 作为结束时间(我用你的参数得到 0),使用以下元素,使用“ReferenceDataRequest”,它对我有用:
- securities: MSFT US Equity
- fields: VWAP_VOLUME
- overrides:
- fieldId=VWAP_START_TIME: value=15:00:00
- fieldId=VWAP_END_TIME: value=15:15:00
- fieldId=VWAP_START_DT: value=20120827
- fieldId=VWAP_END_DT: value=20120827
- 证券:MSFT US Equity
- 字段:VWAP_VOLUME
- 覆盖:
- fieldId=VWAP_START_TIME:值=15:00:00
- fieldId=VWAP_END_TIME:值=15:15:00
- fieldId=VWAP_START_DT:值=20120827
- fieldId=VWAP_END_DT:值=20120827