Financial Markets Microstructure · Lecture 1
Financial Markets Microstructure — Egor Starkov, University of Copenhagen

Lecture 1: Concepts and Institutions

Real markets don't clear at one price the way an economics textbook says they do. This lecture lays out why — and introduces the bid-ask spread, liquidity, and market structure, the ideas the rest of the course (and your own trading) builds on.

Source
Real transcript, verified via yt-dlp captions
Textbook chapter
Foucault/Pagano/Röell, Ch. 1
Course focus here
Secondary markets
01

Why financial markets exist

A market, broadly, is wherever property rights change hands — a square, a platform, or something with no physical form at all. Markets matter because trade (ideally) moves an asset from whoever values it least to whoever values it most, raising total welfare. Financial markets are a special case: you're buying money with money. The lecture gives two reasons anyone does that:

Moving wealth across time — invest now, consume more later.

Moving wealth across contingencies — different possible futures. The example from the lecture: if you work in coal, your income is fine only in the world where renewables don't take off. Buying renewable-energy stock isn't a bet that it's mispriced — it's insurance, balancing your exposure across the futures that could happen.

The theme running through the whole course

Markets are efficient when everyone shares the same information. The moment information becomes asymmetric — some traders know more than others — efficiency breaks down. Almost everything later in the course traces back to this.

02

Primary vs. secondary markets

Primary markets — money flows to the issuer. An IPO, a Treasury auction: you hand over cash, the firm or government gets to use it.

Secondary markets — trade between existing owners. You bought at the IPO, you resell to someone else tomorrow — that resale is secondary-market trade. Stocks, bonds, derivatives, FX, and commodity-futures markets are the standard examples.

This course — and almost everything below — is about secondary markets. That's also where you, as a personal trader, actually operate.

03

Prices aren't one number

Intro economics assumes a single market-clearing price. Real markets quote two: a bid (what you can sell at) and an ask (what you can buy at), with ask always above bid — otherwise you could buy and instantly resell for a risk-free profit. The gap is the bid-ask spread, and it's a genuine friction: if your valuation and someone else's both sit inside the spread, you can't trade with each other even though a mutually beneficial trade exists.

GOOG Quote sheet, January 2015 — lecture example
Bid
$518.80
Last trade
$518.04
Ask
$520.95
Spread = $2.15. Note the bid and ask both sit above the last trade — the last trade is backward-looking, while bid/ask are forward-looking. New information had arrived in between, pushing valuations up.
⚙ Algo-trading angle
Context
GOOG quoted $518.80 bid / $520.95 ask — a $2.15 spread, 0.41% of the $519.875 mid-price.
Algo-relevant?
Yes, directly — the spread is the first line in every execution algorithm's cost model.
What's applied
Round-trip cost of crossing the spread with market orders = spread × shares. This is the core of "implementation shortfall": (execution price − decision price) × shares.
Action
The algorithm chooses: cross the spread now with a market order (pay for certainty), or post a limit order and wait to earn the spread instead of paying it.
Why
Whoever is on the other side of that limit order — a dealer or a market-making algorithm — needs compensation for adverse selection and inventory risk. Ch. 3's Glosten-Milgrom model formalizes exactly this price.
Worked example — 100 shares, using the actual quote above
Buy 100 sh. now (market order) at ask       100 × $520.95 = $52,095.00
Forced to exit now (market order) at bid  100 × $518.80 = $51,880.00
Round-trip cost from the spread alone              $215.00  (0.41% of notional)
— before any price move, before commission

Same 100 sh. via two patient limit orders
(buy at bid $518.80, later sell at ask $520.95)          +$215.00 earned, not paid
04

Liquidity and depth

Liquidity: the market's ability to let you sell quickly without moving the price much. Depth is the sharper version of that — how much order size it takes to move the price by a fixed amount.

Google trades ~$1B/day: deep and liquid, your order barely dents the price. A thin small-cap has far fewer buyers and sellers present at any moment — sell a large position and you visibly push the price down against yourself.

Real bid-ask spreads, five NYSE/Nasdaq stocks, Sept 2, 2010, 4:20pm — Foucault/Pagano/Röell, Table 0.1
StockBidAsk$ spread% spread
IBM124.88124.890.010.01%
Amazon135.06135.140.080.06%
Barnes & Noble16.0216.100.080.50%
Borders1.051.060.010.95%
Books-A-Million5.405.940.549.52%

That last row is the whole point of "liquidity" made concrete: on the same afternoon, one round-trip trade cost 0.01% on IBM and 9.52% on Books-A-Million. Same asset class, wildly different friction.

