Getting VWAP volume over date and time using Bloomberg Java API

Marianna picture Marianna · Sep 4, 2012 · Viewed 13.5k times · Source

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?

Using Excel, I can use

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?

Answer

assylias picture assylias · Sep 4, 2012

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":

  • 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