Skip to content
Finance Lessons

Foundation Models for Financial Time Series

The Leakage Minefield

Why foundation models make data leakage worse than any model before — pretraining contamination, the knowledge-cutoff trap, benchmark overlap, point-in-time and survivorship leaks — plus a concrete checklist for when a zero-shot foundation-model backtest can actually be trusted.

18 min Updated Jun 22, 2026

Lessons 1 through 4 sold you on the upside: pretrain on a giant corpus, then adapt (lesson 1), forecast time series zero-shot (lesson 2), ride the scaling laws (lesson 3), and even mine an LLM for research and signals (lesson 4). Every one of those superpowers shares a dirty secret, and this lesson is where we drag it into the light.

The secret: a foundation model has already read an enormous slice of the past — possibly including the very future your backtest is trying to “predict.” Classical models only know what you feed them. A pretrained model walks in already knowing things, and you usually have no idea what. That turns a normal modeling chore into a minefield, where one wrong step blows up your entire research conclusion without making a sound.

Let’s learn where the mines are buried.

Why foundation models make leakage worse

Before you read — take a guess

Before any definitions: what makes a pretrained foundation model uniquely dangerous for backtesting, compared with a model you train from scratch on your own data?

The analogy. Imagine hiring an analyst to predict today’s market, then discovering they spent last night reading tomorrow’s newspaper. Ask them to “forecast” and they’ll dazzle you — but they’re reciting, not reasoning. A foundation model pretrained on data through 2024 and pointed at a 2020 backtest is exactly that analyst. The brilliance you measure is memory wearing a forecasting costume.

Three precise terms. Leakage in foundation models comes in three named flavors, and you need all three in your vocabulary:

  • Lookahead bias (look-ahead bias). Using, at decision time tt, any information that was not actually available until after tt. The classic version is a coding bug (you indexed tomorrow’s price). The foundation-model version is baked into the weights: the model saw the future during pretraining, so lookahead arrives for free, invisibly.
  • Pretraining-data contamination. Your evaluation data — or its outcomes — sat inside the corpus used to pretrain the model. The model isn’t generalizing to your test set; it’s partly recalling it.
  • Memorization. Large models provably store verbatim chunks of their training data. So contamination isn’t just “similar examples were seen” — specific values, sequences, or events can be reproduced from memory.

Why it is worse than ever. With a from-scratch model you control the inputs exactly: leakage is a bug you can audit line by line. With a foundation model, the leak is upstream, opaque, and enormous. You typically cannot inspect the corpus, cannot enumerate what it memorized, and cannot un-see what it saw. The leak is in the box before you open it.

FailureFrom-scratch modelFoundation model
Source of future infoA bug in your pipelineBaked into pretrained weights
AuditabilityHigh — read your own codeLow — corpus often undisclosed
Default stateLeakage-free until you add a bugPossibly already contaminated
FixPatch the bugConstrain the evaluation window
Warning:

You cannot grep a model's memory

The instinct from classical ML is “I’ll just check my features for lookahead.” That instinct fails here: the dangerous information lives in billions of frozen weights, not in your feature matrix. A clean feature pipeline does not imply a clean evaluation when the model itself arrived pre-loaded with the future. Leakage hunting for foundation models is about the boundary in time between what the model knew and what you test on — not about your columns.

When to use it

Treat every pretrained model as guilty-until-proven-innocent of contamination whenever its claimed skill is being measured on the past. If you are only ever running it forward on genuinely unseen, post-deployment data, the worry shrinks. The moment you backtest — the moment you score it on history — assume the corpus may have touched that history and design around it. The rest of this lesson is the “designing around it” part.

Fill in the core distinction.

Pick the right option for each blank, then check.

In a from-scratch model, leakage is typically a bug in your own pipeline; in a foundation model, the future can be baked into the , which you usually cannot inspect.

Leak #1 — temporal contamination (the knowledge cutoff)

Before you read — take a guess

A time-series foundation model has a knowledge cutoff of 2024. You run it 'zero-shot' to forecast the 2020 market. What are you actually measuring?

The analogy. Knowledge cutoff is the date past which the model has read nothing. Everything before the cutoff is open-book; everything after is closed-book. Backtesting before the cutoff is handing the model an exam on chapters it already memorized.

Precise definition. A model’s knowledge cutoff is the latest date represented in its pretraining corpus. Temporal contamination occurs when your evaluation window falls (wholly or partly) before the cutoff, so the outcomes you score were available to the model during pretraining. A “forecast” of a pre-cutoff period is therefore a memory test, not a forecast — the model is, at best, interpolating data it has already seen and, at worst, regurgitating it.