⚙ Algo-trading angle
Context
GOOG trades ~$1B/day (stated in the lecture) — deep. Books-A-Million's spread is 9.52% on the same afternoon — the signature of a thin book.
Algo-relevant?
Yes, directly — depth is the direct input to how large an order an algorithm can safely place at once.
What's applied
A market order doesn't fill at one price — it "walks the book," consuming each price level in turn until the full size is filled. Average execution price rises above the top-of-book quote as size grows.
Action
The algorithm checks size available at each price level before sizing an order, and splits large orders into smaller clips when the book is thin, instead of firing one large market order.
Why
Depth — not just the quoted spread — determines your actual average execution price. This is exactly what Ch. 4, "market depth," formalizes.
Worked example — illustrative order book (depths made up to show the mechanic; not real Google data)
Ask side:  $520.95 × 50 sh.   $521.10 × 80 sh.   $521.40 × 150 sh.

Market buy for 150 shares "walks" up through the book:
  50 sh. @ $520.95  = $26,047.50
  80 sh. @ $521.10  = $41,688.00
  20 sh. @ $521.40  = $10,428.00
  ─────────────────────────────
  150 sh. total     = $78,163.50  →  avg price $521.09/sh.

vs. top-of-book ask $520.95  →  extra slippage $0.14/sh. × 150 = $21
— a real cost on top of the quoted spread, invisible until you size against the book
05

How trades actually get matched

