alpha-xone / xbbg

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

blp.bds is doing a weird rounding #5

Closed laygr closed 4 years ago

laygr commented 5 years ago

If you try this: blp.bds('ADP CHNG Index', "ECO_RELEASE_DT_LIST")

You will get some weird values that don't match what is showed in bloomberg's terminal.

The library pdblp seems to get right; the output of the next code matches bloomberg's terminal: con.bulkref('ADP CHNG Index', 'ECO_RELEASE_DT_LIST')

The output should be a list of dates. The output of xbbg will contain '20180132', while the correct value is '20180131' as showed in bloomberg's terminal and by the pdblp library.

I was using xbbg v0.1.24; when I encountered this error I upgraded to v0.3.0 but the error persists.

alpha-xone commented 5 years ago

This issue comes pandas.

A quick fix would be removing downcast kwarg at line 229 in file assist.py:

.apply(pd.to_numeric, errors='ignore')