Learn Algo Trading Step by Step

Week 5: Understand Market Data

Back to Learn Algo Trading Step by Step
Lesson 6 of 14·intermediate
Written by Amit Khari·Reviewed by Pramita Singh·Published on 30 August 2026·Last updated on 30 August 2026

Week 5: Understand Market Data

The quality and structure of market data can materially affect backtesting results. A backtest is only as dependable as the data and assumptions used to create it.

Learn about

  • Open, high, low, close prices and trading volume
  • Candle intervals and when a candle is actually complete
  • Adjusted vs unadjusted stock prices and corporate actions
  • Missing candles
  • Futures contract rollover
  • Options strike and expiry data
  • Timestamp and time-zone handling
  • Live data vs delayed data

Critical rule: an algorithm working with five-minute candles must know when a candle is complete. Using its final closing value before the interval has ended creates look-ahead bias — one of the most common backtesting errors.

Practical exercise

Download historical candle data for one liquid instrument and check:

  • Whether any trading days are missing
  • Whether timestamps are in IST
  • Whether holidays are excluded
  • Whether volume appears reasonable
  • How stock splits and dividends are handled
  • Whether the data covers the market conditions you need to test

Week 5 outcome

You should understand that clean, complete, correctly-timestamped data is a precondition for every result that follows.

This lesson is for educational purposes only. It is not investment advice, a recommendation or an assurance of returns. Trading and derivatives involve substantial risk, and backtested or paper-trading results do not guarantee future performance.

About the author

Amit Khari
Amit KhariContributor, LiveWorldMarket

NISM-Series-X-A Investment Adviser Level 1 examination completed

Amit writes about Indian equity markets, technical analysis, macro themes and the day-to-day mechanics of trading, with a focus on making the flow of global markets legible for retail investors. He has completed the NISM-Series-X-A Investment Adviser Level 1 examination.