alpha-xone / xbbg

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

SEDOL and ISIN compatability #55

Closed David-Woroniuk closed 2 years ago

David-Woroniuk commented 2 years ago

Currently, the package doesn't appear to have SEDOL and ISIN compatibility, as the below call returns an empty value:

price = blp.bdp(tickers="B725S29 SEDOL", flds="CRNCY_ADJ_PX_LAST", EQY_FUND_CRNCY="USD")

If the package is compatible with SEDOLs and ISINs, please can you add documentation detailing the correct call. If not, please can we add this compatibility?

alpha-xone commented 2 years ago

The correct format is B725S29 Equity rather than ending with "SEDOL"

David-Woroniuk commented 2 years ago

This appears to work for SEDOLs, but not for ISIN values. I have attached the example of RDSA LN Equity below:

    price = blp.bdp(tickers=["GB00B03MLX29 Equity"], flds="CRNCY_ADJ_PX_LAST", EQY_FUND_CRNCY="USD")
    print(price)

which yields:

Empty DataFrame
Columns: []
Index: []

I noticed that the logic applied within the Excel Add-In is "ABCD SEDOL" and "ABCD ISIN", is this likely to have an impact?

Excel Add In: =BDP(A5&" ISIN", "TICKER_AND_EXCH_CODE") =BDP(A5&" SEDOL", "TICKER_AND_EXCH_CODE")

alpha-xone commented 2 years ago

How about GB00B03MLX29 LN Equity?

Normal ticker and exchange codes are always more preferable and supported by Bloomberg official python API.

David-Woroniuk commented 2 years ago

This works. Thanks for your help. I will submit a PR to add these notations to the documentation, as they don't directly correspond to the Excel Add-In notation.