Worked example — a backtest that is secretly a memory test. Suppose a vendor ships a foundation model with a stated knowledge cutoff of 31 December 2024. You evaluate it on a backtest spanning 2015–2023 and report a beautiful out-of-sample Sharpe.

  • Every single trading day in 2015–2023 is before the 2024 cutoff.
  • So 100% of your “out-of-sample” window is inside the model’s pretraining horizon.
  • The model could have memorized the 2015–2023 price path verbatim; nothing structurally prevents it.
  • Your Sharpe measures recall fidelity, not predictive skill. It will not survive contact with truly future data.

Now contrast a clean design. Same model, same 2024 cutoff, but you evaluate only on 2025 onward — dates the model provably could not have seen. That window can have leaked nothing through the cutoff (it postdates the corpus entirely), so a good Sharpe there is at least eligible to be real.

Backtest windowKnowledge cutoffWhat you actually measure
2015–20232024Memory of the past (contaminated)
2024 straddling2024Mixed — partly memory, partly forecast
2025 onward2024Genuine out-of-sample (eligible to be real)

The fix. Backtest only on data strictly after the knowledge cutoff. That single rule kills temporal contamination outright. It is brutal — it can leave you with a painfully short evaluation window — but a short honest window beats a long contaminated one every time.

Warning:

'Zero-shot' does not mean 'leakage-free'

People hear “zero-shot” and relax, as if not fine-tuning means nothing leaked. Zero-shot only describes the adaptation step — you didn’t train on the target task. It says nothing about whether the target period predates the cutoff. A zero-shot evaluation on a pre-cutoff window is fully contaminated. Decouple the two ideas: zero-shot is about labels you didn’t fit; cutoff is about time you can’t un-see.

When to use it

Apply the strictly-post-cutoff rule any time the model’s training data is dated and your evaluation touches history. If the vendor won’t disclose a cutoff, you cannot establish a clean window at all — treat the whole backtest as suspect. The only fully safe evaluation of a dated model is forward, on data created after you froze the model. Everything else is a negotiation with contamination.

Pick a term, then click its definition.

Leak #2 — benchmark / test-set contamination

Before you read — take a guess

A time-series foundation model tops the leaderboard on a famous public forecasting benchmark. Why might that win overstate its true zero-shot skill?

The analogy. It’s an open-secret cheating ring: the exam questions were published online for years, and the model studied from a corpus that scraped the whole internet. Of course it aces the exam — it has seen this exact exam. A leaderboard win under those conditions tells you the model memorized the test, not that it’s smart.

Precise definition. Benchmark contamination (test-set contamination) is the special case of pretraining contamination where the leaked material is a public evaluation dataset. The classic time-series benchmarks — the M-competition series (M3, M4, M5), and the common open forecasting repositories everyone trains and tests on — are widely mirrored, blogged, and packaged. That makes them prime candidates to be swept into a web-scale pretraining corpus. A model that has effectively memorized M4 will look superhuman on M4 and merely human everywhere else.

Worked example — the leaderboard mirage. Two models report results on a public benchmark:

  • Model A: reported error (sMAPE) of 9.8 on the public benchmark; on a fresh, never-published dataset of the same kind, 14.5.
  • Model B: reported error of 11.0 on the public benchmark; on the same fresh dataset, 11.3.

Read naively, Model A “wins” the leaderboard. But Model A’s error jumps 48% the instant you move to data that couldn’t be in the corpus, while Model B barely budges. Model A’s leaderboard edge is contamination; Model B is the one that actually generalizes. The leaderboard ranked them backwards.

How to probe for it. You rarely get to read the corpus, so you test behaviorally:

  1. Held-out-by-construction data. Evaluate on a private dataset you generated or licensed after the model’s cutoff. A big error gap (public vs. private) is a contamination fingerprint.
  2. Perturbation tests. Slightly alter the public series (shift, rescale, mask a chunk) and re-evaluate. A model that generalizes degrades gracefully; a model that memorized collapses when the surface form changes.
  3. Completion probing. Give the model the front of a known public series and ask it to continue. If it reproduces the held-out tail with eerie precision, it has memorized that series.
SymptomGeneralizing modelContaminated model
Public vs. fresh-data error gapSmallLarge
Sensitivity to harmless perturbationGraceful degradationSharp collapse
Verbatim continuation of public seriesNoYes
Warning:

