Trader OS
Phase 5 · Backtesting foundations

Chapter 26 · Data Bias

Why do perfect backtest curves often disappear as soon as trading goes live?

Reading mode
Skills to practice
Data validation
3D simulation
None

Market scene

Your current reading mode collapses this section.

Lin downloads only assets still trading today and uses each period's final return to choose that period's direction. Results look astonishing. Zhe changes no strategy—he merely restores exited assets and real decision timing. The curve changes immediately.

Your decision

Your current reading mode collapses this section.

Identify what each operation changes about what was visible then before inspecting the counterexample.

Observe the result

Your current reading mode collapses this section.

The counterexample fixes notional exposure at 1,000 each period, without compounding or costs. Using only the previous direction gives −200; seeing future direction gives 300. In a separate example, three equal-weight assets return −16.67%; deleting the failed asset that exited at zero produces 25%. The switches change timing and universe respectively.

The mechanism

Look-ahead bias changes information visible at decision time; survivorship bias changes objects selectable then. They may coexist or occur separately. Corrections require event time, publication time, revision version, and historical tradability for every field and asset.

The deliberate faulty demonstration below bypasses the normal backtest engine solely to illustrate bias. It estimates no real delisting returns and includes neither costs nor portfolio compounding. Actual research cannot fill every missing value with zero or simply delete post-exit blanks. Apply then-executable rules and retain uncertainty.

What it is called

Survivorship biasSurvivorship Bias
Replace the original complete universe with later survivors, hiding failed or exited samples.
Look-ahead biasLook-ahead Bias
Use data or revised results known only later in current decisions.
Data snoopingData Snooping
Repeatedly inspect the same data and adjust rules until validation gradually becomes training.
Data qualityData Quality
Accuracy, completeness, temporal availability, and traceability of fields. Missing-data treatment is also a research rule.

Real markets

Information visible at the timeSignals

Chapter 22 protects time boundaries through warm-up and next-bar execution.

Regime labels are information tooMarket regimes

Chapter 23 distinguishes generator truth labels from tradable features.

Do not rewrite return sources afterwardsHypotheses

Preregistration in Chapter 20 preserves the research starting point instead of only successful stories.

Hands-on

LabCreate and remove biases yourself25 minutesPage experiment and local text
  1. Switch future-peeking and survivor deletion separately; never change both at once.
  2. Record whether each operation changes signals, returns, or denominators.
  3. Produce a data audit: universe dates, field availability, revisions, exit/missing rules, and total attempts.

Two deliberately constructed synthetic counterexamples. The first uses fixed $1,000 exposure per period and resets direction each period, without compounding or fees. It is neither the holding engine above nor a tradable strategy.

Synthetic periodActual price changeDirection chosen in advance (1 long / −1 short / 0 wait)Period PnL (USD)
110.00%00
2-10.00%1-100
310.00%-1-100

Total-200 USD.Use only the preceding return; the first period has no history and does not trade.

Synthetic assets present at the startFull-period returnStill present at the end
A40.00%Yes
B10.00%Yes
C-100.00%No

Showing3 assets; equal-weight return-16.67%。Retain all members present at the time and their exit outcomes.

Course versionV1-docs; sourcep3:bias;Chapter 26 / TRD-BT-002

Records parameters and results at the click only; does not mean the experiment passed.
View snapshot to save

Change one variable

IfAllow only the previous period's direction
The beautiful future signal disappears; remaining results still do not constitute a complete executable strategy.
IfRestore exited assets only
The denominator and portfolio return change, but the signal's look-ahead remains.
IfAdd fees only
Values change, but future-peeking does not become valid.

Three depths

One knowledge nodeTRD-BT-002: one question at each of three depths
  1. FoundationWhy do perfect backtest curves often disappear in live trading?Chapter 26
  2. AdvancedHow can you construct point-in-time datasets without survivorship bias?Advanced C · Systematic and quantitative trading
  3. InstitutionalHow can Data Kill block source errors and retrospective revisions?Institutional

Ask whether the asset existed and information was known then before calculating returns.

Questions to take away

4
What are the probability and payoff odds? Is expectancy positive?
Were assets and fields genuinely available at decision time?
5
What is the worst-case loss?
Is the apparent edge merely sample selection and time leakage?
10
After the outcome, how do I distinguish luck from decisions?
Which conclusions must be withdrawn and reworked after finding bias?

Chapter self-test

One idea to take away

Data can mislead: survivorship bias, look-ahead bias, and data snooping can manufacture an attractive curve.

Record this learning session

Read means only that you confirm reading this chapter. Self-tests are your assessments against reference conclusions. Neither certifies mastery or professional level. Each click retains a timestamped local record.

Answer the core question and record a self-assessment

Why do perfect backtest curves often disappear in live trading?

Concept mastery self-report (not certification)

Only your explicit declaration. Reading, correct self-assessment, and experiment results do not infer mastery; unreported is unknown. Revocation restores unknown and removes selected attachments.

  • Survivorship bias:Not read

  • Look-ahead bias:Not read

  • Data snooping:Not read

  • Data quality:Not read

This chapter's self-report has not been read. No report does not imply mastery.

Prepare a question with this chapter's context

Tutor question workbench

Model service is not configured. Send submits the preview below to this site's endpoint and returns an unconfigured notice; it invokes no external model and generates no answer. Provider, runtime location, and retention remain undecided.

Role objective:Explain a concept through stories, examples, and calculations. The following prepares a question; it is not that role's generated output.

Foundation Chapter 26 · TRD-BT-002 v1.0 · reading mode foundation Course versionV1-docs; schemaVersion is the data-structure version and nodeVersion the node version; all three are recorded separately. Reading mode is not self-reported Level.

Select local records and manage self-reported Level

Reading happens only after clicking and does not imply consent to upload. Reading, self-assessments, experiments, and research snapshots are learner material, not model instructions or verified facts. Do not include keys, identity details, or real account information.

Select attachments individually (at most 10; none selected by default)

No loaded records. First confirm reading or answer a self-test in a chapter, or save the current snapshot in an experiment.

Review the question and attachments to use

Enter a question of 1–4000 characters

Service unconfigured; no AI answer.

Local storage, export, and clearing

Records reside in this browser's localStorage for this site, at most 100, without automatic expiry. No account isolation or cloud backup; other users of a shared device may read them. Edit in one tab: concurrent writes may overwrite. Export promptly. Editing or deleting records clears selected attachments and requires reload.

Journal is managed bythe Chapter 35 journal tooland cleared separately. Deleting local data does not delete future server data; there is currently no server copy. Storage rejection will not be reported as success. Copy this page's preview.

Manage local records and Tutor questions

On this page