Chapter 1: Trading Mechanics and Market Structure
Standard asset-pricing models like the CAPM don't bother modeling how a trade actually happens — they assume it doesn't matter. This chapter is the book's rebuttal: real markets run on one of two prototype mechanisms, the rules genuinely change who captures the gains from trading, and — in the book's own words — this is also where algorithmic trading lives, down to a full case study of the May 2010 Flash Crash.
- Source
- Extracted directly from the chapter text in /references
- Companion lecture
- Covers similar ground to Lecture 1 of the video course — read independently
- Book part
- Part I — foundations of market microstructure
Why trading mechanisms aren't neutral
The CAPM and similar textbook models assume an auctioneer instantly balances all buy and sell orders at one equilibrium price — the trading mechanism itself never enters the model. Real markets don't work that way, and the rules genuinely matter: they determine what orders participants can place, what they can observe about others' orders, and how buy and sell orders get matched. Different rules don't just change how trading happens — they change who captures the gains from it, including how much goes to specialized intermediaries versus the traders themselves.
The two prototype mechanisms
Every real trading mechanism is a variation on two basic structures:
Limit order markets (auction markets) — final investors interact directly. Bids and offers consolidate into a limit order book (LOB) under price priority: higher bids and cheaper offers execute first. Example venues: BATS (US), Chi-X (Europe).
Dealer markets — final investors can only trade at the bid/ask quoted by specialized intermediaries ("dealers" or "market makers"). Quotes are not consolidated, so price priority isn't enforced across dealers. Example: the US and European corporate bond market — an OTC market where brokers must shop around dealers for the best price.
Many real markets are hybrids. NYSE-Euronext's European platform is a limit order market that lets designated dealers post quotes directly for some stocks. The London Stock Exchange runs SETS (a hybrid limit-order + market-making platform) for liquid stocks and SEAQ (pure dealer market) for fixed income and less liquid stocks.
Walking the book — what a real order book does to your price
The book gives an exact worked example. An investor wants to buy 900 shares. The ask side of the book has 800 shares available at $74.48 and more above that. A market order for 900 shares fills the first 800 at $74.48, then the remaining 100 at the next price, $75.74 — average execution price $74.62. A limit order at $74.48 or better executes the same way; below that, it waits in the book instead.
The quoted bid-ask spread (best ask minus best bid) was $0.06 before this order. The book distinguishes this from the weighted-average bid-ask spread for large orders — since a big buy order has to "walk up" the ask schedule and a big sell order has to "walk down" the bid schedule, the effective spread widens with order size. This is the book's own precise definition of market depth: a market is "deep" when the weighted-average spread barely rises with trade size.
- Context
- The book's own footnote extends this: buying 1,000 shares averages $74.76; selling 1,000 shares averages $74.38. The weighted-average spread for 1,000 shares is $0.38 — vs. the $0.06 quoted spread. As a % of mid-quote: 0.08% → 0.5%.
- Algo-relevant?
- Yes, directly. This is the exact mechanism every execution algorithm's market-impact model has to estimate before sizing an order.
- What's applied
- Slippage = average execution price − top-of-book quote. It scales with order size relative to depth at each level, not linearly with the quoted spread alone.
- Action
- An algorithm sizing a 1,000-share order here should split it, not fire it as one market order — the book itself shows submitting a limit order at $74.45 instead of a market order narrows the spread to $0.03, while the market order widened it to $1.58.
- Why
- Because "liquidity demanders" (market orders) consume the book and widen the spread, while "liquidity suppliers" (limit orders) replenish it — this is the book's own terminology, and it's exactly the taker/maker distinction every execution algorithm has to reason about.
Buy 900 shares as ONE market order: 800 × $74.48 + 100 × $75.74 = $67,358.00 → avg $74.62/sh. spread after this order widens from $0.06 to $1.58 Same need, but post a limit order at $74.45 instead: — waits in the book, spread instead NARROWS to $0.03 — the book's own point: liquidity takers widen the spread, liquidity suppliers narrow it. Same order, opposite market effect.
Order types beyond limit and market (Box 1.1)
The book's own list of order types beyond the basic two: a stop order triggers only once price crosses a threshold (a stop-sell caps losses on a falling stock). Good-until-cancel orders stay valid until cancelled; good-until orders expire on a set date; immediate-or-cancel (fill-or-kill) orders are only valid the instant they reach the market. Hidden orders sit in the book but aren't displayed — they execute like normal limit orders but lose time priority against displayed ones at the same price. An iceberg order shows only a fraction of its true size, revealing more only as it fills.
Iceberg and hidden orders exist specifically for algorithms working large positions without signaling size to the rest of the market — showing your full 50,000-share order invites other participants (including other algorithms) to trade ahead of you. Stop orders are the standing risk-management primitive most trading bots build their downside protection on directly, rather than needing to poll price and react in code.
Call auctions — trading in batches, not continuously
In a call (batch) auction, orders accumulate and clear all at once, at a single uniform price that maximizes executable volume. The mechanism traces back to Léon Walras, who modeled competitive market clearing on the Paris Bourse's own call-auction process. Today, most major exchanges (NYSE-Euronext, LSE, Italian and Madrid exchanges) use a call auction only to set the opening price before continuous trading starts — unfilled orders from that auction become the initial book for the day. The LSE's SETSqx runs four such auctions a day (alongside a dealer market) specifically for stocks too illiquid for continuous trading — concentrating scarce interest into a few moments rather than spreading it thin all day.
Opening and closing auctions are mechanically different from the continuous session — uniform pricing, no price priority to game, orders accumulate without executing. Algorithms that treat every part of the trading day the same will misbehave here; auction-imbalance strategies are a distinct algo category built specifically around predicting the clearing price and size from published imbalance data before the auction fires.
Dealer markets and inventory risk, in the book's own numbers
The book's example: Seller 4 wants to sell 60 shares. Dealer Beta quotes $324 bid / $330 ask. Seller 4 can sell at $324 or shop another dealer. If Beta buys, the shares go into Beta's inventory — exposing Beta to inventory risk (a price drop before Beta offloads the position). Beta manages this by trading with a customer on the other side, or with other dealers in the interdealer market. This wholesale segment is typically much larger than the retail one — a 2001 BIS survey found interdealer trading is about 80% of all FX market volume.
Dealer markets don't enforce price priority the way limit order books do — Seller 4 can trade with Beta even if Alpha quotes better, simply because dealer quotes aren't automatically consolidated. Where quotes are displayed (Nasdaq, LSE's SEAQ), the consolidated best bid/ask — the "inside spread" or "market touch" — is tighter than any single dealer's own spread: the market as a whole is more liquid than any one dealer.
- Context
- A seller with 300 shares, quoted dealers Alpha/Zeta at the best bid and Gamma/Lambda at the next best bid.
- Algo-relevant?
- Yes — this is smart order routing, described by the book almost verbatim.
- What's applied
- The seller splits the order: 75 shares each to Alpha and Zeta (best price), then 75 each to Gamma and Lambda (next best) — "walking down the aggregate demand curve" formed by stacking all dealers' bid quotes.
- Action
- An algorithm automating this compares all reachable dealers' quotes and their size limits, then splits the parent order across them in price order — exactly the aggregate-curve construction in the book's Figure 1.7.
- Why
- Because dealer quotes are only valid up to a limited size — treating one dealer as the whole market leaves money on the table that a multi-dealer sweep would have captured.
Sell 300 shares. Aggregate bid curve: Alpha, Zeta — best bid, 75 sh. each available = 150 sh. @ best price Gamma, Lambda — next best bid, 75 sh. each available = 150 sh. @ next price ───────────────────────────── 300 sh. filled by walking down the 4-dealer curve, not 1 dealer's limited quote size — this is literally what a smart order router automates across dealer markets
Hybrid markets and market transparency
The NYSE runs three mechanisms on the same stock simultaneously: an open-outcry floor, a dealer market with one "specialist" per stock (seven specialist firms as of 2009), and an electronic LOB that lets investors bypass both. On MTS (the European government bond interdealer platform), only "primary dealers" can post limit orders — everyone else can only submit market orders, making it simultaneously a limit order market and a dealer market by different definitions.
Transparency — how much trading information participants can see — varies independently of whether a market is limit-order or dealer-based. The book's own definition of the least transparent tier: dark pools of liquidity are platforms not open to everyone, used specifically by institutions that want to trade large blocks anonymously — attractive precisely because they avoid disclosing size and identity, which would otherwise move the price before the trade completes.
The book states plainly why institutions route to dark pools: to avoid disclosing size and identity that would move the price against them before their order completes. That's the exact justification a smart order router encodes when it decides to probe a dark pool before sweeping a lit exchange — the dark pool trade, if it fills, causes zero signaling cost. The book also notes opacity and fragmentation are "closely connected" — the more venues exist with partial visibility, the harder it is for any single participant (human or algorithmic) to see the true state of the market.
Does market structure actually matter? The real evidence
| Study | Change studied | Measured effect |
|---|---|---|
| Huang & Stoll (1996) | Nasdaq (dealer) vs. NYSE (limit order), matched stocks | Nasdaq trading costs ~2× higher, especially for small orders |
| Barclay et al. (1999) | SEC's 1997 Limit Order Display Rule + quote rule on Nasdaq | Immediate, substantial drop in Nasdaq trading costs |
| Boehmer, Saar & Liu (2005) | NYSE started releasing limit-order data (2002) | Drop in price impact of market orders |
| Edwards, Harris & Piwowar (2007) | US corporate bond transparency (2002, 15-min delayed trade reporting) | Significant decline in bid-ask spreads |
| Green, Li & Schürhoff (2010) | Treasury (liquid) vs. muni bond (illiquid) price reaction to news | Treasuries incorporate news far faster |
Every row in this table is a rule change that measurably shifted trading costs — sometimes overnight. A strategy's expected profitability is not fixed; it's a function of the exact rulebook of the venue it trades on, and that rulebook changes. Monitoring regulatory/market-structure changes on your target venue is not optional due diligence — it's a direct input to whether a backtested edge still exists after the rules move.
Why exchanges compete, and what it did to fees
Exchanges converged from wildly different 17th-19th century origins (Amsterdam 1602's outdoor trading, London's 1698 coffee-house price lists, the 1792 Buttonwood Agreement that founded the NYSE's precursor, versus continental exchanges like Vienna (1771) and Milan (1808) created by government decree specifically to trade state bonds) into today's model: publicly listed, for-profit companies. Trading fees are only part of their revenue — listing fees and data sales matter too, and the split varies sharply by region.
| Source | Americas | Europe | Asia |
|---|---|---|---|
| Listing fees | 25% | 7% | 12% |
| Trading fees | 34% | 42% | 47% |
| Other services (data, tech, clearing) | 39% | 45% | 35% |
Three forces intensified competition between exchanges: (i) capital-market liberalization made cross-listing and cross-border trading routine; (ii) Reg NMS (US, 2005) forced platforms to re-route market orders to whoever posts the best price, and MiFID (EU, 2007) abolished rules forcing investors to route orders to their national market — both directly fueled competing platforms (Chi-X, Turquoise, BATS Europe, NYSE Arca Europe); (iii) falling technology costs made launching a new electronic venue (an ECN/ATS/MTF) cheap — Island/INET, Archipelago, Instinet, BATS all emerged this way, alongside smart order-routing technologies that let brokers split orders across venues to chase the best price. Incumbents responded by merging (Euronext 2000, NYSE-Euronext 2007) and cutting fees — Euronext cut fees 50% in 2004 after LSE threatened to launch a competing Dutch-stock platform.
Reg NMS's order-protection rule is the literal legal reason smart order routing exists as required infrastructure in the US, not just a nice-to-have optimization — a broker that fails to route to the best-priced venue is violating the rule. This is the regulatory grounding behind the smart-order-router logic already covered as a strategy category: it isn't just profitable, in the US equity market it's mandatory.
Automation, algorithmic trading, and the Flash Crash
The NYSE's electronic path started with DOT in 1976 (electronic submission, manual floor execution) and only went fully electronic in 2006. By 2009, 101 of 120 countries studied had electronic trading, 85 with no floor trading left at all. Latency — the gap between a quote update and its public release — is now measured in milliseconds, and platforms compete on it directly.
The book (citing the SEC, 2010) classifies algorithmic trading into four types:
Submitting non-marketable limit orders on both sides, functionally like a dealer. Named firms: GETCO, Optiver, ATD. They aim to close every day flat (no inventory), and unlike traditional dealers, they don't deal directly with clients — only on LOBs, competing with other limit-order traders.
Exploiting transient price gaps between related securities. Book's example: French stock Alcatel trades on both Chi-X and NYSE-Euronext — if Chi-X's bid exceeds NYSE-Euronext's ask, buy on one, sell on the other. Profitable only if both legs execute almost simultaneously.
Trading on information not yet in the price — e.g. sending buy market orders the instant a bullish news release hits, to pick off sell limit orders whose prices haven't caught up yet. Speed against other directional traders is the entire edge.
Smart order-routing technology breaking a large parent order into pieces across venues and/or time to minimize total trading cost. This is the category directly implicated in the Flash Crash below.
The evidence is genuinely mixed. Hendershott, Jones & Menkveld (2011) find algorithmic trading on the NYSE coincided with narrower effective spreads, mainly by reducing the adverse-selection component dealers charge. Hendershott & Riordan (2009), using Deutsche Börse data where algo use is declared for fee purposes, find algorithmic traders supply 50% of liquidity and demand 52% of it — and that their quotes carry more information than human traders' quotes. Against this, Paul Krugman argued in 2009 that high-frequency trading is "a kind of tax on investors who lack access to those superfast computers" — a private cost with no offsetting social gain. Other concerns the book raises directly: correlated algo strategies amplifying volatility, "fat finger" errors, and quote stuffing — deliberately flooding a venue with orders and cancellations to manipulate the information other participants see.
The Dow fell 9% intraday, then rebounded 5% by close — its second-largest intraday swing ever, roughly $1 trillion in market value lost and mostly recovered within one 30-minute window. Individual stocks were far more extreme: Accenture fell from $40 to $0.01 (over -99%); Sotheby's rose from $34 to $99,999.99. The CFTC-SEC joint report traced the trigger to a single large sell order: a mutual fund sold 75,000 E-mini S&P 500 futures contracts using a "constant participation rate" execution strategy — sizing each child order as a fixed % of trading volume over a given window. The order exhausted available buyers, which triggered further selling by high-frequency traders, spreading the crash from futures into the stock market within minutes. By 2:45pm, order-book depth across the E-mini, the SPY ETF, and S&P 500 constituent stocks had collapsed to roughly 20% of its level 15 minutes earlier, before new limit orders gradually rebuilt the book and prices recovered.
- Context
- A constant-participation-rate (CPR) algorithm sizes each slice as a fixed % of measured trading volume — a very standard execution technique, and exactly what malfunctioned here.
- Algo-relevant?
- Yes — this is a real, well-known execution-algorithm design flaw, not a hypothetical.
- What's applied
- The child order itself counts toward the volume the algorithm measures — the denominator includes its own numerator. This creates mechanical self-reinforcement even before any panic reaction from other traders.
- Action
- A naive CPR bot keeps selling more as measured volume rises — without checking whether that volume is organic buying interest or just its own prior slices being counted back.
- Why
- Because when the book itself is thin (as during the crash) and other algorithmic market makers pull their quotes in response to the price move, the same participation-rate target consumes far more price levels — turning a purely mechanical sizing rule into a cascading price impact.
Target: sell at 10% of trading volume in each window Naive version — target 10% of TOTAL measured volume: if organic volume = V, and the child order itself also counts as volume: child = 0.10 × (V + child) child × 0.90 = 0.10 × V child = 0.1111 × V ← ~11% inflation vs. the intended 10%, from math alone A safer design breaks this loop directly: child = 0.10 × V_organic_only (exclude the algo's own prior fills from the volume count) + a hard cap on price impact per slice, halting/slowing if execution price moves beyond a set tolerance — the safeguard absent on May 6, 2010
Before moving to Chapter 2
- 1
Graph the total market demand and supply curves for a call auction with these orders, and find the market-clearing price and quantity: buy limits 100@$3.00, 200@$4.00, 200@$3.50, 500@$2.50; sell limits 500@$5.00, 600@$3.00, 500@$4.00; market buy 500 total; market sell 200 total. Are all executable orders at the clearing price fully filled?Chapter's own Exercise 1
- 2
Now assume the same orders arrive one at a time, in the order listed, on a continuous market. Track the LOB after each arrival (in the trading-screen format from §03 above) for t=0…9, including any transactions and the resulting bid-ask spread from t=5 onward.Chapter's own Exercise 2
- 3
Compare the two markets from exercises 1 and 2: assume limit prices equal each trader's true valuation, and market orders come from traders valuing the asset far outside the trading range. Which market ends up Pareto efficient (no pair of remaining traders could still benefit by trading with each other)? Why, intuitively?Chapter's own Exercise 3
- 4
Pull up Level 2 data for a stock you actually trade and watch the ask side deplete as a large market order fills — compare the average fill price to the pre-trade best ask, the way this chapter did with the $74.48/$74.62 example.
The chapter's own algo-trading taxonomy, applied
Unlike an outside framing, this taxonomy is the SEC's own official classification, cited directly in the chapter. A safer, guarded version of the "order splitting" category — the one implicated in the Flash Crash — looks like this:
// order-splitting execution algo, with the Flash Crash's failure mode guarded against target_participation = 0.10 // §10 — CPR strategy type // on each new volume window: organic_volume = measured_volume − my_own_recent_fills // breaks the self-reference loop child_size = target_participation × organic_volume // pre-trade check, absent on May 6, 2010: if projected_price_impact(child_size, current_book_depth) > max_impact_tolerance: child_size = reduce_to_fit(max_impact_tolerance) // §03 — depth-aware sizing OR pause_and_reassess() route_child_order(child_size) // §06/§09 — across dealers/venues, price priority first
Every line traces back to something in this chapter: the volume self-reference fix responds directly to the Flash Crash mechanism (§10); the impact check is the book's own depth/weighted-spread concept from §03, applied as a live guardrail instead of an after-the-fact measurement; and routing across venues is §06/§09's dealer-aggregation and Reg-NMS-mandated order protection, respectively.