alpha-xone / xbbg

An intuitive Bloomberg API
https://xbbg.readthedocs.io/
Apache License 2.0
249 stars 52 forks source link

A50 Future trading in Singapore exchange day session is not returning anything #33

Closed julius-datajunkie closed 3 years ago

julius-datajunkie commented 3 years ago

Hi, Thanks for your effort in maintaining this great library. When I was trying to do some intraday analysis for the A50 Future (XU1 Index). I am retriving data in the following way:

blp.bdib("XU1 Index", dt="2021-03-24", session="day", ref="FuturesSingapore")

Where the day session trading hour is supposed to be between 9am-16:35pm as it's defined in exch.yml.

FuturesSingapore:
  tz: Asia/Singapore
  allday: [1700, 445]
  day: [900, 1635]
  night: [1700, 445]

Nothing is returned, however, for the day session. Even when I set the session to be 'allday', it only returns the night session starting from 1700.

Thanks!

alpha-xone commented 3 years ago

By default, intraday data is getting hours between allday and trim the day session afterward.

Need to change exchange info to below:

FuturesSingapore:
  tz: Asia/Singapore
  allday: [1700, 1635]
  day: [900, 1635]
  night: [1700, 445]

Will update this in the next alpha version.

alpha-xone commented 3 years ago

To reload data, you can do:

blp.bdib("XU1 Index", dt="2021-03-24", session="day", cache=False)
alpha-xone commented 3 years ago

fixed in 0.7.6a6

julius-datajunkie commented 3 years ago

Perfect! Thanks for the prompt response. Appreciate it!