Data Quality

What you can rely on, and what to watch for in a backtest

Every row uses only what was public by its date, companies that later delisted stay in, and a value that can't be trusted is null. A backtest that acts at the next session's open sees what it would have seen live.

Point in time

The row for date D includes everything known by 04:00 UTC on D+1: earnings released after the close, filings and estimate changes made on D are already in it. So act on a row at the next session's open, not at D's close. Universe, History and Market responses state this as knowledge_cutoff: "04:00 UTC on the calendar day after the snapshot date".

Each kind of data counts from the day it became public:

  • Prices up to the date, and corporate actions with an ex-date on or before it.
  • Company financials from the day the filing was made; an earnings release updates EPS, revenue, net income and free cash flow sooner. Fundamentals has the details.
  • Analyst estimates as they stood on the date.
  • Insider trades from when the filing was made public, not the trade date.
  • Fund holdings and index membership from the filing date, so they're usually 2 to 5 months old (Funds & Indexes).
  • Economic figures as first published, not as later revised.

A weekly row is dated by the Sunday but reads everything at the week's last session, so its fundamentals match that session's daily row. A daily stock row is preliminary until it turns final overnight; see Preliminary and final rows and Status for release times.

Delisted companies

Delisted, acquired and bankrupt companies keep their history, events and OHLCV, so a backtest isn't limited to today's survivors. Latest mode only returns assets with a row in the last 30 days (daily) or 91 days (weekly); for a delisted company, ask for a date or a start/end range. To rebuild an index as it stood, use member_of.

  • 2019 to 2021 is thinner. Companies that stopped trading then are still being added, so a backtest starting in those years can under-count companies that later delisted.
  • Some of those have no volume. Their prices come from the exchanges' own records, which miss off-exchange trading, so their volume fields are null.
  • A reused ticker means its latest holder.

Splits and dividends

Prices are split-adjusted, and so is every band built on them. OHLCV and Summary's date and range modes take adjustment=split (default), split_dividend for total return, or raw for prices as traded. All price fields in one row are on the same basis.

Corrections

Values are checked when they arrive and again over the following weeks. One that fails a check is left out until it's fixed, and anything built on it is null in the meantime.

A fixed value keeps the date it first became public, and every row it touches is updated at once, band events included. Rows you saved earlier can differ from the same rows read today.

Null values

null means unknown, not zero or low: the data to decide wasn't there or couldn't be trusted.

market_cap_usd and market_cap_tier are null when there's no usable share count, or the cap doesn't fit the company's own statements. Fundamentals lists the reasons for its fields.

Coverage and sources

  • Assets: US stocks, ETFs and crypto pairs. asset_class says which; stock-only fields are null for the others.
  • History starts 2019-01-01. How far back your plan reads is at Plans and Access.
  • Company financials come from SEC filings (10-Q, 10-K, 20-F, 40-F). Insider trades from SEC Form 4. Fund holdings and index membership from SEC Form N-PORT. 8-K event flags (filing_*) from companies' 8-K filings.
  • Analyst data is in analyst_ fields, and no composite score uses it.
  • Market and economy fields come from the US market of each date and official releases.

Before you backtest

  • Act on a row at the next session's open.
  • Use member_of for an index universe, not today's members.
  • Use final rows (data_status: "eod") for anything you'll compare later.
  • Treat null as unknown: drop it or handle it, don't count it as low.
  • Compare band values within one band_contract.