alpha-xone / xbbg

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

bds produce duplicated results #29

Closed anxl2008 closed 3 years ago

anxl2008 commented 3 years ago

Sample call: 'blp.bds(['AAPL US Equity', 'IBM US Equity', 'T US Equity', 'F US Equity'], flds = ['EQY_DVD_ADJUST_FACT'])'

This will produce duplicated output for same ticker. This bug can be fixed by altering blp.bds() and blp._bds_().

In bds(): request was created and passed to map(part, tickers). The map function will keep appending to request until all tickers are iterated.

As a consequence, in _bds_():

This can be fixed by moving process.createrequest() call from bds() to inside the _bds\() function.

alpha-xone commented 3 years ago

Great advice. Should be good in 0.7.6a3.