The one rule
Your data must be at least one level finer than your decisions. If you decide on 5-minute bars, test on 1-minute data so fills and stops land where they really would have. If you trade the order book, you need tick data — nothing else shows the sequence of trades inside a bar.
How big is “a year” of data?
The same “one year of 1-minute data” means very different things across markets, because the sessions are different lengths.
That difference matters for storage, for test run times, and for statistics. A crypto strategy sees five to six times more bars per year than an Indian equity strategy — so “three years of data” is not a like-for-like comparison across markets.
Match the data to the strategy
| Strategy | Minimum data | Why |
|---|---|---|
| Positional / swing | End-of-day, adjusted | Decisions are daily; corporate-action adjustment matters more than granularity |
| Intraday breakout | 1-minute | Stops and targets fill inside the bar you trade on |
| Options selling | 1-minute + expired contracts + OI | Premiums, rollovers and positioning all move intraday |
| Order flow / footprint | Tick with bid/ask | Delta and imbalance need every trade and its side |
| Market Profile | 1-minute is enough | Profiles are built from time at price, so minute resolution captures it |
This is also why the Mirra Market Profile works well on minute data, while Mirra Order Flow needs a tick-level feed to build its footprint.
Four errors that quietly ruin backtests
1. Survivorship bias
Testing only on stocks that still exist today ignores every company that was delisted, merged or collapsed. Results look better than any real trader could have achieved.
2. Missing expired contracts
F&O strategies need the contracts that expired. A “continuous” series stitched without care introduces fake gaps at every rollover.
3. Unadjusted corporate actions
A 1:1 bonus halves the price overnight. Unadjusted, your system sees a 50% crash that never happened.
4. Look-ahead in the data itself
End-of-day values used before the close, or open interest that is only published after the session, make a strategy look prescient. Know when each field actually became available.
Before you run it
- Data one level finer than your decisions.
- Expired contracts and delisted symbols included.
- Prices adjusted for splits, bonuses and dividends.
- Every field used only after it was actually published.
- Session times set correctly for each market — the exchange-session guide shows why this changes every statistic.
Next in this series: how to turn a tested idea into a live algo, step by step.
Frequently asked
Is 1-minute data good enough for intraday backtests?
For most bar-based intraday strategies, yes. It is not enough for order-flow strategies, which need tick data with trade side.
How many years of history should I test on?
Enough to include at least one strong trend and one long range for that market. For Indian indices that usually means several years.
Why do my backtest and live results differ?
Most often: fills assumed at the bar close, missing costs, or data errors like the four above.
- Session lengths from NSE, MCX and standard forex and crypto trading hours; bar counts calculated from them.
Educational content only — not investment advice. Trading in securities, derivatives, crypto and forex involves substantial risk of loss.