Historical Data
Historical data is the recorded market information (prices, volumes, corporate actions and reference data) that a backtest replays, and its accuracy, resolution and point-in-time correctness set the ceiling on how trustworthy any backtest can be.
Quick answer: Historical data is the recorded market information (prices, volumes, corporate actions and reference data) that a backtest replays, and its accuracy, resolution and point-in-time correctness set the ceiling on how trustworthy any backtest can be.
In simple words
Historical data is the past that your backtest replays. It comes in different grains, from daily closes to every tick, and it must reflect what was actually knowable at each moment, including old splits and dividends handled correctly. If the data is wrong or secretly uses information from the future, every result built on it is wrong too, no matter how clever the strategy.
Purpose
This page explains what market data a backtest consumes, how it must be adjusted and structured, and why data integrity is the foundation on which every downstream metric depends.
Visual explanation
Historical Data
Raw feeds flow through cleaning, corporate-action adjustment and point-in-time alignment before becoming backtest-ready data.
Professional explanation
Types and resolution of market data
Historical data ranges from low to high resolution: end-of-day bars, intraday bars at one minute or five minutes, and tick or order-book data recording every quote and trade. Each carries a distinct trade-off. Daily data is compact and adequate for positional and swing strategies; intraday data is heavier and needed for shorter horizons; tick data is enormous and only justified for microstructure or execution research. Choosing a resolution finer than the strategy needs multiplies storage and processing cost without improving the conclusion.
OHLCV and its hidden assumptions
The common bar format records open, high, low, close and volume for each period. It is compact but discards the path within the bar: you know the high and low occurred, but not in what order or at what time. This matters because a backtest that assumes it could transact at the bar's low or high is often assuming a fill it could never have achieved. Intrabar path ambiguity is a frequent, quiet source of look-ahead bias, and conservative logic should assume the worst plausible sequence within a bar.
Corporate-action adjustment
Raw prices are distorted by splits, bonuses, dividends and rights issues. A 5-for-1 split shows a raw price collapse of 80 percent that is not a loss at all, and an unadjusted series would trigger spurious signals. Back-adjusted series correct historical prices so returns are continuous across these events, but adjustment introduces its own subtleties: dividend-adjusted total-return series differ from price-return series, and rolling futures contracts requires a stitching convention. You must know exactly which adjustment your data uses, because it changes every computed return.
Point-in-time correctness
The most important and most neglected property is point-in-time correctness: each historical record must reflect only information available at that moment. Index constituents change, so a backtest must use the members as they stood on each date, not today's list. Fundamentals are restated, so as-reported figures, not later revisions, are what a real trader would have seen. Reference data such as sector classification or free-float also evolves. A dataset that silently applies today's knowledge to the past is a structural source of look-ahead and survivorship bias.
Gaps, errors and outliers
Real data is dirty. Feeds contain missing bars, zero or negative prices, bad ticks, duplicated rows, timezone misalignments and mislabelled holidays. A single erroneous print, such as a fat-finger tick at half the true price, can fabricate a trade that never could have happened and distort the whole equity curve. Cleaning is not optional housekeeping; it is a substantive modelling decision, because how you treat a gap, a suspension or an outlier directly changes which trades the backtest generates.
Sources and their trade-offs in India
Indian historical data is available from exchange archives, licensed vendors and broker APIs, each with different coverage, adjustment conventions and reliability. Free sources are convenient but often lack point-in-time constituent history, carry adjustment errors, or silently exclude delisted names. Reliable F&O backtesting also requires a coherent contract history with correct expiry and roll handling. The cost of good data is real, but it is small compared to the cost of trading a strategy validated on flawed data.
Practical example
Illustrative example (Indian market)
You backtest a Nifty 50 mean-reversion strategy on Rs 5,00,000 using daily data. Two data issues silently inflate the result. First, the universe is today's Nifty 50, so a name added recently after a strong run is credited with gains it earned before joining, a point-in-time error. Second, one stock's 1:1 bonus in the sample is unadjusted, showing a 50 percent overnight fall that your mean-reversion rule reads as an extreme buy signal, generating a large fictitious winning trade. After rebuilding with point-in-time constituents and properly bonus-adjusted prices, several of the best trades disappear and the edge shrinks to something far more modest.
On NSE, F&O contracts expire monthly, so a continuous backtest must roll from the expiring contract to the next and decide how to handle the price gap at roll. A naive concatenation that ignores the roll spread injects artificial jumps that a trend strategy can mistake for signals.
Advantages
- Correct data is the foundation every reliable metric depends on
- Point-in-time datasets structurally remove survivorship and look-ahead at the source
- Choosing the right resolution keeps research fast and affordable
Limitations
- High-quality point-in-time data is expensive and often licensed
- OHLCV bars hide the intrabar path, creating fill ambiguity
- Adjustment conventions differ between vendors, so returns are not directly comparable
- Deep history may reflect a market structure that no longer exists
Why it matters in practice
- Data quality sets the hard ceiling on backtest trustworthiness
- A brilliant strategy on flawed data is a flawed result, not a brilliant one
Common mistakes
- Using today's index constituents to backtest the past, importing survivorship bias
- Backtesting on unadjusted prices so splits and bonuses fire false signals
- Assuming fills at the bar's high or low, which the intrabar path may never have allowed
- Mixing price-return and total-return series without realising dividends change the result
- Concatenating futures contracts without handling the expiry roll
- Trusting a free feed without checking for missing bars, bad ticks and delisted names
Professional usage
Serious quant teams treat data as a first-class asset. They ingest from reputable sources, reconcile across vendors, store point-in-time snapshots so any historical date can be reconstructed as it truly was, and version the dataset alongside the strategy code. They document the adjustment convention explicitly and audit for gaps and outliers before a single backtest is run, on the principle that data errors are indistinguishable from alpha until you look.
Key takeaways
- Historical data is the raw material of every backtest and sets its ceiling
- Data must be corporate-action adjusted and point-in-time correct
- OHLCV bars hide the intrabar path, a quiet source of fill ambiguity
- Bad data is indistinguishable from a real edge until you audit for it
Frequently asked questions
What historical data do I need to backtest?
What is point-in-time data?
Why must prices be adjusted for corporate actions?
What resolution of data should I use?
What is the problem with OHLCV bars?
Can I use free historical data?
How does bad data create fake profits?
What is total-return versus price-return data?
How is futures data handled across expiries?
How much history is enough?
Does data quality really outrank strategy design?
What corporate actions matter most on NSE?
How do I detect data errors before backtesting?
Voice search & related questions
Natural-language questions people ask about Historical Data.
What is historical data in backtesting?
Why do I need to adjust old prices?
What does point-in-time data mean?
Can I just use free market data?
Why does data quality matter so much?
What is wrong with daily high-low bars?
Sources & references
Last reviewed 11 July 2026. Educational content only — not investment advice. Markets and rules change; verify current conventions with SEBI, NSE/BSE and your broker.