---
title: "Execution Beyond Equities"
book: "Microstructure and Execution"
subject: quant
language: en
chapter: 21
exercises: 8
source: https://one-course.com/books/quant/10/en/chapter/21-execution-beyond-equities
---

# Chapter 21 — Execution Beyond Equities

Buying the same amount of risk takes an order in an index future, a request for quote in bonds, a stream of last-look prices in currencies and a venue that never closes in crypto. The objective is the same shortfall; the market’s rules change what the algorithm can do. This chapter takes one risk transfer, USD 50 million, through four simulated markets with execution adapters built on the market components of One Quant Books 1 to 3, and measures the all-in cost in each and the part of it that the market’s own rule explains.

The four markets are stylised: their spreads, volatilities and volumes ([Table 21.1](#tab-mx-execution-beyond-equities-markets)) are assumptions of a realistic order of magnitude, chosen to show the mechanisms, not measurements of particular instruments. Each order’s impact follows the square-root law of chapter 11, $Y\sigma\sqrt{Q/V}$ with $Y=0.7$, the daily volatility $\sigma$ and daily volume $V$.

| market | half-spread (bp) | daily volatility (bp) | daily volume (USD) |
| --- | --- | --- | --- |
| index future | 0.25 | 100 | 200 billion |
| EUR/USD | 0.08 | 50 | 300 billion |
| corporate bond | 5 | 40 | 20 million |
| bitcoin (one exchange) | 0.5 | 300 | 5 billion |

***Table 21.1.** The simulated markets’ parameters (assumptions). Data: `mx_xexec.MARKETS`.*

## 21.1 Futures: one book, implied liquidity, rolls

An index future trades in one central book, with a tick that is often most of the spread and depth that dwarfs any single stock’s. USD 50 million is 200 contracts at 5 000 points and USD 50 a point. Its impact is small (1.11 basis points) and its spread smaller (0.25). What the future adds is the roll (One Quant Book 1, chapter 21): a position held past expiry must be sold in the front month and bought in the next, and the calendar spread between them has its own book (Book 1, chapter 19). Exchanges link the books with implied prices: a spread order can trade against the two outright books at once (implied in), and spread orders make prices in the outrights (implied out); CME describes implied orders as removing the legging risk, and implied quantity never matches implied quantity.

Rolling 200 contracts through this chapter’s books (front 4 999.75 bid for 150, back 5 010.25 offered for 100, the spread book $-10.25$ bid for 60, each level backed by the same size a tick worse): selling the front and buying the back as two orders costs 0.44 points a contract against the spread’s mid of $-10.25$, 0.88 basis points. Selling the spread in its own book for the first 60 contracts and legging the rest costs 0.23 points, 0.45 basis points: half. With implied prices the last 140 contracts trade at the same price as legging, but as one atomic order, with no risk that the market moves between the legs (`firm_xexec.roll`, on Book 1’s `firm.match`).

```python
def roll(front: Quote, back: Quote, spread: Quote, lots: int, tick: int) -> dict:
    mid = (front.bid + front.ask) / 2 - (back.bid + back.ask) / 2

    def legs(n):                                 # sell the front, buy the back
        sold = _sell(front.bid, front.bid_qty, n, tick)
        return sold - _buy(back.ask, back.ask_qty, n, tick)

    def via(book):                               # sell the spread, leg the rest
        got = min(lots, book.bid_qty) if book.bid is not None else 0
        return got * (book.bid or 0) + legs(lots - got)
    implied = best_of(spread, implied_in(front, back))
    out = {"legs": legs(lots), "spread_book": via(spread), "implied": via(implied)}
    return {k: mid - v / lots for k, v in out.items()} | {"mid": mid}
```

***Listing 21.1.** Rolling a long futures position: legging through the two outright books, selling the spread in its own book, or using the book that implied prices show, then legging whatever is left. code/firm/xexec/firm_xexec.py*

## 21.2 FX: streams, last look and aggregation

**Definition 21.1 (Liquidity aggregator, request for stream, firm liquidity).**

A *liquidity aggregator* collects the streaming quotes of several liquidity providers into one book and routes each request to the best price. A *request for stream* asks providers to start streaming executable prices for a stated size to one client. *Firm liquidity* is liquidity whose quotes fill when hit, with no last-look window in which the provider may reject.

Most FX is traded bilaterally, off exchange, on providers’ streams (One Quant Book 2, chapter 15). The FX Global Code’s principle 17 asks providers that use last look to be transparent about it and to use it as a risk control, not to gather information. The adapter sends USD 50 million as 20 requests of USD 2.5 million (`firm.acexec`’s straight-line schedule) to an aggregator of four last-look streams (half-spreads of 0.08 to 0.11 basis points, holds of 20 to 80 milliseconds, asymmetric thresholds of 0.05 to 0.08 basis points) and one firm stream at 0.15. A rejected request loses the move that caused the rejection and goes on to the next stream at the new price (Book 2’s `firm.lastlook`).

```python
def fx_child(lps, sigma_bp_sqrt_ms: float, rng) -> tuple[float, int]:
    """Buy at the cheapest stream; a rejection after its hold costs the (client-favourable)
    move and the request goes on to the next stream, at the new price."""
    moved, rejections = 0.0, 0
    for lp in sorted(lps, key=lambda x: x.half_bp):
        if lp.policy == "none":
            return moved + lp.half_bp, rejections
        m = rng.normal(0.0, sigma_bp_sqrt_ms * math.sqrt(lp.hold_ms))
        if check(m, lp.threshold_bp, lp.policy):
            return moved + lp.half_bp, rejections
        moved += m
        rejections += 1
    raise ValueError("every stream rejected and there is no firm liquidity")
```

***Listing 21.2.** One request through the aggregator: the cheapest stream first; each rejection after its hold costs the client the move the provider declined to honour, and the request moves on. code/firm/xexec/firm_xexec.py*

Over 2 000 simulated orders, rejections numbered 7.7% of the requests, and the aggregator’s average cost was 0.087 basis points against the best quote’s 0.080: last look costs 0.007 basis points here, and the aggregator still beats the firm stream (0.15). Last look’s cost is not in the spread the client sees but in the moves it gives back on the requests it loses; Oomen (2017) analysed the practice in detail. With an impact of 0.45 basis points, the all-in cost in FX is 0.54 basis points, the cheapest of the four.

**As of September 2026 — How FX is traded.**

The BIS Triennial Survey of April 2025 found electronic trading at 59% of FX turnover, about the same share as in the previous survey, and noted that customers using disclosed multi-dealer electronic trading could in theory choose among more than 15 platforms (BIS Quarterly Review, December 2025).

## 21.3 Bonds: requests for quote and portfolio lists

**Definition 21.2 (Risk transfer price).**

A *risk transfer price* is a price at which a dealer takes a whole block at once as principal, charging for the cost and risk of unwinding it, instead of working it as agent.

A corporate bond trades a few times a day: USD 50 million is two and a half days of this bond’s volume, and an order worked over a day would move the price by the square-root law’s 44.3 basis points on top of a 5-basis-point half-spread. The client instead asks dealers for a [risk transfer price](#def-mx-execution-beyond-equities-rtp) by request for quote (Book 2, chapter 22). The adapter prices it with Book 2’s `firm.rfq`: each dealer bids the value less a markup (here the 49.3 basis points the dealer expects to pay to unwind), plus a private term with a dispersion of 8 basis points (its inventory and axes); each dealer who sees the request and loses costs the client 1.5 basis points of leakage. Asking one dealer costs 49.3; asking three, 45.5 (6.8 of competition less 3.0 of leakage); asking more adds leakage faster than competition, so three is best. Hendershott and Madhavan (2015) showed that such electronic one-sided auctions are a viable source of liquidity even in inactively traded bonds.

## 21.4 Crypto: round the clock, rate limits and on-chain legs

Bitcoin trades on many exchanges and in automated market makers, every hour of every day. On one exchange with this chapter’s parameters, USD 50 million costs 0.5 basis points of spread and 21.0 of impact. A constant-product pool (One Quant Book 3, chapter 20) with USD 1 billion on each side and a 5-basis-point fee offers another leg: its price moves along $xy=k$ as the order takes coins out. The adapter sends $x$ to the pool and the rest to the exchange and chooses $x$ to minimise the sum, the pool’s price starting at the exchange’s mid (`cex_amm_split`, on Book 3’s integer `firm.amm`): the best is USD 1.375 million to the pool, saving 0.36 basis points. The pool is cheap for the first dollars and expensive for the rest: its marginal cost rises twice as fast as its average.

A venue’s rate limits (Book 3, chapter 15) bound what the algorithm can send: a large spot exchange’s published limits allow 100 orders in ten seconds. Twelve [child orders](https://one-course.com/books/quant/10/en/chapter/14-the-almgrenchriss-framework#def-mx-the-almgren-chriss-framework-parent) in an hour are nowhere near it; 120 in one second are refused (`orders_allowed` on Book 3’s `firm.ratelimit`). Rate limits bind on strategies that quote and cancel, not on schedules like this one; the round-the-clock market does not remove the day’s volume pattern, it moves the thin hours to the night.

## 21.5 One order, four markets

[Table 21.2](#tab-mx-execution-beyond-equities-allin) puts the four executions side by side.

| market | spread | impact | market’s rule | all-in | the rule |
| --- | --- | --- | --- | --- | --- |
| index future | 0.25 | 1.11 | 0.45 | 1.81 | roll through the spread book (legging: 0.88) |
| EUR/USD | 0.08 | 0.45 | 0.007 | 0.54 | last-look rejections |
| corporate bond | — | 49.27 | $-3.77$ | 45.50 | RFQ to three dealers |
| bitcoin | 0.50 | 21.00 | $-0.36$ | 21.14 | a pool leg |

***Table 21.2.** The all-in cost (basis points) of buying USD 50 million of risk in the four simulated markets, and the part of it that each market’s rule explains. For the bond, the dealer’s markup takes the place of spread and impact. Data: `mx_xexec.table`.*

The rule explains a quarter of the future’s cost (the roll, 25%), 1.3% of the currency’s, and it saves 8.3% of the bond’s (competition net of leakage) and 1.7% of bitcoin’s. The costs themselves span two orders of magnitude, and the reason is the market’s depth relative to the order, not its rules: the same USD 50 million is a rounding error in the index future and two days’ volume in the bond. An [implementation-shortfall algorithm](https://one-course.com/books/quant/10/en/chapter/16-benchmark-algorithms#def-mx-benchmark-algorithms-is) (chapter 16) written against `firm.acexec`’s scheduler can drive all four through adapters; what changes is what a “[child order](https://one-course.com/books/quant/10/en/chapter/14-the-almgrenchriss-framework#def-mx-the-almgren-chriss-framework-parent)” is: a [limit order](https://one-course.com/books/quant/10/en/chapter/1-the-limit-order-book#def-mx-the-limit-order-book-orders), a request to a stream, an auction among dealers, a swap against a pool.

## 21.6 Tutorial: one order, four markets

**Goal.** Execute the same risk transfer through four execution adapters and split each all-in cost into spread, impact and the market’s rule. **End state:** [Table 21.2](#tab-mx-execution-beyond-equities-allin) and the numbers of sections 1 to 4.

1. **Futures.** `firm_xexec.roll(front, back, spread, lots, tick)` on `firm.match` ’s `Quote` ; `mx_xexec.futures()` .
2. **FX.** `LP` , `fx_child` , `children(notional, scheduler, n)` ; `fx()` .
3. **Bonds.** `rfq(n, markup, sigma, leak)` ; `bonds()` .
4. **Crypto.** `amm_cost_bp` , `cex_amm_split` , `orders_allowed` ; `crypto()` ; `table()` .

**What to change next.** Replace the bond’s markup by a model of the dealer’s own unwinding; give the FX streams symmetric last look; route the bitcoin order across two exchanges and the pool.

## 21.7 Build: execution adapters

**Purpose.** The market-specific layer under chapter 28’s [execution algorithm](https://one-course.com/books/quant/10/en/chapter/16-benchmark-algorithms#def-mx-benchmark-algorithms-algo): one scheduler, several ways to trade a slice.

**Interface.** `Market(name, half_spread_bp, sigma_day_bp, adv, y)`, `sqrt_impact_bp`, `children(notional, scheduler, n)`, `roll(front, back, spread, lots, tick)`, `LP(name, half_bp, hold_ms, threshold_bp, policy)`, `fx_child(lps, sigma, rng)`, `rfq(n, markup, sigma, leak)`, `amm_cost_bp`, `cex_amm_split`, `orders_allowed(governor, horizon_ms, n)`.

**Rules.** Costs in basis points of notional against the starting mid; the adapters compose Books 1 to 3’s components rather than copy them.

**Acceptance tests.** `code/firm/xexec/tests/`: the roll on the chapter’s books and implied-in at the legging price; a firm stream’s cost is its half-spread and an always-rejecting stream passes the request on; the last-look cost against Book 2’s formula; the RFQ split adds up; a small pool trade pays the fee; the split saves; the rate limit’s boundary.

**Stretch.** Futures in `firm.exchsim` with implied matching; symmetric last look; several pools and exchanges.

Sources and further reading

- Global Foreign Exchange Committee, *FX Global Code* , principle 17 (last look).
- R. Oomen, “Last look”, *Quantitative Finance* 17(7), 2017.
- T. Hendershott and A. Madhavan, “Click or call? Auction versus search in the over-the-counter market”, *Journal of Finance* 70(1), 2015.
- CME Group, Globex matching algorithms and implied orders (client systems wiki).
- BIS, “The FX trade execution landscape through the prism of the 2025 BIS Triennial Survey”, *BIS Quarterly Review* , December 2025.

## 21.8 Exercises

**Exercise 21.1 ★.**

Compute the impact of USD 50 million in the index future and in the bond by the square-root law with the table’s parameters.

**Solution of Exercise 21.1.**

Future: $0.7\times100\times\sqrt{50\text{m}/200\text{bn}}=1.11$ basis points. Bond: $0.7\times40\times\sqrt{50/20}=44.3$ basis points.

**Exercise 21.2 ★.**

Verify the roll’s legging cost of 0.44 points a contract from the books.

**Solution of Exercise 21.2.**

Selling 200 fronts: 150 at 4 999.75 and 50 at 4 999.50, an average of 4 999.6875; buying 200 backs: 100 at 5 010.25 and 100 at 5 010.50, an average of 5 010.375. The spread is sold at $-10.6875$ against a mid of $-10.25$: 0.4375 points a contract.

**Exercise 21.3 ★.**

What is the bond’s cost by request for quote to one, two and four dealers?

**Solution of Exercise 21.3.**

49.27, 46.26 and 45.54 basis points.

**Exercise 21.4 ★★.**

Why does implied liquidity not improve the roll’s price here, and what does it improve?

**Solution of Exercise 21.4.**

An implied-in price is built from the outright books, so it is the legging price; the direct spread book was already better at its top. Implied liquidity makes the spread and outright books one pool and lets the roll trade atomically: no risk that the second leg’s price moves after the first.

**Exercise 21.5 ★★.**

Why can an aggregator of last-look streams be cheaper than a firm stream, and when would it not be?

**Solution of Exercise 21.5.**

Last-look streams quote tighter because they can decline the requests that would lose them money; the client pays for that only on the rejected requests (0.007 basis points here). It would not be cheaper if rejections were frequent, holds long, or the rejected requests’ information were used against the client.

**Exercise 21.6 ★★.**

Why does the pool take only USD 1.4 million of the bitcoin order?

**Solution of Exercise 21.6.**

The pool’s marginal cost is its fee plus about twice the price move per dollar ($2x/R$); it equals the exchange’s marginal impact cost after about USD 1.4 million of a USD 1 billion pool.

**Exercise 21.7 ★★★.**

*Coding.* With leakage of 3 basis points per losing dealer instead of 1.5, how many dealers should the client ask, and what does the bond cost?

**Solution of Exercise 21.7.**

Two dealers, 47.76 basis points: higher leakage makes each extra dealer cost more than the competition it adds.

**Exercise 21.8 ★★★.**

*Find the flaw.* “Our FX algorithm paid 0.08 basis points on average: exactly the best quote in the aggregator, so last look cost us nothing.”

**Solution of Exercise 21.8.**

The quote paid is only the accepted request’s price; the rejected requests’ lost moves (and the re-requests at the next stream) are the cost of last look, 0.007 basis points on average here: 0.087 in all, not 0.080.

## 21.9 Problem: One Order, Four Markets

**Problem 21.1.**

Weekend problem — one order, four markets

A multi-asset fund must add USD 50 million of risk and can do it in an index future, a currency, a corporate bond or bitcoin. The desk asks what each costs and why.

**Part I — Futures.**

1. Why is a future’s impact so small for this order?
2. Describe implied-in and implied-out prices.
3. Give the roll’s cost by legging and through the spread book.
4. What does the implied book add?

**Part II — FX.**

5. Define an aggregator, a [request for stream](#def-mx-execution-beyond-equities-aggregator) and [firm liquidity](#def-mx-execution-beyond-equities-aggregator) .
6. What does principle 17 of the FX Global Code ask of last look?
7. How does the adapter model a rejection, and what does it cost?
8. Give the rejection rate and the last-look cost.

**Part III — Bonds and crypto.**

9. Define a [risk transfer price](#def-mx-execution-beyond-equities-rtp) .
10. Split the three-dealer RFQ cost into markup, competition and leakage.
11. Why is three dealers the best number here?
12. How is the bitcoin order split between the exchange and the pool, and what does it save?
13. When do an exchange’s rate limits bind?

**Part IV — The comparison.**

14. *State the named result* : the all-in cost of the same risk transfer in futures, FX, bonds and crypto in the simulator, and the part of it each market’s rule explains.
15. Why do the costs span two orders of magnitude?
16. What is a [child order](https://one-course.com/books/quant/10/en/chapter/14-the-almgrenchriss-framework#def-mx-the-almgren-chriss-framework-parent) in each market?
17. How would you build one algorithm that trades all four?
18. Which of the chapter’s assumptions would you check first against real data?
19. What does the dated box say about how FX is traded?
20. In one sentence: what changes when an [execution algorithm](https://one-course.com/books/quant/10/en/chapter/16-benchmark-algorithms#def-mx-benchmark-algorithms-algo) leaves the equity book?

**Solution of Problem 21.1.**

**1.** USD 50 million is 0.025% of its daily volume. **2.** Implied in: a spread price from the two outrights; implied out: an outright price from the spread and the other outright. **3.** 0.88 basis points by legging, 0.45 through the spread book. **4.** Atomic execution and one pool of liquidity; no better price here. **5.** See the definitions. **6.** Transparency and disclosure; last look as a risk control, not to gather information. **7.** The provider observes the move over its hold; above its threshold it rejects, and the client pays that move at the next stream: 0.007 basis points on average. **8.** Rejections of 7.7% of requests; 0.007 basis points. **9.** See the definition. **10.** 49.27 of markup, $-6.77$ of competition, 3.0 of leakage: 45.50. **11.** A fourth dealer adds 1.46 basis points of competition, less than its 1.5 of leakage. **12.** USD 1.375 million to the pool and the rest to the exchange; 0.36 basis points. **13.** On strategies that send many orders and cancels (100 orders in ten seconds on a large exchange), not on a twelve-slice schedule. **14.** *Named result*: all-in 1.81 basis points in the index future (the roll through the spread book, 25% of it), 0.54 in EUR/USD (last look, 1.3%), 45.50 in the corporate bond (RFQ competition net of leakage saves 8.3%) and 21.14 in bitcoin (the pool leg saves 1.7%). **15.** The order’s size relative to each market’s depth: from 0.025% of a day’s volume to 250%. **16.** A [limit order](https://one-course.com/books/quant/10/en/chapter/1-the-limit-order-book#def-mx-the-limit-order-book-orders) in a book, a request to a stream, an auction among dealers, a swap against a pool. **17.** One scheduler (`firm.acexec`) and one adapter per market implementing “trade this slice”. **18.** The volumes and the bond dealers’ markup. **19.** Electronic trading was 59% of FX turnover in April 2025, and a customer could choose among more than 15 disclosed multi-dealer platforms. **20.** What a [child order](https://one-course.com/books/quant/10/en/chapter/14-the-almgrenchriss-framework#def-mx-the-almgren-chriss-framework-parent) is, and what it costs to find the other side.

## 21.10 Interview questions

**Interview question 21.1 ★ trader.**

You must roll a large futures position. How do you do it, and what can go wrong?

**Solution of Interview question 21.1.**

Through the calendar-spread book (and implied prices), not by legging, over the roll period’s liquid days, watching the spread’s value against its fair carry; the risks are legging, a crowded roll window, and the spread moving against a large position.

*What the interviewer is looking for: Spread book; timing; legging risk.*

**Interview question 21.2 ★★ trader.**

A liquidity provider rejects 10% of your FX requests. How do you work out what that costs you?

**Solution of Interview question 21.2.**

Record, per request, the price move from request to rejection and the price obtained on the retry; the cost is the average of those moves over all requests, plus the information the rejected requests may have leaked; compare with the provider’s disclosed hold and symmetry.

*What the interviewer is looking for: Measuring the lost moves; disclosure.*

**Interview question 21.3 ★★ researcher.**

How many dealers should a client ask for a price on a corporate bond, and what does the answer depend on?

**Solution of Interview question 21.3.**

Until one more dealer’s expected improvement (competition) is smaller than the leakage it causes; it depends on the dispersion of dealers’ prices, the leakage per losing dealer, and the bond’s liquidity.

*What the interviewer is looking for: The trade-off; its parameters.*

**Interview question 21.4 ★★ developer.**

Design an execution adapter interface that lets one scheduler trade equities, FX streams and RFQs.

**Solution of Interview question 21.4.**

A scheduler asks for a quantity by a time; the adapter implements “trade this slice” (place and manage orders, request streams, run an RFQ, swap) and reports fills and costs in a common format. Keep market-specific state inside the adapter.

*What the interviewer is looking for: Separation of schedule and mechanism; a common fill record.*

**Interview question 21.5 ★★ researcher.**

How would you split a large crypto order between a centralised exchange and an AMM pool?

**Solution of Interview question 21.5.**

Equalise marginal costs: the exchange’s marginal impact against the pool’s fee plus price move ($2x/R$ for a constant-product pool), including gas and the risk of front-running on chain.

*What the interviewer is looking for: Marginal costs; on-chain risks.*

**Interview question 21.6 ★★★ bank.**

A client asks your bank for a [risk transfer price](#def-mx-execution-beyond-equities-rtp) on USD 50 million of a bond that trades USD 20 million a day. How do you price it?

**Solution of Interview question 21.6.**

Estimate the cost of unwinding it (spread plus impact at the bond’s volume, over the days needed), the inventory risk while holding it, hedges available (rates futures, index CDS), the client’s information, and the competition for the trade; quote a price that covers them.

*What the interviewer is looking for: Unwind cost; risk and hedges; competition.*
