S&P 500 Earning Per Share Estimates¶
Ā© 2025 Marek Ozana
Historical development of EPS estimates for S&P 500. Notice how estimates are always high for 3 years forward but then adjust to reality...
Out[1]:
InĀ [2]:
Copied!
# Download data for multiple fiscal periods
import polars as pl
from polars_bloomberg import BQuery
with BQuery(timeout=50000) as con:
res = []
for n in range(1, 4):
tbl = con.bql(f"""
let(#eps=headline_eps_market(
fa_period_offset={n},
fa_period_type=A,
as_of_date=range('2009-12-31', TODAY(), frq=W)
);
)
get(#eps)
for(['SPX Index'])
""").combine()
res.append(tbl)
data = pl.concat(res).drop_nulls().sort(by="AS_OF_DATE")
data.head(3)
# Download data for multiple fiscal periods
import polars as pl
from polars_bloomberg import BQuery
with BQuery(timeout=50000) as con:
res = []
for n in range(1, 4):
tbl = con.bql(f"""
let(#eps=headline_eps_market(
fa_period_offset={n},
fa_period_type=A,
as_of_date=range('2009-12-31', TODAY(), frq=W)
);
)
get(#eps)
for(['SPX Index'])
""").combine()
res.append(tbl)
data = pl.concat(res).drop_nulls().sort(by="AS_OF_DATE")
data.head(3)
Out[2]:
shape: (3, 6)
| ID | #eps | CURRENCY | REVISION_DATE | AS_OF_DATE | PERIOD_END_DATE |
|---|---|---|---|---|---|
| str | f64 | str | date | date | date |
| "SPX Index" | 62.792159 | "USD" | 2009-12-31 | 2009-12-31 | 2009-12-31 |
| "SPX Index" | 79.130444 | "USD" | 2009-12-31 | 2009-12-31 | 2010-12-31 |
| "SPX Index" | 95.303385 | "USD" | 2009-12-31 | 2009-12-31 | 2011-12-31 |