Behavioral Finance & Microstructure
Trading and Exchanges: Market Microstructure for Practitioners
Harris explains who is on the other side of every trade and what they charge for being there. For an investor the payoff is a number: the round-trip cost of a strategy, measured on your own fills, set against the edge you expect it to earn.
The big picture
Harris, an economist who served as chief economist of the US Securities and Exchange Commission from 2002 to 2004, wrote the practitioner's map of market microstructure — the study of how orders turn into prices. The book sorts traders by why they trade: informed traders who act on information not yet in the price, liquidity suppliers such as dealers and limit-order traders who stand ready to buy and sell, and utilitarian traders who trade for reasons outside the price itself, such as hedging, investing savings or rebalancing. The core bet: the bid-ask spread and the price move after a trade are not friction to ignore but the fee liquidity suppliers charge, and its size follows from who else is trading.
Why it matters for a portfolio: every strategy pays that fee twice per round trip, plus the extra price move a larger order causes. An edge of a few tenths of a percent can disappear into costs that never show up as a line on a broker statement. Measuring those costs on your own trades is the difference between a backtest and a result.
The 3 strategic pillars
-
Who is on the other side
Markets are an ecosystem of traders with different motives, and the mix decides how costly it is to trade.
Liquidity suppliers profit from utilitarian traders, who pay the spread without an information edge, and lose to informed traders, who trade just before the price moves their way. A market with more informed flow forces suppliers to quote wider. Your own order is judged by the same test: does the price keep moving after you trade?
-
Why spreads exist
The spread pays for three things: the cost of processing orders, the risk of holding unwanted inventory, and the losses to better-informed traders (adverse selection).
The effective spread, twice the distance between your fill and the quote midpoint, splits into a realized spread (what the supplier keeps once the midpoint has moved on) and price impact (how far the midpoint moved in the direction of your trade). A large impact share signals informed flow. Roll's estimate backs a spread out of daily prices alone: the bounce between bid and ask makes successive price changes negatively correlated.
-
Order types and market structure
A market order buys immediacy and pays the spread; a limit order supplies liquidity and risks not being filled or being filled just before bad news.
Order-driven markets match public limit orders, quote-driven markets rely on dealers, and many venues mix both. Empirical work on large orders finds that their price impact grows roughly with the square root of their share of daily volume, which is why size, not just the quoted spread, sets the cost. Amihud's measure, return per unit of dollar volume, ranks how easily a name absorbs flow.
What a Closelooknet reader does with it
The working use is a cost audit before and after you trade. Take your broker's fills with the quotes around them and compute the effective spread and how much of it was price impact. From daily closes and dollar volume, estimate how illiquid each holding is and what an order of your size would cost with a square-root impact assumption. Then add spread, impact on both legs and fees into one round-trip number and set it against the edge you expect per trade. The mistake it prevents is the backtest that ignores trading costs: a strategy that looks profitable at the midpoint and quietly transfers its edge to the liquidity suppliers once it trades.
The bridge to the Closelooknet approach
The spread is the everyday cost Harris dissects; the bid-ask spread glossary entry gives the short definition. For fund investors the same arithmetic hides inside tracking difference, the gap between a fund's return and its index: trading costs inside the fund show up there, not in the headline fee. The 101 on tracking difference explains why that number beats the TER as a cost measure, and the ETF hub publishes it for benchmark funds. The impact formula needs volatility as an input; realized volatility covers how to measure it. For the behavioral side of the same cluster, Misbehaving explains why traders keep paying these costs through overtrading, and the diary's own fills are public in the trade log.
Action-Kit — from theory to practice
Tooling & data
| What you need | Where to get it | Cost |
|---|---|---|
| Broker execution report (CSV) Your fills with time and price, the raw material for effective spread and price impact | Your own broker's trade confirmations or transaction export Add the bid and ask at the time of each fill; some brokers report them, otherwise take them from a quote history. | Free |
| Historical quote and trade data Bid, ask and the midpoint a few minutes after each trade, for the realized-spread and impact split | Databento Usage-based pricing with an introductory credit for new accounts; buy only the instruments and days you need. | Paid |
| Daily prices and volume Closes and share volume for Roll's spread, Amihud illiquidity, volatility and average daily dollar volume | Yahoo Finance historical data Dollar volume = close × shares traded; compute it in the sheet before loading. | Free |
The formulas
-
Effective spread and its split
effective = 2 × |P − M| / M; realized = 2 × d × (P − M₊) / M; impact = 2 × d × (M₊ − M) / M- P — trade price
- M — quote midpoint before the trade, (bid + ask) / 2
- M₊ — midpoint a fixed time after the trade, e.g. 5 minutes
- d — +1 for a buy, −1 for a sell
Signed by side, effective = realized + impact. The impact share is the part lost to information; the realized part is what the liquidity supplier kept.
-
Roll's implied spread
s = 2 × √(−cov(ΔPₜ, ΔPₜ₋₁))- ΔPₜ — price change from one period to the next
- cov — sample covariance of each change with the previous one
Only defined when the covariance is negative. Noisy on daily data; use it as a cross-check.
-
Amihud illiquidity
ILLIQ = average(|rₜ| / DVolₜ) × 1,000,000- rₜ — daily return
- DVolₜ — daily dollar volume
Price move per million of volume; higher means a name absorbs flow less easily.
-
Square-root impact and the survival check
impact ≈ k × σ × √(Q / ADV); round trip = spread + 2 × impact + 2 × fees; net = edge − round trip- k — impact coefficient, the reader's own assumption
- σ — daily volatility
- Q — order size per side; ADV — average daily dollar volume
- edge — expected gross return per round trip
The pack also solves for the order size at which net edge reaches zero.
Applied Pack · free members
Harris Applied Pack
A spread and liquidity calculator for your own trades: what the round trip really costs, how much of it was information, and whether your expected edge survives.
- Harris_Spread_Liquidity_Calculator.xlsx — READ ME, a Spreads sheet (quoted, effective, realized spread and price impact per trade), a Roll & Amihud sheet (implied spread, illiquidity, volatility, ADV from daily data) and an Impact & Edge sheet (square-root impact, round-trip cost, net edge, breakeven order size, size × k sensitivity), all with live formulas and amber input cells (EXAMPLE rows included)
- harris_liquidity.py — stdlib-only CLI: reads a trades CSV and a daily CSV and prints per-trade spreads, liquidity measures and the cost-versus-edge check
- trades_sample.csv and daily_sample.csv — EXAMPLE_ placeholder data in the expected format
- README.txt — inputs, formulas, how to run, and the educational-use disclaimer
Pack security
Macro-free Excel · plain-text Python you can read before you run it · no installers, no network access — the code works only on files you provide. Served only from closelook.net; we never distribute through download portals or email attachments. How to verify in 30 seconds →
SHA-256 125d47af535f9a6a6ea4b499fd7564cc8adaf43f55e960aedac8005b79e85325
The pack is a free-membership download — no card, free forever. Membership also delivers the Daily Pulse and Weekly Signal to your inbox.
Join the Look — free → Already a member? Sign in →
Educational templates — a research diary companion, not investment advice.
Closelooknet publishes a market diary, not investment advice. This condensed read restates the book's ideas in our own words for education — for the author's full argument, go to the source.