Corporate-KPI Prediction Markets

2026-09-10

Corporate KPI Prediction Markets

Using data from Prediction Market Data on Snowflake

Prediction markets for corporate KPIs from Kalshi and Polymarket.

Code
import os

import pandas as pd
import plotly.io as pio
import snowflake.connector


pio.renderers.default = "plotly_mimetype+notebook"
import plotly.express as px
from plotly.subplots import make_subplots


connector = snowflake.connector.connect(
    account=os.environ["SNOWFLAKE_ACCOUNT"],
    user=os.environ["SNOWFLAKE_USER"],
    token=os.environ["SNOWFLAKE_TOKEN"],
    authenticator="programmatic_access_token",
    warehouse=os.environ["SNOWFLAKE_WAREHOUSE"],
    database=os.environ["SNOWFLAKE_DATABASE"],
    schema=os.environ["SNOWFLAKE_SCHEMA"],
    role=os.environ["SNOWFLAKE_ROLE"],
)

BLUE, RUST = "#3B7AB8", "#C0623B"
pd.set_option("display.max_columns", 40)
Code
KPI_QUERY = """
select *
from PREDICTION_MARKET_FACTORS.PUBLIC.STANDARDIZED_MARKETS
where std_event_type = 'corporate KPI'
"""

cursor = connector.cursor()
cursor.execute(KPI_QUERY)
kpi = cursor.fetch_pandas_all()

kpi.columns = [c.lower() for c in kpi.columns]
for col in ("price_time", "market_start", "market_close"):
    kpi[col] = pd.to_datetime(kpi[col], utc=True).dt.tz_convert("America/New_York")
kpi["price"] = kpi["price"].astype(float)
kpi["date"] = kpi["price_time"].dt.tz_localize(None).dt.normalize()

# stable key for "one market"
kpi["market_key"] = (
    kpi["event_title"].fillna("") + "  ||  " + kpi["market_title"].fillna("")
)

kpi.shape
(36117, 20)
Code
n_markets = kpi["market_key"].nunique()
print(f"price observations : {len(kpi):,}")
print(f"distinct markets    : {n_markets:,}")
print(f"distinct events     : {kpi['event_title'].nunique():,}")
print(f"companies (entity)  : {kpi['std_resolved_entity'].nunique():,}")
print(
    f"price_time span     : {kpi['price_time'].min():%Y-%m-%d} to {kpi['price_time'].max():%Y-%m-%d}"
)
print(
    f"obs / market        : median {kpi.groupby('market_key').size().median():.0f}, "
    f"mean {kpi.groupby('market_key').size().mean():.0f}"
)
print()
print("by exchange (observations):")
print(kpi["market"].value_counts().to_string())
print()
print("by event_category:")
print(kpi["event_category"].value_counts().to_string())
price observations : 36,117
distinct markets    : 1,742
distinct events     : 846
companies (entity)  : 440
price_time span     : 2023-02-23 to 2026-09-10
obs / market        : median 13, mean 21

by exchange (observations):
market
polymarket    20805
kalshi        15312

by event_category:
event_category
finance       20805
companies     11182
financials     4130

Coverage over time

Quarterly price observations and the number of distinct KPI markets quoted each quarter. The pipeline only starts covering these questions in earnest in 2025; activity peaks in earnings season, when dozens of “will X beat estimates?” markets are live at once.

Code
qtr = (
    kpi.assign(
        quarter=kpi["price_time"].dt.tz_localize(None).dt.to_period("Q").dt.start_time
    )
    .groupby("quarter")
    .agg(observations=("price", "size"), markets=("market_key", "nunique"))
    .reset_index()
)
qtr = qtr[qtr["quarter"] >= "2024-01-01"]

fig = make_subplots(specs=[[{"secondary_y": True}]])
fig.add_bar(
    x=qtr["quarter"],
    y=qtr["observations"],
    name="price observations",
    marker_color=BLUE,
    opacity=0.55,
)
fig.add_scatter(
    x=qtr["quarter"],
    y=qtr["markets"],
    name="distinct markets",
    mode="lines",
    line=dict(color=RUST, width=2),
    secondary_y=True,
)
fig.update_layout(
    title="Corporate-KPI market activity by quarter",
    template="plotly_white",
    height=420,
    hovermode="x unified",
    bargap=0.1,
    legend=dict(orientation="h", y=1.12),
)
fig.update_yaxes(title="observations / quarter", secondary_y=False, showgrid=False)
fig.update_yaxes(title="distinct markets", secondary_y=True, showgrid=False)
fig.show()

Which KPIs are covered?

Code
by_market = kpi.drop_duplicates("market_key")

top_prop = by_market["std_property"].value_counts().head(20).iloc[::-1]
fig = px.bar(
    x=top_prop.values,
    y=top_prop.index,
    orientation="h",
    labels={"x": "distinct markets", "y": "std_property"},
    title="Most common standardized KPI (distinct markets)",
)
fig.update_traces(marker_color=BLUE)
fig.update_layout(template="plotly_white", height=520)
fig.show()

Companies

Top companies by number of distinct KPI markets. Tesla (deliveries / production), Coinbase (trading volume), and the mega-cap earnings names lead.

Code
top_co = (
    by_market.dropna(subset=["std_resolved_entity"])
    .groupby("std_resolved_entity")
    .agg(
        markets=("market_key", "nunique"),
        exchanges=("market", lambda s: ", ".join(sorted(s.unique()))),
    )
    .sort_values("markets", ascending=False)
    .head(25)
)

plot_co = top_co["markets"].head(20).iloc[::-1]
fig = px.bar(
    x=plot_co.values,
    y=plot_co.index,
    orientation="h",
    labels={"x": "distinct KPI markets", "y": ""},
    title="Companies with the most corporate-KPI markets",
)
fig.update_traces(marker_color=RUST)
fig.update_layout(template="plotly_white", height=560)
fig.show()