Shadowell
  1. Shadowell
  2. Notes
  3. Point-in-time, and the futures you accidentally see

DataData platform · November 2025 · 9 min read

Point-in-time, and the futures you accidentally see

  • Data
  • Research
  • Foundations

Leakage never announces itself. It does not look like a bug. It looks like a good result.

Every dataset used in research answers a question about the past. The trouble is that most datasets are maintained in the present, by people who quite reasonably want them to be correct rather than historically faithful. A price is adjusted. A statement is restated. A company is reclassified. An index constituent list is updated. Each improvement silently posts a letter from the future into your training set.

Every row needs two clocks

Our rule is simple and non-negotiable: every record carries an event time (when the thing happened in the world) and a knowledge time (the first moment we could have known it). Research reads through an as-of view that refuses to return rows whose knowledge time is later than the simulated clock.

The consequence is that leakage stops being a matter of researcher discipline and becomes a property of the access layer. You cannot see the future because the API will not serve it to you. Discipline is a fine thing; not needing to rely on it is better.

pythonclass AsOfStore:
    """Reads are impossible to get wrong: the clock is a constructor argument."""

    def __init__(self, conn, as_of):
        self._conn = conn
        self._as_of = as_of            # the simulated 'now'

    def fundamentals(self, tickers):
        return self._conn.query(
            """SELECT DISTINCT ON (ticker, period) *
                 FROM fundamentals
                WHERE ticker = ANY(%(t)s)
                  AND knowledge_time <= %(now)s   -- not event_time. never event_time.
                ORDER BY ticker, period, knowledge_time DESC""",
            {"t": list(tickers), "now": self._as_of})

# There is deliberately no way to construct this without a clock.
def open_store(conn, as_of):
    if as_of is None:
        raise ValueError("as_of is required; 'latest' is not a research concept")
    return AsOfStore(conn, as_of)

A field guide to leakage

  • Survivorship. Your universe contains the companies that still exist. The ones that went to zero are the entire point.
  • Restatement. Fundamentals as they are now, not as first reported. You are trading on an audited truth nobody had.
  • Index membership. Using today's constituents historically buys everything after it has already run.
  • Timestamps. The vendor's stamp, the exchange's stamp and your capture stamp are three different clocks. Only one is the one you could have acted on.
  • Adjusted prices. A split-adjusted series is rewritten history. Correct for charting, dangerous for simulation.
  • Universe selection. "Liquid names" chosen using the full sample is hindsight with extra steps. This is the one that got us; see exhibit B in the graveyard.
  • Reference data. Sector and country reclassifications propagate backwards in most vendor files.
  • The human leak. You lived through the period. You know what happened in March. Your feature choices know it too.
Figure 1 — find the leakageInteractive on the home page

A small dataset of closing prices, reported earnings, corporate actions and knowledge times. Exactly one cell could not have been known on the date of its own row. The answer: the close for 2025-03-14 reads 138.05p, a third of its neighbours, because that row was backfilled from today's split-adjusted vendor file. The 3:1 split behind the adjustment was not announced until 2025-03-19.

Open the interactive figure

Tests that actually catch it

  1. The shift test. Delay every input by one full period. A real edge degrades gracefully. Leakage falls off a cliff, because you removed the thing it was using.
  2. The as-of rebuild. Reconstruct the world as of an arbitrary past date and check the numbers match what was on the screen that day. If you cannot, you do not have a point-in-time store, you have a spreadsheet with good intentions.
  3. The paranoid harness. Make future access a type error. A simulator that physically cannot deliver tomorrow's row removes the entire class of mistake.
  4. Label shuffling. Randomise the target. Any remaining performance is your pipeline cheating.
  5. Blind CI. A scheduled job re-runs yesterday's research against the store as it stood yesterday. Silent drift shows up as a failing test, not as a mystery in six months.

Why this is research, not chores

There is a tempting hierarchy where data work is preparation and modelling is the real job. It is backwards. Model choice is usually worth a few per cent; a leaked feature is worth an infinite amount of imaginary money, right up until it costs real money. The most valuable engineering hour in a quantitative firm is usually spent making it impossible to lie to yourself.


Data quality is not the thing you do before research. It is research.