Introducing xbbg
— probably the most intuitive python package for Bloomberg:
This article shows how to install the package on Windows. More examples and advanced usages will be covered later.
Step 1: Bloomberg API Library
Go to Bloomberg API Library and download C++ Supported / Experimental Release for Windows.
Copy two DLL files under thebin
folder: blpapi3_32.dll
and blpapi_64.dll
into your Bloomberg data API path — by default, this path is C:\blp\DAPI
.
Step 2: Install relevant python packages:
Run the following command in your Command Prompt:
pip install blpapi --index-url=https://bcms.bloomberg.com/pip/simple/
pip install xbbg
Step 3: Add the DLL path (for python 3.8 only)
For python 3.8, if your Bloomberg data API path is different from C:\blp\DAPI
, you need to add path variableBBG_DLL
to your system:
Step 4: Try it out
Open any python runtime or Jupyter notebook, or even Google colab (but with local runtimes only) and try it out:
Title graph credits: Shiba