3
Market Microstructure
Market prices result from an engine that matches supply and demand under explicit rules. These matching engine rules determine what the data means (what counts as a trade, a quote, a “close”), and what a strategy can realistically earn once spreads, depth, and execution constraints come into play. We lay the foundation for working with modern market data, from parsing raw exchange messages to reconstructing order books and sampling tick-level data into bars whose statistical properties match how information arrives.
Consider a simple momentum rule: buy when the price rises above its 20-day moving average. A naïve backtest might use daily closes and assume immediate fills at the bar’s end price. In live markets, execution ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access