alpha-xone / xbbg

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

blp.bdh returning different results with and without end_date (Solved) #38

Closed julius-datajunkie closed 3 years ago

julius-datajunkie commented 3 years ago
fut_sym = "HC1 Index"
df_tmp = blp.bdh(fut_sym, "PX_LAST", start_date="2019-01-01", end_date="2019-12-31")
df_tmp.head()

yields

HC1 Index
--

9710.851
9739.567
9909.881
10030.685
10042.567

But when I ran this without the end date

df_tmp = blp.bdh(fut_sym, "PX_LAST", start_date="2019-01-01")
df_tmp.head()

yields

HC1 Index
--

9410.969
9438.798
9603.853
9720.926
9732.441
julius-datajunkie commented 3 years ago

It was a problem with my GFUT roll defaults setting that was messing things up.