Financial Data and API Basics

Historical candles, order book snapshots, fundamentals, news — each data type captures something different, and each carries its own way of quietly misleading a test that isn't careful about it.

~17 minsBuilds on Quant Factors2 Interactive Labs
Database, clock, and receipt representing data sources
Learning Goals
  • Describe historical candles, order book snapshots, reference data, and news data.
  • Explain survivorship bias in a historical dataset.
  • Explain lookahead bias from using revised or restated data.
  • Recognize why data timestamp accuracy matters for historical testing.
  • Check a dataset's known limitations before trusting a result built on it.
Downloaded does not mean research-ready

A stock appears to crash 50% overnight — but it was a 2-for-1 split

Adjusted price series account for corporate actions such as splits and distributions so historical returns remain economically comparable. Raw prices can create false signals when used blindly.

Data Debugging Lab

The backtest suddenly made 300%. Debug the data before celebrating

All six records look superficially plausible. Identify the most likely issue. Time zones, missing bars, splits/unadjusted prices, stale quotes, and unit errors can all manufacture performance.

2026-03-09 09:30 is treated as the first bar of the local market session, but no time zone is stored.

What should you investigate first?

The minute series jumps from 10:14 to 10:17 while a three-consecutive-bar rule keeps calculating.

What should you investigate first?

A stock falls from 120 to 12 overnight while volume scales by roughly 10×.

What should you investigate first?

Quotes shown at 15:58, 15:59, and 16:00 are identical while the source timestamp remains 15:57.

What should you investigate first?

One gold column is 4350 and another is 139.9; the strategy subtracts them directly.

What should you investigate first?

Daily records include trading date, time zone, adjustment flag, and source timestamp.

What should you investigate first?

Debug correct: 0/6

Data QA comes before strategy performance. An unusually beautiful backtest is first a reason to inspect the pipeline, not a reason to announce alpha.

Four Data Types

Each Data Type Captures a Different Slice of the Market

Historical candles summarize price over an interval. An order book snapshot captures a single instant of resting orders. Reference and fundamental data describe a company or instrument. News and alternative data capture text or sentiment around an instrument. None of these are interchangeable — using the wrong one, or misunderstanding what it actually represents, is a common source of research errors.

Candles

Price over an interval

Open, high, low, close, and volume — a summary, not every trade.

Order book

A single instant

Resting orders as of one snapshot, not a promise about what remains available.

Fundamentals

Company or instrument data

Can be revised after the fact — the version available today may not match what was known historically.

Data Source Explorer

Compare Four Data Types and the Caveat Each One Carries

Switch between four common data types and read the specific caveat that goes with each one.

A

Historical Candles

Open, high, low, close, and volume aggregated over a fixed time interval. Different providers can compute the same interval slightly differently — always confirm how a specific source handles gaps and adjustments.

B

Order Book Snapshot

A snapshot of resting buy and sell orders at one specific moment. A snapshot only shows a single instant — the book can change substantially between the snapshot and any decision based on it.

C

Reference & Fundamental

Company financials, index membership, or other descriptive data about an instrument. Fundamental datasets can be revised or restated after the fact, so using today's version to test historical periods can introduce lookahead bias.

D

News & Alternative Data

Text, sentiment scores, or other non-price data collected around an instrument. The exact timestamp a data point became publicly available matters — testing as if it was known earlier than it actually was distorts results.

Survivorship and Lookahead Bias

Two Ways a Dataset Can Quietly Distort a Historical Test

Survivorship bias happens when a dataset only includes assets that still exist today, silently excluding the ones that failed or were delisted — exactly the cases most likely to drag down a historical result. Lookahead bias happens when a test uses information — like a revised financial figure — that wasn't actually available at the historical point being tested.

Data Quality Audit

What Data Pitfall, If Any, Is Present?

Pick a case and judge whether the described data practice introduces a known pitfall or correctly avoids one.

A

Survivorship bias

A backtest only includes companies that are still listed today, excluding any that were delisted or went bankrupt during the tested period. This suffers from survivorship bias, since the excluded companies were disproportionately likely to have performed poorly.

B

Lookahead bias

A backtest uses a company's currently published financial figures to test a strategy over a period before those figures were revised or finalized. This introduces lookahead bias, since the information used wasn't actually available at that historical point in time.

C

Timestamp checked

A researcher confirms the exact timestamp each news data point became publicly available before using it in a historical test. This correctly avoids testing with information before it was actually available.

Data Sourcing Checklist

Four Checks for a Dataset You Can Trust

1

Coverage

Does the dataset include assets that failed or delisted, or only survivors?

2

Revision history

Is the data as it appeared historically, or a later-revised version?

3

Timestamp accuracy

Is the exact availability time of each data point known and correct?

4

Snapshot vs. continuous

Does the data represent a single instant or a continuous record?

CheckWhy it mattersWhat it cannot establish
Source and timestampMakes the input and its timing reviewableThat the source is complete or unbiased
Cleaning ruleMakes transformations repeatableThat a transformed result will hold outside the sample
Data Provenance

A Dataset Is Only as Strong as Its Source Chain

Know what each data type actually captures

A snapshot, an interval summary, and a text record are not interchangeable.

Check for survivorship bias

A dataset missing failed or delisted assets skews results optimistically.

Match data availability to the test period

Using revised or future data in a historical test introduces lookahead bias.

Knowledge Check

Put Your Understanding to the Test

Submit your answers to see detailed explanations.

Question 1 of 3

A backtest dataset only includes companies still listed today, excluding any that were delisted or went bankrupt. What is the risk?

Question 2 of 3

A test uses a company's currently published financial figures to evaluate a strategy over a period before those figures were finalized. What issue does this create?

Question 3 of 3

A fundamentals dataset stamps each figure with the quarter the value describes, not the date it was published. A test reads each figure on its stamped date. What is the problem?

Meet Your Mentor

Stuck? Ask Mira to Break It Down

Describe the dataset you're working with, and Mira can help you think through survivorship bias, lookahead bias, and timestamp accuracy — it won't fetch or validate live data for you.

Checking sign-in status...