A leaderboard rank is a hypothesis, not a result

Treat any public-benchmark number on a foundation model as a claim to be falsified, not a fact. Until you’ve reproduced the win on data that demonstrably could not be in the pretraining mix, you have not measured generalization — you’ve measured the overlap between the benchmark and the corpus. Vendors love benchmark tables precisely because they flatter contaminated models. Demand the fresh-data number.

When to use it

Run benchmark-contamination probes whenever a foundation-model claim leans on public-dataset performance — which is almost always, since that’s how these models are marketed. Skip it only when your entire evaluation already runs on private, post-cutoff data (in which case you’ve sidestepped the problem). When in doubt, the completion-probe and the public-vs-private gap are the two cheapest tells.

If I can’t see the pretraining corpus, how can I ever claim a benchmark result is uncontaminated?

Answer. You can’t prove a negative about a corpus you can’t read — but you can make contamination implausible by construction. Evaluate on data that did not exist when the model was frozen (post-cutoff, freshly generated, or privately licensed after the cutoff date). If that data couldn’t have been scraped, a strong score there is evidence of real skill. The burden flips: instead of proving the corpus is clean, you build an evaluation set the corpus cannot have contained. That’s the only honest path when the corpus is a black box.

Leak #3 — point-in-time, revision & survivorship leaks

Before you read — take a guess

In Q1 a company first reports earnings per share of $1.20. Three months later it restates the figure up to $1.45. Which value may you use as a feature for a trade dated in Q1?

The analogy. Using the revised number is like grading yesterday’s weather forecast with today’s corrected satellite data and then claiming the forecaster was clairvoyant. The forecaster only had the messy, soon-to-be-revised data of the moment — and so did the trader.

Precise definitions. Two clocks govern every data point:

  • Event time — when the thing happened (the quarter the earnings cover, the month the GDP measures).
  • Availability time (knowable time) — when the value first became known to the public (the release date, often weeks after the event; revisions arrive later still).

A point-in-time (PIT) dataset stamps each value with its availability time and preserves the vintage — the exact value as first published, before any restatement. Using the latest revised value at a past decision date is a revision leak: you injected information that didn’t exist yet. Two cousins complete the family:

  • Survivorship bias — building a universe from today’s surviving names (e.g. current index members), silently deleting the firms that went bankrupt or were delisted. Your backtest only ever “buys” companies you already know survived.
  • Index-membership / constituent leak — using today’s index composition for a past date. A stock added to the index in 2022 was not a member in 2018; pretending it was leaks the future.

Worked example — the revision that flatters a strategy. A “buy on strong earnings” rule keys off EPS:

FieldVintage (known in Q1)Latest revised value
Reported EPS$1.20$1.45
Decision dateQ1 release date(Q2 restatement)
Signal fired?Maybe (1.20 is so-so)Yes (1.45 looks great)

Train on the revised $1.45 and your rule “knew” the firm would beat before the beat was announced. The backtest lights up with trades that were impossible to place. Swap to the vintage $1.20 and many of those trades vanish — because in the real Q1, the signal was lukewarm. The revised-data backtest is fiction; the vintage backtest is what you could have actually traded.

Where foundation models add a new wrinkle. A pretrained model doesn’t just risk your PIT bug — it may have absorbed the revised values during pretraining and have no concept of vintage at all. So even a perfectly PIT-clean feature pipeline can be undermined by a model that internally “knows” the restated figure. You now have to respect three boundaries at once: purge label-overlap, embargo after the test block, and restrict evaluation to after the model’s knowledge cutoff. The island below makes the first two visible; mentally add the cutoff as a third wall on the right.

Three walls against leakage: purge, embargo, and the model's knowledge cutoff
TrainTest foldPurged (label overlap)Embargo
earlierlater (time →)
Train26Test fold8Purged (label overlap)4Embargo2

A sample's label is realized over a forward window, so a training cell whose label horizon overlaps the test fold leaks the answer. Purging drops the cells whose label horizon (the slider) overlaps the test block on either side; the embargo drops a few more right after it, where serial correlation lets features bleed forward. For a foundation model, add a conceptual third wall: even after purge and embargo, your test fold must sit strictly AFTER the model's knowledge cutoff and use point-in-time (vintage) values, or the pretrained weights leak the future no matter how clean the fold geometry looks.

Warning:

Survivorship is leakage you can't see in the code

