Understanding Market Data
Every chart you will draw, every indicator you will code and every backtest you will run in the rest of this course is a transformation of a table of numbers. Part 1 was about where those numbers come from — the exchange, the order book, the trade that printed. This part is about the table itself: what it holds, what it silently omits, and the specific ways it is wrong.
That sounds like housekeeping. It is not. Almost every spectacular backtest result that turns out to be an illusion is an illusion about data rather than about logic. The formula was fine. The prices it was fed had been adjusted for splits in a way the formula did not know about, or the database contained only companies that were still listed when the database was built, or a single mistyped print inflated one bar’s high by fifteen per cent and the volatility filter downstream never recovered. None of those faults produce an error message. They produce a plausible number, which is far worse.
What changes for you in this part
Section titled “What changes for you in this part”You arrive able to read a candlestick. You leave able to say, precisely, which questions a bar of data can answer and which it structurally cannot — and to say it before you write the formula rather than after the result surprises you.
Concretely, by the end of this part you should be able to:
- name the six fields AmiBroker stores for every symbol, and explain what each one discards;
- explain why the order of events inside a bar is unrecoverable, and what that costs a backtest that uses stops;
- describe how bars are built from trades, why compression is one-directional, and why the base time interval of a database is effectively a permanent decision;
- state what a split adjustment and a dividend adjustment each do to a price series, and choose the right series for a given question rather than the one that happens to be in the file;
- recognise the six common defect classes on sight, and run a mechanical check that finds them;
- define survivorship bias in terms of what is being estimated, quantify roughly how much it can move a result, and say honestly what you can still conclude when you do not have point-in-time data.
What you need before you start
Section titled “What you need before you start”Nothing is installed yet — AmiBroker itself arrives in Part 3. This part is mostly argument and arithmetic, and it deliberately comes first, because the decisions it describes are made when you create a database and are painful to reverse afterwards.
Two of the lessons show AmiBroker Explorations. You will not be able to run them until Part 12, and they are marked where they appear. Read them now for the checks they name; come back and run them when you have a database.
The lab at the end needs one thing only: a file of end-of-day prices for a single liquid instrument, at least two hundred rows, with date, open, high, low, close and volume columns, obtained from any free source. A spreadsheet is enough to complete it. There is a second track for readers who already have AmiBroker installed, but no part of the lab requires a paid data subscription, and no part of it requires you to have written any AFL.
A note on the numbers in these lessons
Section titled “A note on the numbers in these lessons”Every illustrative figure in this part is synthetic and labelled as such. Where a number needs to be real — a defect count, an adjustment factor, a delisting date — the lesson tells you how to produce it from your own data rather than quoting one from mine. That is not caution for its own sake. A data-quality lesson that asked you to trust its data would be a strange thing.
0 / 6 lessons in this part completed
Progress tracking needs browser storage, which is unavailable here. The course works exactly the same without it.
- LessonOHLCV and What a Bar Hides22 min
- LessonTimeframes, Ticks and How Bars Are Built24 min
- LessonSplits, Dividends and Adjusted Data24 min
- LessonData Defects in Practice22 min
- LessonSurvivorship, Delistings and Index Membership25 min
- LabLab: Prove That Bad Data Breaks Analysis45 min
Sources for this lesson
2 verified · checked 2026-08-31
- 01AmiBroker User's Guide — Understanding how AFL works§ What is an Array?amibroker.com/guide/h_understandafl.html2026-08-31
- 02AmiBroker User's Guide — Database Purify windowamibroker.com/guide/w_purify.html2026-08-31
Every technical claim on this page was checked against the official AmiBroker documentation on the date shown. Where the course disagrees with folklore, the source is how you can tell which one to trust.