Data Quality
You can explore the materials without registering, but with a free account you can track your progress and earn rewards along the way. By the end of your learning journey, you can have the knowledge you need to become a profitable Trader!
Join →Introduction
Data quality is one of the least visible sources of backtest error. A strategy can be logically correct, statistically interesting, and technically well implemented while still producing misleading results because the historical data contains gaps, bad prices, inconsistent timestamps, corporate-action errors, survivorship effects, or execution assumptions that do not match the market being studied.
For an expert trader, data is not simply something that gets downloaded before a backtest. It is part of the research model. The objective is not to find a dataset that makes a strategy look good, but to establish whether the dataset is sufficiently accurate, complete, consistent, and temporally correct for the question being tested.
1. What Data Quality Means in Trading Research
Data quality is the degree to which a dataset is fit for the specific research question. There is no universally perfect dataset. A daily swing-trading study, an intraday momentum strategy, and a market-microstructure study have very different requirements.
The main dimensions are completeness, accuracy, consistency, timestamp integrity, corporate-action treatment, instrument identity, and historical availability. A dataset may be excellent on one dimension and weak on another.
The key question is therefore: “Is this data fit for this exact backtest?” rather than “Is this data good?”
2. Completeness: Missing Data Is Information
Missing observations can alter signals, returns, volatility estimates, and drawdown calculations. Missing data is especially dangerous when the absence is not random.
Missing trading days can distort holding-period calculations.
Missing bars can create false breaks or hide real ones.
Missing corporate-action records can create artificial price jumps.
Missing delisted securities can distort a historical universe.
Missing volume can invalidate liquidity filters.
An expert researcher records where data is missing, how much is missing, and what rule is used when an observation is unavailable. Silent deletion or automatic filling is not a neutral choice.
3. Accuracy: Plausible Does Not Mean Correct
Bad data often looks reasonable. A price of 102.40 is not obviously wrong simply because it is numerically plausible. Errors become visible only when prices are compared with surrounding observations, alternative sources, exchange rules, corporate actions, or expected market behavior.
Useful checks include impossible or suspicious OHLC relationships, extreme one-bar moves, duplicated records, negative or zero volume where inappropriate, and prices that violate instrument-specific constraints.
The important distinction is between a genuine market event and a data error. An unusual observation should be investigated, not automatically removed.
4. OHLC Consistency
For standard OHLC bars, basic relationships should hold: High should not be below Open, Close, or Low; Low should not be above Open, Close, or High. Violations indicate a data problem or a parsing problem.
These checks are simple but powerful because a single corrupted field can propagate into indicators, entries, stops, targets, and performance statistics.
5. Timestamps and Market Sessions
A timestamp is not just a label. It determines which information was available when the strategy made its decision.
Problems can arise from timezone conversion, daylight-saving changes, incorrect session boundaries, overnight trading, exchange holidays, and timestamps that represent bar open versus bar close.
For example, if a daily signal is calculated using a bar that your engine treats as complete before the exchange session has actually ended, the backtest may unknowingly use information that was not available at the decision time.
A professional dataset should have an explicit timezone and an explicit definition of what each timestamp represents.
6. Duplicate, Out-of-Order, and Overlapping Records
Duplicates can inflate volume, create repeated signals, and alter statistics. Out-of-order records can break rolling calculations and execution logic. Overlapping records can occur when data from different feeds or vendors is merged.
Before research begins, records should be checked for uniqueness and chronological order. When multiple sources are combined, the merge rule must be documented.
7. Corporate Actions and Adjusted Prices
Stock prices can change for reasons unrelated to the economic return of an investor, including splits and certain distributions. A backtest that ignores corporate actions can interpret these events as enormous gains or losses.
Adjusted and unadjusted data answer different questions. Adjusted historical prices can be useful for measuring economically comparable returns across time, while raw prices may be required when modeling the actual historical execution environment.
The critical point is consistency: the price series, corporate-action treatment, indicators, stops, and return calculations must describe the same research reality.
8. Delisted Instruments and Survivorship
A historical universe containing only instruments that exist today can create survivorship bias. Failed, merged, acquired, or delisted securities may disappear from the dataset even though they were available to traders during earlier periods.
Data quality therefore includes universe integrity. If the research question concerns what a trader could actually have selected at the time, the historical membership of the tradable universe matters.
9. Symbol Changes and Instrument Identity
Ticker symbols can change. Companies can merge, split, rename, or move between listings. A symbol is not always a permanent identity.
If historical records are joined using ticker text alone, data can be accidentally fragmented or incorrectly connected. A professional research process uses a stable instrument identity where possible and documents symbol mappings.
10. Volume and Liquidity Data
Volume is often used as a filter, confirmation signal, or execution constraint. Its meaning depends on the market and feed. Reported volume, consolidated volume, venue-specific volume, and estimated volume are not necessarily interchangeable.
A strategy that assumes it can trade a certain position size because historical volume appears high may be relying on a dataset whose liquidity representation is materially different from the real execution environment.
11. Bid/Ask, Spread, and Trade Data
OHLC data describes price movement but does not directly describe the spread available to a trader. Strategies that enter at the close, fill stops at exact levels, or assume unlimited liquidity can therefore look better than they were tradable.
For strategies sensitive to execution quality, higher-resolution data such as bid/ask or trade-level information may be necessary. Data quality must be evaluated together with execution assumptions.
12. Data Leakage Through Time
A particularly dangerous data-quality problem occurs when information is present in the dataset before it would actually have been available to the trader.
Examples include revised fundamental data, corrected historical classifications, future corporate-action knowledge, or datasets that retrospectively apply information to earlier timestamps.
The issue is not whether the value is historically true. The issue is whether it was knowable at the decision point.
13. Resampling and Aggregation
Converting lower-timeframe data into higher-timeframe bars introduces methodological choices. The definition of session boundaries, first and last observation, missing intervals, and aggregation rules can change the resulting OHLC series.
A strategy tested on five-minute data aggregated to hourly bars may not be equivalent to a strategy tested on a native hourly feed. The researcher should know which process produced the bars.
14. Data Vendor Differences
Two legitimate data vendors can disagree because of different correction rules, exchange coverage, timestamps, corporate-action policies, or consolidation methods.
This does not automatically mean one source is wrong. For research, the important task is to understand the difference and determine whether the strategy's conclusions depend on that difference.
For material strategies, cross-source spot checks can reveal fragile assumptions.
15. Data Quality as a Research-Control System
A professional backtesting workflow treats data validation as a repeatable control system rather than a one-time visual inspection.
Define the research question and required market data.
Document the source, timezone, session rules, and adjustment policy.
Run structural checks: duplicates, ordering, missing intervals, OHLC consistency.
Run market checks: suspicious jumps, volume anomalies, session anomalies, corporate actions.
Validate instrument identity and historical universe membership.
Record every cleaning or transformation rule.
Freeze the validated dataset version used for the test.
Repeat key tests after material data revisions.
16. Expert Case Study — The Beautiful Equity Curve
Suppose a breakout strategy produces an exceptionally strong equity curve on ten years of daily stock data. Investigation shows that the dataset is adjusted for splits, but the research universe contains only stocks that are currently listed. Several historical symbols were also mapped manually.
The strategy may contain a genuine edge, but the evidence is not yet trustworthy. The universe has survivorship exposure, and manual symbol mapping creates an audit risk. The correct response is not to discard the strategy or celebrate it. The correct response is to repair the dataset, rerun the study, compare the results, and document the difference.
This case illustrates a central principle: a backtest result is only as credible as the chain of data decisions that produced it.
17. Common Data-Quality Mistakes
Assuming expensive or popular data is automatically research-grade.
Deleting extreme observations without investigating them.
Filling missing prices without understanding why they are missing.
Ignoring timezone and session definitions.
Mixing adjusted and unadjusted series.
Using current symbols to reconstruct a historical universe.
Treating OHLC data as if it contained executable bid/ask information.
Changing cleaning rules after seeing the backtest result.
Failing to version the dataset used for a published result.
18. Expert Exercise — Build a Data Audit
Take one strategy you would seriously consider trading and design a data-audit checklist for it. Specify the minimum timeframe, instruments, sessions, price fields, volume requirements, corporate-action policy, timezone, and execution data required.
Then deliberately introduce one data-quality problem into a copy of the dataset—for example, remove a block of bars, shift timestamps, or insert a suspicious price. Measure which strategy outputs change. The goal is to discover which statistics and decisions are most sensitive to data integrity.
19. Knowledge Check
Why is data quality relative to the research question rather than an absolute property?
Why can missing data create more than a simple reduction in sample size?
What is the difference between adjusted and unadjusted price data?
Why can current ticker lists create survivorship problems?
Why is timestamp integrity essential for avoiding look-ahead effects?
Why can OHLC data be insufficient for execution-sensitive strategies?
Why should unusual observations be investigated before being removed?
Why is dataset versioning part of reproducible research?
Copying, reproducing, adapting, distributing, or publicly displaying any part or all of the Academy’s textual content without the author’s prior written consent is prohibited.