US Economic Data Surprises¶
Ā© 2026 Jim Domeij
Uses the powerful calendar() function to retrieve US economic data releases from the past two month across multiple sectors, excluding low-relevance series and assessing how each release has surprised relative to Bloombergās median survey forecast. This provides an overview of recent US economic momentum versus consensus expectations, with the ability to drill down into the details of individual data releases.
In BQL, calendar() enables bulk retrieval of historical and upcoming economic releases from a comprehensive global dataset covering more than 2,000 events across 100+ countries, with data extending back to 1997.
SURPRISE is defined as (actual value - survey median) / survey standard deviation.
Out[1]:
InĀ [2]:
Copied!
from polars_bloomberg import BQuery
query = """
let(#ticker=matches(calendar(), abs(calendar().SURPRISE)>=0);)
get(#ticker)
for('US Country')
with(dates=range(-2M, 0D), relevancy='MEDIUM')
preferences(addCols=[SURPRISE, SUBTYPE])
"""
with BQuery() as bq:
df = bq.bql(query)[0]
df.head()
from polars_bloomberg import BQuery
query = """
let(#ticker=matches(calendar(), abs(calendar().SURPRISE)>=0);)
get(#ticker)
for('US Country')
with(dates=range(-2M, 0D), relevancy='MEDIUM')
preferences(addCols=[SURPRISE, SUBTYPE])
"""
with BQuery() as bq:
df = bq.bql(query)[0]
df.head()
Out[2]:
shape: (5, 14)
| ID | #ticker | COUNTRY_NAME | RELEASE_DATE | RELEASE_TIME | EVENT_NAME | PERIOD | SURVEY_MEDIAN | ACTUAL | PRIOR | REVISION | SCALING_FACTOR | SUBTYPE | SURPRISE |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| str | str | str | str | str | str | str | f64 | f64 | f64 | f64 | str | str | f64 |
| "US Country" | "SBOITOTL Index" | "United States" | "2025-11-11" | "12:00" | "NFIB Small Business Optimism" | "Oct" | 98.25 | 98.2 | 98.8 | null | "" | "Surveys/Cyclical Indicators" | -0.076315 |
| "US Country" | "EMPRGBCI Index" | "United States" | "2025-11-17" | "14:30" | "Empire Manufacturing" | "Nov" | 5.75 | 18.7 | 10.7 | null | "" | "Surveys/Cyclical Indicators" | 4.692067 |
| "US Country" | "CNSTTMOM Index" | "United States" | "2025-11-17" | "16:00" | "Construction Spending MoM" | "Aug" | -0.1 | 0.2 | -0.067086 | 0.2 | "%" | "" | 1.470399 |
| "US Country" | "DGNOCHNG Index" | "United States" | "2025-11-18" | "16:00" | "Durable Goods Orders" | "Aug F" | 2.9 | 2.9 | 2.9 | 3.00628 | "%" | "Industrial Sector" | 0.0 |
| "US Country" | "DGNOXTCH Index" | "United States" | "2025-11-18" | "16:00" | "Durables Ex Transportation" | "Aug F" | 0.4 | 0.3 | 0.4 | 0.45894 | "%" | "" | -1.329988 |