Order-driven markets — orders sit in a shared limit order book and get matched directly against each other (NYSE, NASDAQ's book, LSE, Euronext).

Dealer markets — a market maker quotes both sides and trades against you directly, earning the spread to cover inventory risk, operating costs, and the risk of trading against someone better informed (NASDAQ historically ran this way).

ORDER-DRIVEN MARKET Buyer Seller Limit Order Book bid order ask order matched directly DEALER MARKET Buyer Seller Dealer / Market Maker buys at ask sells at bid
Order-driven markets match buyers and sellers directly inside a shared book. Dealer markets route both sides through a market maker, who quotes the bid and ask and pockets the spread.

Two order types you'll use directly: a limit order sets a price and quantity and waits in the book — patient traders use these; they "provide liquidity." A market order executes immediately at the best available price — impatient traders use these; they "take liquidity" and pay the spread for certainty.

Continuous trading (orders persist and match anytime) vs. call auctions (orders batch over a window, then all clear at one uniform price — used at many exchanges' open/close). Order precedence within a book: price priority first, then usually time priority (first-in-first-out); visible orders execute before hidden ones at the same price.

⚙ Algo-trading angle
Context
Same GOOG quote: mid $519.875, natural half-spread $1.075 either side.
Algo-relevant?
Yes — this section is the mechanical layer a market-making bot runs on, tick by tick. This is the dealer role, automated.
What's applied
bid = fair_value − half_spread − skew, ask = fair_value + half_spread − skew — the same skew shifts both quotes in the same direction.
Action
As the bot accumulates inventory in one direction, it shifts both quotes to make the direction it wants (offloading) more attractive and the direction it doesn't (adding more) less attractive.
Why
Holding inventory is risk — if price moves before the position is unwound, the bot can lose more than the spread it captured. This is inventory risk, the other half of Ch. 3's pricing models alongside adverse selection.
Worked example — the quote loop reacting to a fill (skew coefficient illustrative)
Flat inventory (0 shares):  bid $518.80 / ask $520.95   — mirrors the market exactly

Bot accumulates +200 shares (bought more than sold)
  skew = −$0.10 applied to both quotes
  new bid $518.70  /  new ask $520.85
  — ask now cheaper: more attractive to a buyer, sheds inventory
  — bid now lower: less attractive to sellers, discourages adding more

If the $518.70 bid gets hit for 50 more shares
  inventory → 250 shares, skew widens further on the next tick
  — the loop is self-correcting by design, not by accident
06

Exchanges, OTC, and dark pools

Exchanges (NYSE, NASDAQ, LSE) are heavily regulated and bundle in clearing/settlement, liquidity support, and transparency. OTC venues sit off-exchange with lighter disclosure requirements — and often thinner liquidity as a result. Dark pools are internal venues (e.g. a bank matching its own clients' orders instead of routing to an exchange) — increasingly prominent, and a live regulatory focus in the US and EU.

⚙ Algo-trading angle
Context
NYSE quotes GOOG at $518.80 / $520.95 — but the same stock trades simultaneously on other venues too.
Algo-relevant?
Yes — a whole strategy category (smart order routers) exists purely for this decision.
What's applied
Compare the best available price for the needed side at every reachable venue; route to price improvement first, sweep remaining size to the primary venue.
Action
The router splits one order across venues instead of sending it all to one exchange.
Why
A few basis points saved per trade, multiplied across thousands of trades a day, is real money — and Ch. 7's "fragmentation" is the formal theory behind why this liquidity is scattered in the first place.
Worked example — 150 shares across 3 venues (venue quotes illustrative, not real market data)
Sweep everything to NYSE:       150 × $520.95           = $78,142.50

Route smartly instead —
  dark pool: 50 sh. @ NBBO midpoint $519.875  = $25,993.75
  ECN B:     100 sh. @ $520.90                = $52,090.00
  ─────────────────────────────
  150 sh. total                               = $78,083.75

Savings vs. sweeping NYSE alone                $58.75  (≈0.075% of notional)
— small per order, but it's why SOR exists as infrastructure
07

Who you're actually trading against

Retail investors (individuals, usually treated as "uninformed") vs. institutional investors (pension/mutual funds, PE — usually "informed" professionals) — with one notable exception: pension funds are institutional but typically treated as uninformed, since they trade to manage liabilities, not on an information edge.

Informed traders act on private information the market doesn't have yet. Uninformed traders trade for idiosyncratic reasons — hedging, rebalancing — not because they think the price is wrong.

Dealers/market makers supply liquidity when no one else will. Brokers sit between retail traders and the market, executing orders on your behalf (with their own potential conflicts of interest, flagged but not explored deeply in this lecture).

⚙ Algo-trading angle

This taxonomy is the map of algo-trading strategy types — most trading algorithms are best understood as an automated version of one of these roles: a market-making bot plays the dealer; a statistical-arbitrage strategy plays the informed trader, trading on a modeled edge rather than an idiosyncratic need; an execution algorithm plays a very disciplined, cost-minimizing broker. Knowing which role your algorithm plays determines what it should optimize for — spread capture, information edge, or impact minimization are different goals, not the same problem in different clothes.

08

What regulators are actually trying to balance

Protect uninformed traders from being picked off by better-informed ones — but price discovery only happens if informed traders are willing to trade. Push too hard on one and you damage the other. Regulators also care about stabilizing markets against shocks (since risk-averse traders pull back when they fear big swings) and choosing the right trading structure per asset — liquid, popular names don't need the same rules as thin, illiquid ones.

Tools: forced order-routing between fragmented markets, transaction taxes/subsidies, margin/collateral requirements, rules on algorithmic and high-frequency trading, and how much competition to allow between exchanges (one big liquid market vs. many small competing ones — a real, unresolved trade-off).

⚙ Algo-trading angle
Context
The lecturer names "policies on algorithmic and high-frequency trading" as one of the regulator's actual levers.
Algo-relevant?
Yes — directly. These aren't market mechanics to model, they're hard constraints the code has to obey.
What's applied
A common constraint type: exchanges cap message rates (orders + cancels per second) or penalize a high order-to-trade ratio to discourage quote-spam.
Action
The bot's re-quote logic has to throttle itself — it can't just re-quote on every book update.
Why
Breaching a rate limit triggers throttling, fees, or in extreme cases a trading halt for that participant — a cost that has nothing to do with the market itself, only the rulebook.
Worked example — illustrative rate limit (a generic constraint type, not a specific real exchange's actual rule)
Illustrative venue rule: max 10 order messages/second before fees kick in

Naive bot: re-quotes bid + ask on every book update
  book updates ~50×/second here → bot sends ~100 messages/second
  — breaches the limit 10× over

Constrained bot: only re-quotes when fair_value moves > $0.01
  cuts re-quote frequency to roughly the 10 msg/sec budget
  — the regulatory limit becomes a literal parameter in the loop,
     not a compliance footnote read once and forgotten
09

What this changes about how you trade

Concept → practical takeaway
ConceptWhat to actually do
Bid-ask spreadCheck spread as a % of price before entering any trade — worst on illiquid small-caps and options. It's a real cost, before commission.
Depth / liquidityLook at order book size before sizing a trade in anything thin. A large market order in a thin book moves the price against you (slippage) — see the Books-A-Million row above.
Limit vs. market ordersDefault to limit orders in anything illiquid or volatile. Reserve market orders for names liquid enough that the spread is a rounding error.
Call auctionsThe first/last minutes of a trading session are often auction-driven, not continuous — a real reason experienced traders avoid trading right at the open.
Informed vs. uninformedAssume you're the uninformed side against institutional counterparties by default. Trade on a plan, not a belief that you know something the market doesn't.
Dealer marketsExplains why FX/OTC spreads vary by who's quoting you — you're trading against one dealer's price, not a neutral book.
10

Before the next lecture

  1. 1

    Look up real bid/ask quotes for a stock you'd actually trade — the lecturer suggests Facebook or Microsoft — and identify which exchange it's actually trading on.Lecturer's own assigned exercise

  2. 2

    Compute the spread as a % of price for something liquid (e.g. AAPL) and something you'd consider thin. Feel the gap directly, the way the IBM vs. Books-A-Million row does above.Derived from the lecture's real-world example

  3. 3

    Read the article on the London Metal Exchange — one of Europe's last open-outcry trading floors. Question to sit with: what's the value of a physical trading floor in the age of digital trading?Lecturer's own assigned exercise

  4. 4

    If you have the Foucault/Pagano/Röell textbook, work Chapter 1, exercises 1–3 — they compare continuous vs. call-auction outcomes on the same order set.Lecturer's own assigned exercise

bid / askbid-ask spreadliquiditymarket depth price discoverylimit ordermarket orderorder-driven market dealer marketcontinuous tradingcall auctiondark pool informed / uninformed trader
11

Where this is heading: building a trading algorithm

Every concept above is a component of the same machine. Here's the taxonomy of algorithmic trading strategies mapped onto what this lecture actually covered:

Market-making algorithms§05 · §07

Automate the dealer role: continuously quote a bid and ask, earn the spread, manage inventory risk. This is the strategy type most directly built on today's material.

Execution / agency algorithms (VWAP, TWAP)§03 · §04

Work a large order over time to minimize spread cost and market impact — the automated version of "how do I trade a lot without moving the price against myself."

Smart order routers§06

Decide, order by order, which venue (lit exchange, dark pool, OTC) to send to — a direct response to the fragmentation described above.

Statistical / informed strategies§07

Trade on a modeled information edge rather than an idiosyncratic need — the "informed trader" role, automated and systematized.

To make this concrete, here's a simplified version of a market-making algorithm's core loop — the most direct automation of a dealer, and the strategy type today's lecture maps onto most cleanly:

// runs on every order-book update
fair_value   = mid_price(order_book)          // §03 — price discovery
inventory_skew = f(current_position)          // dealer's inventory risk, §05/§07
half_spread  = base_spread(volatility) + inventory_skew

bid = fair_value - half_spread                // §03 — quoting the two-sided spread
ask = fair_value + half_spread

size = depth_limit(order_book, max_impact)    // §04 — sized against real depth

post_limit_order(BUY,  bid, size)             // §05 — limit order, provides liquidity
post_limit_order(SELL, ask, size)

// on fill: inventory changes, re-quote from the top

Every line traces back to something in this lecture: fair_value is price discovery (§03); half_spread is the bid-ask spread economics that Ch. 3's Glosten-Milgrom/Kyle models will formalize; size depends on the depth concept from §04; and posting two limit orders is literally "acting as the dealer" from §05. As the course reaches Ch. 3 (price formation) and Ch. 4 (depth), those chapters fill in exactly how to compute half_spread and max_impact rigorously, rather than as placeholders.

Putting the pieces together — illustrative daily view (round-trip count is a made-up assumption, spread is the lecture's real number)
If the bot completes ~500 round trips today, each capturing roughly the
$2.15 spread from §03 (before any losses to adverse selection):

  500 round trips × $2.15/share × 100 sh./trip  =  $107,500 gross spread capture

This is gross, not net — every one of these fills carries the risk from §05
(inventory moving against the bot before it re-balances) and §03's flip side:
some counterparties on the other side of these trades are the informed
traders from §07 — trading against them is exactly what erodes this number.
Ch. 3 is where the course formalizes how much that erosion actually costs.
12

Where this sits in your reference books

Market Liquidity (Foucault, Pagano & Röell)This lecture ≈ Ch. 1, "Trading Mechanics and Market Structure" — the two textbook figures used above (the spread table, the liquidity discussion) come straight from its Introduction.
An Arbitrage Guide to Financial Markets (Dubil)A different lens on the same ground — its Ch. 1 covers markets/instruments/hedgers-vs-speculators. Worth reading in parallel now; the rest of the book (interest-rate math, options, swaps) is a separate track, not tied lecture-by-lecture to this course.
Built from the actual lecture transcript (auto-captions, cleaned and verified) plus the two reference textbooks in /references. Not a reconstruction from the course title alone.