Revision leaks at least show up as a column you chose wrong. Survivorship is sneakier: it’s the absence of the firms that failed. Build a 2010 backtest from the 2026 index and you’ve quietly excluded every company that went to zero in between — your strategy looks robust because all its potential casualties were deleted before the test began. A foundation model trained on “the companies that exist today” inherits the same blind spot. Always reconstruct the universe as it stood at each point in time, not as it stands now.

When to use it

Insist on point-in-time, vintage data whenever your features touch anything that gets revised (macro releases, earnings, fundamentals) or anything defined by membership (index constituents, sector classifications, credit ratings). For pure price-only, never-revised series the revision leak is smaller — but survivorship and delisting still bite. With a foundation model in the loop, assume it absorbed revised, survivor-only data and lean even harder on a strictly-post-cutoff window where its internal “knowledge” can’t reach.

Fill in the two clocks.

Pick the right option for each blank, then check.

The is when a value first became publicly known, which can lag the event by weeks; a point-in-time dataset stamps each value with it and preserves the original vintage before any revision.

How to test for contamination

Before you read — take a guess

You want to know whether a vendor's foundation model is 'cheating' on your backtest. Which single comparison is the most diagnostic first move?

The analogy. Before you audit a witness’s testimony line by line, you check one thing: could they have been at the scene? The knowledge cutoff is the alibi check. If the model “was there” for your test period, nothing else it says about that period can be trusted.

A contamination test battery. Stack these from cheapest to most thorough:

  1. Cutoff-vs-window check (free). Put the stated knowledge cutoff next to your evaluation dates. Any overlap = contaminated, full stop. Refuse to run the backtest until the window is strictly post-cutoff.
  2. Future-event probing. Ask the model about events after its supposed cutoff. If it “knows” something it shouldn’t — a result, a price level, a headline from after the claimed cutoff — the real cutoff is later than advertised, and your “clean” window may not be clean.
  3. Public-vs-private gap. Score on a public benchmark and on a private, post-cutoff dataset. A large gap is the contamination fingerprint from Leak #2.
  4. Point-in-time replay. Re-run with strictly vintage features and reconstructed as-of-date universes. If the edge evaporates, it lived in revision/survivorship leaks, not skill.
  5. Trial deflation. Whatever survives, deflate the reported Sharpe for the number of model variants, prompts, and windows you tried — the same multiple-testing discipline from the alpha-research lessons.
