Valuein

For Quants & systematic researchers

Pro tier

Backtests that can't see the future

Backtest with the data exactly as the SEC had accepted it at each rebalance date, so a factor cannot see a figure that did not exist yet.

Point-in-time, survivorship-free fundamentals across 30 years and every delisted name — so your Sharpe survives out-of-sample.

The pain

Two silent killers wreck fundamental backtests: look-ahead bias (using restated numbers the market didn't have yet) and survivorship bias (testing only the companies that survived). Most datasets bake in both — so the Sharpe looks great and dies live.

  • “My backtest looks great and dies live.”

    Restated numbers and today's index members leak the future into the past.

  • “I cannot tell what the data knew on that date.”

    Most feeds overwrite history, so the as-reported value is gone.

  • “Delisted names vanish from my universe.”

    Testing only on survivors flatters every factor.

The solution

  1. 1

    Reconstruct the real universe at every date

    get_pit_universe returns the index constituents as they actually were on any historical date — including names later delisted, merged, or bankrupt.

  2. 2

    Query the data the market had — and only that

    Every fact carries its EDGAR accepted_at timestamp; creating the SDK client with as_of filters every point-in-time table to what was public at that moment. No restated surprises leak backward.

  3. 3

    Smoke-test the factor before you build the pipeline

    run_backtest computes a bounded point-in-time factor / forward-return grid over your tickers and rebalance dates, and get_pit_valuation_ratios returns backtest-safe multiples (P/E, EV/EBITDA, FCF yield) on any historical date — straight from your AI agent.

  4. 4

    Crunch it out-of-core

    The SDK streams R2 Parquet through DuckDB locally — 120.5M+ facts queried in milliseconds, no per-row API round-trips. Build factors with the AlphaEngine framework.

Copy this

Real code and a ready prompt. Each block says what it needs before it runs.

APython SDK

Needs a Pro or Institutional token

survivorship-free-backtest.pypython
from valuein_sdk import ValueinClient # Needs Pro or Institutional: the backtest reads daily prices.with ValueinClient() as client:  # reads VALUEIN_API_KEY    # Rank the S&P 500 on return on equity each quarter, using only data the    # SEC had accepted at each rebalance date. Long the top quintile, short the bottom.    result = client.factor_backtest(        "return_on_equity",        start="2020-01-31",        end="2023-12-31",        freq="QE",        lineage=True,  # keep the fact_id behind every signal value    )    print(result.summary())    print(result.to_frame().head())

Reads daily prices, so it needs a Pro or Institutional token. Delisted coverage depends on your plan; the free sample is S&P 500 only.

pip install valuein-sdk

BPrompt for Claude or ChatGPT

Works without a token on the free sample; your token unlocks your plan

prompt.txttext
Use get_pit_universe for the index members on 2020-01-31, then run_backtest on return on equity with quarterly rebalancing. Report the results exactly as returned and say which as-of date each input used.

Tools it uses: get_pit_universe, run_backtest

CConnect your AI client

No token? Delete the headers block and it runs on the free sample

mcp configjson
{  "mcpServers": {    "valuein": {      "url": "https://mcp.valuein.biz/mcp",      "headers": {        "Authorization": "Bearer YOUR_VALUEIN_TOKEN"      }    }  }}

What you get

Your backtest trains on the full universe with no peeking — so the edge you measure is the edge you'll actually trade.

  • A backtest whose inputs are limited to what was accepted by each date.
  • A fact_id behind every signal value when you turn lineage on.
  • A comparison against restated data, so you see what restatements would have hidden.

Frequently asked

How is look-ahead bias actually prevented?

Each fact stores its SEC acceptance timestamp and is immutable. The SDK's PIT enforcement filters the fact, ratio, factor, earnings-signal, price and smart-money tables to as_of, so a query for a past date never sees a later restatement.

Are delisted companies really included?

Yes. Every entity that ever filed with the SEC — including bankrupt and merged names — is in the Pro and Institutional universe. That's what makes it survivorship-free.

Try it on your own ticker.

The free sample needs no token and no card. One token works across your AI agent, your code and the Workspace.