Market Data Engineering

Market Data Engineering & Feed Quality

Your strategy is only as good as your data.

A curriculum covering the data layer of automated trading: feed types, consolidated versus exchange-direct data, timestamp synchronization, corporate action adjustments, symbol master challenges, late and corrected data handling, gap detection, point-in-time storage, and data quality assurance.

By Swoopr Editorial Team

Published · Updated

AI-assisted content · Swoopr Investment is responsible for the final published article.

A sleek, modern workspace featuring trading monitors and a tablet for project management.
Photo by Jakub Zerdzicki via Pexels

What this hub covers

Every trading strategy depends on market data. Bad data does not merely reduce alpha. It creates phantom signals, corrupts backtests, and causes live systems to act on prices that never existed. This hub covers the engineering discipline that sits between raw exchange feeds and the clean, reliable data a strategy can actually use.

You will learn the four primary feed types and when to use each, how consolidated SIP feeds differ from direct exchange connections, how timestamps are assigned and why clock drift matters, how corporate actions must be reflected in historical prices, how to detect and handle late and corrected prints, how to build point-in-time storage that prevents lookahead bias, and how to build automated QA pipelines that catch feed failures before they reach your strategy.

Key principles

Curriculum: Market Data Engineering & Feed Quality

Ten guides and three interactive tools covering the full data pipeline: from raw exchange feed to clean, QA-verified, point-in-time data ready for strategy research and live execution.

Guides

Interactive Tools

Frequently Asked Questions

What is the difference between a trade feed and a quote feed?

A trade feed (also called time and sales) reports each completed transaction: timestamp, price, size, and exchange condition codes. A quote feed reports the current best bid and offer, including size available at each price. Trade feeds tell you what happened; quote feeds tell you what is currently available. Most trading strategies need both: trades to confirm momentum and volume, quotes to measure spread and depth before entering.

Why does using raw historical prices without corporate action adjustment corrupt backtests?

When a stock splits 2-for-1, the price halves overnight. A backtest reading unadjusted prices sees what looks like a 50% gap-down, triggering phantom sell signals and wildly distorting percentage returns. Dividend distributions create similar artificial drops. Without backward adjustment, every corporate action becomes a false signal. The adjustment factor multiplies all pre-event prices so the continuous series represents economic return without discontinuities caused by capital structure changes rather than market moves.

What is point-in-time storage and why does it prevent lookahead bias?

Point-in-time storage attaches a "known-as-of" timestamp to every record in addition to the event timestamp. When a backtest replays history, it queries only records whose known-as-of timestamp is on or before the simulation date. This means the backtest sees exactly the data that was available at each decision point, including data that arrived late or was subsequently corrected. Without point-in-time storage, loading today's clean database into a historical backtest exposes it to corrections and additions that would not have been visible in real time, inflating backtest performance.

What is the SIP feed and how does it differ from direct exchange feeds?

The Securities Information Processor (SIP) consolidates trade and quote data from all US equity exchanges into a single stream. CTA (Consolidated Tape Association) covers NYSE-listed securities; UTP (Unlisted Trading Privileges) covers Nasdaq-listed securities. Direct exchange feeds bypass the SIP and deliver data faster, typically 1 to 10 milliseconds faster, but require separate connections to each exchange. The SIP is sufficient for most retail and systematic strategies. Firms competing on execution latency in sub-second timeframes use direct feeds.

What causes bad ticks in market data and how should they be handled?

Bad ticks are erroneous price or volume prints in the raw feed. Common causes include fat-finger trades later cancelled by exchanges, test orders that leaked to the tape, data feed encoding errors, and exchange system glitches. In real-time systems, trades marked with certain condition codes (error, cancel) should be excluded from signal calculations. In historical data, bad ticks usually manifest as extreme outliers, prices far outside the session range or volumes orders of magnitude above normal, and can be detected with z-score or inter-quartile range filters applied per symbol before using the data for research.

How does clock skew between a trading system and an exchange affect backtest accuracy?

Most exchange timestamps are set by atomic clocks synchronized via PTP (Precision Time Protocol) to within microseconds of UTC. A trading system whose clock drifts even a few milliseconds will record receipt timestamps that are earlier or later than the actual market event. In backtesting, if the strategy logic uses receipt timestamps as decision points rather than exchange timestamps, even 5 milliseconds of drift can shift which bar a trade appears in, change signal trigger times, and make a strategy look faster or slower than it actually was. Synchronizing servers via PTP and preserving exchange timestamps alongside receipt timestamps is the correct approach.

References