Using Bloomberg Query Language (BQL) in Excel
Overview
Bloomberg Query Language (BQL) allows you to pull, filter, and analyze Bloomberg data directly in Excel. It runs your requests on Bloomberg’s servers, reducing data load and providing structured outputs.
Step 1: Open Excel and Bloomberg
Ensure both Excel and the Bloomberg Terminal are open and signed in before starting.
Step 2: Access BQL Tools
-
In Excel, select the Bloomberg tab on the ribbon.
-
Click BQL Builder.
-
The BQL Builder window will open for query setup.
Step 3: Build a Query Using the BQL Builder
-
In Universe, enter the security or dataset you want to analyze (for example, AAPL US Equity).
-
Under Fields, select the metrics or data points to retrieve (for example, px_last, volume, or yield).
-
Use Filters to refine results, such as by date range, bond type, or rating.
-
Under Options, specify date parameters or fill methods (e.g., range(-1y,0d) or fill='prev').
-
When finished, click Insert into Worksheet.
-
The query will appear as a formula in Excel and populate data automatically.
Step 4: Using Manual BQL Formulas
You can also enter BQL queries directly in a cell without using the Builder.
Example Formula:
=BQL("get(px_last) for('AAPL US Equity') with(dates=range(-1y,0d), fill='prev')")
Formula Structure:
get(<field>) for(<security>) with(<parameters>)
Common Parameters:
Step 5: Refreshing Data
-
To update your data, go to the Bloomberg tab.
-
Click Refresh Worksheet or Refresh Selected Cells.
-
Allow several seconds for Bloomberg to process and update results.