Insights
Point-in-Time Data for AI Trading Agents
Alphanume Team · August 17, 2026
An AI trading agent needs dated universe inputs, not current snapshots applied to historical prices.
Point-in-time data for AI trading agents means every research decision can be reconstructed from observations available at that decision time. If an agent uses today's optionable list and current share counts to test a 2022 strategy, it silently selects survivors and revised values. The generated code may be clean while the experiment is already contaminated.
Alphanume's hosted MCP server exposes 25 tools backed by the same deterministic datasets as REST. The MCP documentation covers connection and response rules, while access tiers determine history and freshness. The server supplies dated inputs. The agent still has to make compatible joins and defend the observation boundary.
Reconstruct the universe before the signal
A 2022 options study should begin with the securities that had listed options at each rebalance date. Join that dated optionability snapshot to market cap and shares outstanding observed for the same date or an explicitly permitted earlier date. Only then calculate a signal. Starting from present-day symbols removes failures and admits instruments that were not tradable then. MCP can inspect the contracts, while a complete market-wide reconstruction belongs in paginated REST extraction.
Input | Point-in-time key | Leak from current-only output |
|---|---|---|
Optionable universe | snapshot date plus ticker | Future option listings enter old tests |
Market cap | date plus ticker | Current share count rewrites old size |
Classification | Documented retrieval and version rule | Later taxonomy is treated as historical fact |
Signal | observation timestamp | Final values appear before settlement |
Outcome | strictly later window | Backfilled results enter the feature set |
The historical market-cap tool supports a full-market date request and cursor pagination. The optionable-tickers tool returns dated snapshots with weekly-options and expiration-density fields. These contracts make a reconstruction possible, but an agent can still choose the wrong snapshot or stop after the first response page.
Give the agent an explicit reconstruction prompt
Ask for raw tables and join diagnostics before requesting performance. A useful prompt names rebalances, permitted as-of logic, pagination, retained nulls, and the audit output. It forbids substitution with current coverage.
Inspect get_optionable_tickers and get_historical_market_cap for one 2022 rebalance through MCP.
Report every tool argument, has_more, next_cursor, and truncated_to_max_rows.
If truncated_to_max_rows appears, stop and label the MCP universe incomplete regardless of has_more.
Write a REST handoff that paginates both complete inputs for every 2022 rebalance.
In the REST-backed reconstruction, select only observations available on or before each rebalance.
Keep snapshot date, market-cap date, ticker, market_cap, shares_outstanding,
has_weeklies, and avg_days_between.
Return one diagnostic row per rebalance with source dates, REST page counts,
unmatched tickers, and exclusions. Do not attach returns yet.Require the agent to save exact tool arguments and response counts. The MCP cap is applied after the upstream REST envelope, so MCP cursors cannot recover rows discarded by truncated_to_max_rows. A human should inspect the maximum source date from the completed REST tables for every rebalance and verify that it never exceeds the decision date. If the process cannot find an eligible snapshot, the correct output is a failed rebalance with a reason, not a forward-filled current list.
Turn the prompt into assertions
Once the retrieval is stable, generate code that enforces the contract. Assertions should run before signal calculation and fail closed. The related AI trading code guardrails explains why executable checks are stronger than prose instructions.
assert universe["option_snapshot_date"].le(universe["rebalance_date"]).all()
assert universe["market_cap_date"].le(universe["rebalance_date"]).all()
assert universe[["rebalance_date", "ticker"]].duplicated().sum() == 0
assert pagination_log["has_more_final"].eq(False).all()
coverage = universe.groupby("rebalance_date").agg(
tickers=("ticker", "nunique"),
missing_market_cap=("market_cap", lambda x: x.isna().sum()),
)
print(coverage)Store the page-level retrieval log beside these assertions. It should include tool name, arguments, request order, cursor returned, row count, and a hash of each raw response. That makes it possible to distinguish a changed dataset from a changed agent decision. If an account cannot reach 2022 history, the run should stop with the entitlement response and leave the universe unbuilt. Asking the model to substitute a recent window would answer a different research question. The same rule applies when a date has no optionability snapshot: a missing historical input is a documented limitation, not permission to use today's coverage.
Review counts across adjacent rebalances as well. A sudden universe jump may be real, but it can also reveal a skipped page, changed snapshot rule, or failed join. Require an explanation tied to raw keys before continuing.
Recognize what point-in-time data does not solve
Dated inputs do not guarantee an honest strategy. An agent can still tune thresholds after seeing outcomes, overlap return windows, ignore delistings, omit transaction costs, or mistake correlation for a mechanism. Classification data can be current-state unless explicitly versioned. An MCP transcript can also be incomplete when a broad call hits a row bound. Point-in-time is necessary for historical reconstruction, not a certificate of profitability.
Rebuild one quarter twice
Run three monthly 2022 rebalances and archive raw responses, cursor logs, joined universes, assertions, and exclusion reasons. Then begin a fresh agent session with the same prompt and compare date-ticker keys. Resolve every difference before adding a signal or outcome. When both reconstructions match, move the fixed calls into REST code for scheduled research and retain MCP for schema discovery and review.