Assume I want to get the US Nonfarm Payrolls (BBG Ticker: NFP TCH Index) data for 2023 from Bloomberg using the tia package. I'm interested in fetching the Date of announcement, the time (in UK timezone) and the survey median value. This is how the last 3 rows looks on the ECO page (Note the 12:30 UK time in November is different to the usual 13:30 time of other months):
| Date | Time | Median |
|---|---|---|
| 10/06 | 13:30 | XXX |
| 11/03 | 12:30 | YYY |
| 12/08 | 13:30 | ZZZ |
What I did so far is (using Python 2.7 version for compatibility with tia package):
import pandas as pd
import tia.bbg.datamgr as dm
mgr = dm.BbgDataManager()
ticker = "NFP TCH Index"
sid = mgr[ticker]
df = sid.get_historical(["BN_SURVEY_MEDIAN"], start="1/1/2023", end="12/31/2023", DT631="1")
Note: the override field DT631 set to 1 is used so that the dates are returned as the actual announcement dates, and not the end-of-month dates.
What my returned dataframe looks like is as follows:
| Date | Median |
|---|---|
| 2023-10-06 00:00:00 | XXX |
| 2023-11-03 00:00:00 | YYY |
| 2023-12-08 00:00:00 | ZZZ |
The dates match, the median values match, but the time returned shows as 00:00:00 for all entries, instead of 13:30 or 12:30.
Is there a way to modify my code to get the announcement time too (e.g. 13:30, 12:30 and 13:30 for the last 3 rows respectively)?