Constructing quantitative equity portfolios with Bloomberg's Python API
Bloomberg Python API
Bloomberg’s Python API can be used to retrieve Bloomberg pricing and financial data on tens of thousands of equities at once. Quantitative analysts and portfolio managers can use this data, coupled with individual security weights, to construct large quantitative factor based portfolios.
Use of this API requires a Windows PC, a Bloomberg Terminal license and authorization from Bloomberg to bulk download their data. In the associated python script, I provide the API with a list of Bloomberg Ticker IDs and weights from csv files (works just as well with a database). The script downloads the relevant pricing and fundamental datasets and reconstructs the performance of three factor based portfolios: momentum, value and volatility.
Click here to see the repository that includes setup instructions and python script used to create a managed portfolio of factor based stocks.