I am using python to access the Bloomberg Desktop API and am running into issues with the timezone conversion for their tick data.
The data they deliver is supposed to be UTC but there is something strange going on where some data seems to be offset by a day. See the below conversation for details-- I have tried this but it doesnt seem to be working. I haven't been able to find a pattern in the offset so far:
Hi *******,
So the offset comes in either positive or negative depending on whether or not GMT is ahead or behind the exchange time zone. So in that sense, I would always grab the hour from the API, sum that with the offset, if we're > 24 hours then add a day and modulo 24 - else if we're < 24 hours, I would take that negative number and add it to 24, and subtract a day.
Something along those lines should do the trick here.
Please reach out with H#******* with any questions - take care,
Bloomberg Help
For further help: Press the key twice. Reference H#******* to continue this inquiry.
*******@bloomberg.net
Your question was: Re:H#****** Adjusting GMT to local exchange time
How about this:
Take GMT timestamp returned by API, take the hour, subtract the offset....if the result is less than 0, need to adjust the date forward by one after converting to EST? Does that sound right?
From: HELP DESK (BLOOMBERG) At: May 11 2015 11:21:18 Subject: Re:H#******** Adjusting GMT to local exchange time
Hi *******,
Following up on our conversation from Friday. Ultimately what we'll need to do is pull in the offset with the TIME_ZONE_NUM field, and add some logic to your code to adjust for the fact that we may go over 24 hours here.
One way to do that would be by taking the GMT + offset modulo 24 to get the hour on the next day - then incorporate the fact that we will need to adjust the day forward as well.
Please reach out with h#******** with any further questions here.
Have a good one,
Bloomberg Help
For further help: Press the key twice. Reference H#******** to continue this inquiry.
Your question was: I am getting API TickData for 8035 JP Equity....something seems be wierd with the timezone conversion. For example...I am looking at a trade in my Terminal at 23:00:07 on 01/08/15 [600 shares @ 8670] EST....when I pull the same trade through teh IntraDayTick API function the trade is reported as 04:00:07 on 01/08/15 (THIS IS UTC/GMT). However converting this to EST would be 23:00:07 on 01/07/15, not 01/08/15....what is going on?
Wondering if anyone has had a similar issue / has solved this? Seems strange to me that this is not clear.
UPDATE:
Here is the full example of the problem:
In the Terminal:
8035 JP Equity QR:
FROM: 23:00:07 01/08/2015
TO: 23:00:07 01/08/2015
Returns Trade:
Time: 23:00:07, Size: 600, Price: 8670
The Date/Time here is EST 23:00:07 01/08/2015
The same trade via API IntradayTickRequest
:
tickData = {TIME = 2015-01-08T04:00:07.000
TYPE = TRADE
VALUE = 8670.000000
SIZE = 600}
The Date/Time here is UTC 04:00:07 01/08/2015
, which converted (using http://www.timezoneconverter.com/) is ETC 23:00:07 01/07/2015
So the Terminal and API are reporting different days for certain trades, I am looking for some sort of rule to standardize the data.