Learn
Lesson · Backtesting and Trading Systems

Historical Data and Data Quality

Detect missing bars, duplicates, stale values, timestamp errors, and price outliers before they create false signals or distorted returns.

Review concepts
Core concepts

What to understand

Keep each definition operational so it can be implemented and tested.

1

Completeness

Verify expected instruments, timestamps, fields, and sessions.

2

Consistency

Check duplicates, ordering, units, timezone, and price relationships.

3

Plausibility

Flag stale bars, extreme jumps, negative values, and impossible OHLC records.

Interactive lab

Historical Data Quality Lab

Inject and clean common data defects. Observe how one bad record can change signals and performance.

Historical Data Quality Lab

Deterministic synthetic educational data · no live market connection

BACKTEST MODEL
Process

Validate before calculating

Cleaning rules must be documented and reproducible.

1

Profile

Measure missing, duplicate, stale, and extreme records.

2

Repair or exclude

Apply a documented treatment without inventing unknown prices.

3

Recalculate

Confirm that indicators and signals use the validated dataset.

Knowledge check

Check your understanding

Select one answer for each question. Feedback appears immediately.

1. A single extreme bad price is most likely to distort:

2. What should happen to an unexplained missing bar?

3. Why verify timestamps?

4. A rule counts closes above the highest close of the previous 12 bars. One bar in the file is missing. How many bars can the rule not score because of it?

Practical rules

  • Run automated validation before every backtest.
  • Preserve raw data and record every transformation.
  • Treat suspicious records as defects until verified.

Common mistakes

  • Correcting data manually without an audit trail.
  • Assuming all vendor files use the same timezone.
  • Ignoring delisted or temporarily halted instruments.
References

Official reading

The labs are simplified simulations. These sources cover historical performance, data, costs, or execution limitations.

CME Group · Historical Market Data
Describes historical market data used for market analysis and strategy validation.

Open official reference ↗

FINRA · Smart Beta—What You Need to Know
Explains that historical backtesting is hypothetical and does not predict future performance.

Open official reference ↗

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.