TestCostWhat it catches
Cutoff vs. windowFreeTemporal contamination (Leak #1)
Future-event probeLowA mis-stated / later real cutoff
Public vs. private gapMediumBenchmark contamination (Leak #2)
Point-in-time replayHighRevision / survivorship leaks (Leak #3)
Trial deflationLowFalse discovery from over-searching
Warning:

A backtest that straddles the knowledge cutoff is not a backtest

If part of your evaluation window sits before the cutoff and part after, you have not run a backtest — you’ve run a blend of a memory test and a forecast, and you cannot tell which trades came from which. The pre-cutoff portion can inflate the whole result, and averaging contaminates the honest part. Cut the window at the cutoff and report only the strictly-post-cutoff segment. Half a clean backtest is worth more than a whole dirty one.

When to use it

Run the full battery before you stake any decision — capital, a research claim, a publication — on a foundation-model result. For quick internal exploration the free cutoff-vs-window check is the non-negotiable minimum; the expensive point-in-time replay can wait until a result looks promising enough to deserve it. But never present a number externally without at least the cutoff check and a trial-deflation caveat.

Match each diagnostic to the specific leak it's designed to expose.

Place each item in the right group.

  • Compare the stated knowledge cutoff against the test window
  • Rebuild the universe to include firms that later delisted
  • Measure the public-vs-private error gap on fresh data
  • Probe whether the model knows events after its claimed cutoff
  • Ask the model to continue a known public series and watch for verbatim recall
  • Replay using strictly vintage values and as-of-date index membership

When you can trust a zero-shot foundation-model backtest

Before you read — take a guess

Which single condition is necessary (though not sufficient) for a zero-shot foundation-model backtest to be trustworthy?

So when can you believe the number? Only when a backtest clears every wall at once. Here is the concrete checklist — treat it as a gate, where failing any one item sends the whole result back to “contaminated until fixed.”

The trust checklist.

  1. Strictly post-cutoff window. Every evaluation date is after the model’s knowledge cutoff. No straddling. (Necessary; everything else is moot without it.)
  2. Point-in-time, vintage features. Each feature carries an availability timestamp; you use the as-first-published value, and the universe is reconstructed as of each date (no survivorship, no future index membership).
  3. No public-benchmark overlap. Evaluation runs on private or freshly generated data that demonstrably could not be in the pretraining corpus; the public-vs-private gap has been checked.
  4. Deflated for trials. The reported Sharpe is adjusted for the number of variants, prompts, and windows you searched — no cherry-picked best run.
  5. Costs and capacity modeled. Transaction costs, slippage, latency, and strategy capacity are subtracted; the “edge” survives realistic frictions and isn’t a paper artifact.
Checklist itemLeak it closesFail mode if skipped
Strictly post-cutoff windowTemporal contaminationMemory test masquerading as forecast
Point-in-time vintage featuresRevision / survivorshipImpossible-to-place trades light up
No public-benchmark overlapBenchmark contaminationLeaderboard mirage
Deflated for trialsOver-searchingLucky best-run reported as skill
Costs and capacity modeledFrictionless fantasyUntradeable edge

Worked example — running the gate. A team reports a zero-shot strategy with Sharpe 1.8.

  • Window: 2025–2026, model cutoff 2024 → passes item 1 (strictly post-cutoff).
  • Features: macro releases used at revised values → fails item 2. Stop. Re-run with vintage data; Sharpe falls to 1.1.
  • Re-checked: private data, no benchmark overlap → passes item 3.
  • Trials: 30 prompt/variant combinations searched, deflate → effective Sharpe ~0.7.
  • Costs: after fees and slippage → ~0.5.

The headline 1.8 was real arithmetic on a fake setup. Walk it through the gate and the honest, eligible-to-be-true number is ~0.5 — still possibly worth trading, but a different decision entirely. The checklist didn’t destroy value; it revealed how much of the headline was leakage and luck.

Warning:

The checklist is an AND, not an OR

Every item is a wall, and walls don’t average. A backtest that nails four items and flunks one is not “80% trustworthy” — it’s contaminated, because the one failure can fabricate the entire edge. Resist the urge to wave through a result because it’s mostly clean. Either it clears all five gates or it goes back to the bench. Lesson 6 builds the honest-evaluation protocol that turns this checklist into a standing process.

When to use it

Run the full gate before any go/no-go decision on real capital or any external claim. For early-stage triage you can fail-fast on the cheap gates first (cutoff, then trial count) and only pay for vintage-data replay and cost modeling once a candidate survives. But the moment money or reputation is on the line, all five walls stand — no exceptions, no averaging.

Sort each setup into a trustworthy gate-passing design or a contaminated one.

Place each item in the right group.

  • Reconstruct the universe as of each date, including later-delisted firms
  • Build the universe from today's index members and use revised earnings
  • Use private post-cutoff data, deflate Sharpe for 30 trials, subtract costs
  • Backtest 2015–2023 on a model with a 2024 cutoff
  • Evaluate only on 2025–2026 with a 2024 model cutoff, using vintage features
  • Report the best of 40 prompt variants with no deflation

Recap

Big picture

The leakage minefield

  • The Leakage Minefield
    • Why it's worse now
      • Future baked into pretrained weights
      • Lookahead, contamination, memorization
      • Corpus is a black box — can't grep memory
      • Analogy: analyst read tomorrow's paper
    • Leak #1 — temporal / cutoff
      • Pre-cutoff backtest = memory test
      • 2015–2023 on 2024 cutoff is contaminated
      • Fix: backtest strictly after the cutoff
      • Zero-shot ≠ leakage-free
    • Leak #2 — benchmark overlap
      • M-competitions sit in the corpus
      • Leaderboard win overstates true skill
      • Probe: public-vs-private gap, completion test
    • Leak #3 — point-in-time
      • Event time vs availability time
      • Vintage vs revised values
      • Survivorship & index-membership leaks
      • Purge + embargo + cutoff = three walls
    • Trust checklist (AND)
      • Strictly post-cutoff window
      • Point-in-time vintage features
      • No public-benchmark overlap
      • Deflated for trials
      • Costs & capacity modeled
Foundation models can carry the future in their weights — so a clean feature pipeline isn't enough. Cut the window at the cutoff, use point-in-time data, and gate every result.

The leakage minefield — check yourself

Question 1 of 60 correct

A foundation model has a knowledge cutoff of 2024. On which window can a zero-shot backtest be eligible to reflect genuine forecasting skill?

Check your answer to continue.

Mark lesson as complete