Skip to content
All library documents

Adding Fields and Filters to Bloomberg BQL Queries

Article Quant Q&A · Author: gbattis

Summary

The document asks how to expand a Bloomberg Query Language request that currently retrieves company names for members of an index. The intended additions include company attributes and financial measures such as sector, industry, total assets, and earnings per share.

The reply suggests that a query can request multiple expressions in its data selection and can also include a filter over index members. Its sample illustrates combining a sector condition with several requested fields, including a price-to-volume expression and exchange code. The example demonstrates the general structure rather than supplying a verified query for the requested financial metrics, and its sample sector value is explicitly illustrative. Users would need to consult Bloomberg’s field and function definitions to identify the appropriate names and syntax for each desired data item.

Key ideas

  • BQL can request multiple data expressions for securities selected from an index.
  • A filter can restrict index constituents based on a company attribute such as sector.
  • The reply illustrates requesting calculated values and reference fields in one query.
  • The sample is illustrative and does not establish the exact field names for assets or earnings per share.

Tags

Full text
# BQL Question [New to BQL and programming in general]


# BQL Question [New to BQL and programming in general]












I have this BQL query to grab a list of Russell 3000 members and get the firm names. Is there any way I can grab other data with the company names such as industry/sector name, total assets, EPS, etc...? If so what is the structure/syntax to do that? I am not new to Excel or modeling just new to Bloomberg. I have a couple years experience in VBA.

=BQL.Query("get(name()) for(members(('RAY Index')))","showheaders=false")

Thanks

## Answer by Dimitri Vulis (score 2)

https://quant.stackexchange.com/a/60837

Can't you just pass comma-delimited lists of fields to get, as well as filters, like

`=BQL("Filter(Members('RAY Index')`,`GICS_SECTOR_NAME=='Fishmongers')", "PX_LAST*100/PX_VOLUME`,`RIGHT(NAME,10)`,`EXCH_CODE")`

(This is just an example GICS_SECTOR)

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.