All articles
BacktestingData QualityTrading Education

Is Bad Historical Data Ruining Your Strategy Tests?

September 30, 2026 8 min readBy Rami Alame (Akylles)Step 77 · Your trading desk
Hand-drawn Trade Feeld manga scene of a developing trader exploring Is Bad Historical Data Ruining Your Strategy Tests?

Is Bad Historical Data Ruining Your Strategy Tests?

By Rami Alame (Akylles) | Trade Feeld | Intermediate | Stocks, Forex, Crypto

Yes. Bad historical data can make a weak strategy look convincing or a reasonable idea look broken. Missing candles, mishandled stock splits, and misaligned timestamps can change signals, fills, and measured risk. Before adjusting your strategy, check whether the data represents what you could actually have observed and traded. This article explains how to audit historical market data quality and build more credible tests. It is trading education, not financial advice.

What a clean backtest actually requires

A backtest combines market observations with rules about decisions and execution. Errors in any layer can contaminate the result, but data errors are especially deceptive because the output may still look polished.

Quality means more than having a long file. Ask whether the dataset is:

  • Complete: Expected observations are present, or gaps are explained.
  • Consistent: Prices, volumes, timestamps, and adjustments follow documented conventions.
  • Point-in-time appropriate: Each decision uses only information available at that moment.
  • Relevant: The feed represents the instrument, venue, session, and price type your test assumes.

A clean daily dataset may suit a closing-price study but be inadequate for a strategy that depends on intraday stops. Equally, precise candles cannot tell you the order of every trade inside them. Match the data’s resolution to the question rather than treating extra decimal places as extra truth.

Find missing candles without manufacturing activity

A missing candles backtest problem starts with defining what should exist. Stocks follow exchange sessions and may stop trading during halts. Forex usually trades through the business week, but broker schedules and holiday hours vary. Crypto trades continuously, yet an exchange can experience outages or have intervals without trades.

Build an expected calendar for the specific market and feed. Compare it with the actual timestamps, then classify unexplained gaps.

Distinguish among:

  • A scheduled market closure.
  • An interval with no transactions.
  • A genuine trading halt or venue outage.
  • A failure in your download or the vendor’s history.

Do not automatically forward-fill every gap. Repeating the previous close can invent flat candles, suppress measured volatility, and create apparent opportunities to trade when execution was unavailable. If a feed intentionally emits empty bars, preserve a flag identifying them.

Check duplicate timestamps, unsorted rows, negative volume, and impossible candle relationships too. A candle’s high should not be below its open or close, and its low should not exceed either. These checks catch structural faults, although they cannot prove a plausible-looking price is correct.

Handle stock splits, dividends, and disappearing companies

A stock split changes the relationship between share count and quoted price. Without consistent adjustments, a split can look like an enormous market move and trigger signals that have no economic meaning.

Using split adjusted stock prices helps maintain continuity across splits, but inspect the vendor’s definition. Some datasets adjust only for splits; others incorporate cash dividends. An adjusted close paired with unadjusted open, high, and low values is not a coherent candle for most strategy calculations.

Keep these distinctions clear:

  • Split adjustment normalizes prices for changes in share count.
  • Dividend adjustment can support return comparisons, but does not automatically model cash payments and reinvestment in an executable portfolio.
  • Raw execution prices represent historical quotes, while portfolio accounting must handle corporate actions consistently.

Volume and share quantities also need compatible treatment. Historical price-threshold rules deserve special care: retrospectively adjusted prices may not match the nominal price an investor saw then.

Use company filings in SEC EDGAR to investigate corporate actions and security changes; use your vendor’s documentation for its adjustment method. Finally, include delisted securities and historical index membership when appropriate. Testing today’s survivors across the past introduces survivorship bias, even when every candle is accurate.

Align clocks, sessions, and information availability

Time zone data alignment is about event ordering, not just making charts look tidy. Store a standardized timestamp, commonly UTC, while retaining the original exchange or broker time zone and session rules.

Check whether each timestamp marks a candle’s opening or closing time. A signal using a completed candle cannot legitimately trade at that candle’s opening price. Even execution at its closing price needs a defensible order-timing assumption.

Daylight saving changes require calendar-aware conversion. A fixed offset can shift relationships between markets during part of the year. Daily forex candles may use different session boundaries across brokers, while crypto vendors may define daily bars using different cutoffs.

Information availability matters beyond prices. If your test uses economic indicators, distinguish the observation period from the release time. A monthly figure was not known throughout the month it describes. Revised data can also leak later knowledge into earlier decisions.

For macro inputs, inspect series metadata and available vintage information through FRED. Do not assume a current historical download reproduces what traders knew at the time.

Worked example: one false move, one hidden gap

All numbers in this example are hypothetical, round, and used only for illustration. They are not actual market observations or reported results.

Imagine a stock strategy that buys after a daily decline greater than 20%. A stock closes at $100 before a two-for-one split and opens at $50 afterward. Assume no underlying economic price change.

