Learn
Lesson · Algorithmic and Automated Trading

Market Data Ingestion and Normalization

Receive historical and streaming data, validate timestamps and symbols, remove duplicates, handle late events, and expose one normalized market-data model.

Review concepts
Core concepts

What to understand

Keep the boundaries, state, and authority explicit.

1

Event time

The time the market event occurred, distinct from the time the system received it.

2

Normalization

Convert provider-specific messages into one internal schema with consistent units and identifiers.

3

Data health

Measure gaps, duplicates, lateness, sequence errors, and feed freshness continuously.

Interactive lab

Streaming Data Quality Lab

Inject duplicates, delays, missing events, and out-of-order messages. Compare raw and normalized strategy input.

Streaming Data Quality Lab

Deterministic synthetic educational data · no broker or live-market connection

SYSTEM MODEL
Process

Validate before publishing

Downstream strategies should not reimplement provider-specific cleanup.

1

Receive

Authenticate and capture the original provider message.

2

Validate

Check schema, sequence, timestamp, price, volume, and freshness.

3

Publish

Emit a normalized event with provenance and quality status.

Knowledge check

Check your understanding

Select one answer for each question. Feedback appears immediately, and a wrong choice is answered on its own terms before the rule is restated.

1. Why preserve event time and receive time?

2. A duplicate trade event can cause:

3. Normalization should occur:

4. An event is stamped 10:15:02.000 by the provider and received at 10:15:09.500; the maximum feed age is 5 s. How late is it, and what does the normalizer do?

Practical rules

  • Store provider timestamps and system receive timestamps.
  • Deduplicate with stable event identifiers or sequence rules.
  • Stop or degrade trading when data freshness exceeds a defined limit.

Common mistakes

  • Treating arrival order as market order.
  • Silently filling missing values without quality flags.
  • Mixing adjusted historical prices with unadjusted live prices.
References

Official reading

These sources cover algorithmic controls, market access, broker APIs, system operations, or security.

Alpaca · WebSocket Market Data
Official example of receiving real-time stock, option, crypto, and news updates over a streaming API.

Open official reference ↗

FINRA · Regulatory Notice 15-09
Official guidance on supervision, testing, controls, documentation, and monitoring for algorithmic trading strategies.

Open official reference ↗

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.