A naive comparison calculates:

  • Apparent return: ($50 ÷ $100) − 1 = −50%.
  • Strategy interpretation: The decline exceeds 20%, so generate a buy signal.

With the earlier price restated to $50 on the post-split basis, the comparison becomes:

  • Split-adjusted return: ($50 ÷ $50) − 1 = 0%.
  • Correct interpretation: The split alone does not trigger the decline rule.

Now consider a separate hypothetical intraday trade. The system buys at $100 with a stop trigger at $90. The retained candles show a lowest price of $95, but a missing candle contained trades at $85.

The incomplete test may report that the stop was never touched. Recovering the candle changes the trade’s possible path, but it still does not establish an exact fill. A stop trigger at $90 does not guarantee execution at $90, particularly during a gap or thin trading.

These errors work differently: the split invents a signal, while the missing candle conceals an adverse event. Both can survive a superficial review of the final performance chart.

Common mistakes that survive basic cleaning

Treating all feeds as interchangeable. Forex candles may reflect bid, ask, or midpoint prices. A midpoint touching your limit does not prove an executable quote reached it. Crypto prices and liquidity are venue-specific. Stock feeds can differ in venue coverage and included sessions.

Deleting every extreme observation. A spike may be a bad print, but it may also reflect genuine stressed trading. Investigate before removal. Keep the original record, the evidence, and the reason for each correction.

Validating against only a familiar chart. A comparison on TradingView can help locate discrepancies, but verify the symbol, provider, session settings, and adjustment settings. Two displays may share an upstream source, so agreement is not necessarily independent confirmation.

Assuming candles prove fills. If both a stop and a target fall inside one candle, the candle alone may not reveal which came first. Use finer data or a clearly stated conservative rule.

Ignoring trading frictions. Clean prices do not include every spread, commission, borrow constraint, financing charge, or market-impact effect. Crypto perpetual tests may also require funding and contract-specific data. Data cleaning is necessary, not sufficient.

A step-by-step checklist before trusting results

  1. Write a data specification. Record instruments, venues, frequency, sessions, timestamp meaning, price type, and corporate-action conventions.
  2. Preserve the raw download. Save vendor details, retrieval time, and a file identifier or checksum. Make corrections in a separate, versioned dataset.
  3. Run structural tests. Check sorting, duplicates, required fields, candle relationships, and expected timestamp coverage.
  4. Review gaps by cause. Separate closures, halts, inactive intervals, and missing records. Document exclusion or repair rules before comparing performance.
  5. Audit representative events. Inspect corporate actions, clock changes, and unusually active sessions. Compare selected records with another suitably matched source.
  6. Check information timing. Ensure signals use completed observations and historically available universe membership, fundamentals, and macro releases.
  7. Reconcile execution assumptions. Match bid and ask handling, costs, order timing, and intrabar rules to the available evidence.
  8. Rerun and compare. Track changes in signal counts, entries, exits, drawdowns, and exposure—not just total return. If results change materially across credible datasets, investigate before interpreting them.

Keep this audit alongside the strategy code. Reproducibility requires knowing which data version produced which result.

The bottom line

Bad data can ruin strategy tests without causing an obvious software error. Start with calendars, corporate actions, timestamps, and information availability before searching for better parameters. When the evidence cannot support a precise fill or event sequence, acknowledge that uncertainty instead of hiding it in a convenient assumption.

Keep learning free on Trade Feeld, and follow @tradefeeld on X for trading education. The goal is not a more attractive backtest. It is a test whose inputs, limitations, and conclusions you can explain.

Frequently asked questions

Should I forward-fill missing candles before running a backtest?+

Not automatically. First determine whether the gap reflects a scheduled closure, no trading, a halt, an outage, or missing records. Forward-filled prices should not be treated as proof that orders could execute.

Are split adjusted stock prices enough for a reliable stock backtest?+

No. You also need consistent OHLC and share-quantity treatment, appropriate dividend accounting, historical universe membership, and realistic execution assumptions. Check exactly which adjustments your vendor applies.

Why can two forex or crypto datasets produce different signals?+

They may represent different venues, brokers, bid or ask conventions, session boundaries, or missing-data policies. Compare those definitions before concluding that either dataset is wrong.

Does clean historical data guarantee that a strategy will work?+

No. Clean data improves the credibility of the test, but it does not eliminate overfitting, execution uncertainty, changing market conditions, or trading costs. A backtest remains a model, not a promised outcome.

Sources & further reading

  1. SEC EDGAR — company filings and corporate-action research
  2. FRED — economic series, metadata, and historical-data research
  3. TradingView — chart comparisons with provider and session checks
About the author
Rami Alame (Akylles)

Rami Alame, known as Akylles, founded Trade Feeld to make trading education free, practical and transparent — from your first trade to professional setups.

Educational content only, not financial advice. Trading involves risk of loss.

Trade these setups live

Get the same signals our research desk uses — entries, stops, and targets in real time.

Gain instant access

Keep reading

Comments(0)

Discuss the article and share your tips.

0/2000
  • Loading comments…