Quantitative Finance · Book 11 · Market making

Market Making and High-Frequency Trading

Market Making and High-Frequency Trading · Market making

29A Venue Playbook

The same quoting code behaves differently on a price-time equities exchange, a pro-rata futures book, a venue with a speed bump and a crypto exchange with an order budget. A desk that learns the differences in production learns them from its losses: orders rejected by a budget it did not read, a queue it joined with the wrong size, quotes that arrive five seconds after the price it saw. So a desk keeps one page per venue, and checks the page before the first order. In this chapter’s simulation, one quoter written once and run with its home venue’s parameters has 94% of its orders rejected on a crypto venue, trades a quarter of the volume it could on a pro-rata book, and turns half of its volume into takes on a venue that delays new orders. Three venues need a parameter changed, four need nothing, and two, one of them among the three, need different code.

29.1 What a venue profile holds

Definition 29.1 (Venue profile)

A venue profile is a structured, versioned record of what a trading strategy must know about a venue before sending it an order (its matching rule, tick and lot, fees and their unit, market-data feed, order types, delays, message budget, session and known quirks), together with the strategy’s own parameters for that venue, validated by rules that tie the two together.

A profile has two halves (Figure 29.1). The first describes the venue and changes when the venue changes: a new fee schedule, a new order type, a new limit. The second describes how the desk quotes there and changes when the desk learns: the size it shows, how far the price must move before it requotes, how often it may requote, whether it flags its orders post-only. The rules tie the halves together. A quote size must be a multiple of the lot. A post-only flag needs a venue that offers post-only orders. A delay that spares post-only orders should be met with post-only orders. Requotes must fit the message budget. Each rule is one line of firm.venueprofile.validate (Listing 29.1), and each was learned by somebody in production.

The fields, one by one, are what the earlier chapters used:

  • Matching. Price-time priority (chapters 1 to 10) or pro-rata allocation with a top-order share (Chapter 15), or a batch interval with one clearing price (Chapter 9), or no matching engine at all (Chapter 25).
  • Tick, lot and price scale. A tick of one cent on a $100 stock is one basis point; a quarter point on a futures contract is a different amount of money per contract, and the lot turns a quote size into risk.
  • Fees and their unit. Per share on US equities, per contract on futures and options, in basis points of notional on crypto venues; the sign of the maker fee separates a maker-taker venue from an inverted one (Chapter 17).
  • Feed. Market-by-order or market-by-price, and whether a quoter can find its own orders in it: a quoter that cannot will chase them (Chapter 1).
  • Order types. Post-only, mass quotes, replace with or without loss of priority, pegs.
  • Delays. A speed bump, symmetric or asymmetric (Definition 9.2); an in-play delay on placing orders; a batch interval.
  • Budgets. Orders a second, a day, per account and per instrument, whether cancels count, and what happens on a breach: a reject, a disconnection, a fee.
  • Session and quirks. Hours, auctions, maintenance windows, and the paragraph that begins “note that”.
A venue profile and what it produces. The venue half and the quoting half are validated together; a valid profile yields the simulator’s configuration (Book 10’s exchange simulator), the quoter’s parameters, and the rows for Book 1’s venue registry and fee-schedule engine. The chapter runs one quoter on every simulated profile with the home venue’s parameters and with the profile’s own. Source: firm.venueprofile.
Figure 29.1. A venue profile and what it produces. The venue half and the quoting half are validated together; a valid profile yields the simulator’s configuration (Book 10’s exchange simulator), the quoter’s parameters, and the rows for Book 1’s venue registry and fee-schedule engine. The chapter runs one quoter on every simulated profile with the home venue’s parameters and with the profile’s own. Source: firm.venueprofile.

The chapter’s registry holds eleven profiles, one per venue type; eight have a matching engine the exchange simulator can run. Their fees and limits are illustrative of each type, set from the dated box’s figures where one exists; a desk’s own profile holds the venue’s actual schedule, with the date it was read. The venue half of the eleven:

profilematchingtick; lotfees, make/takedelay or budgetown quoting
lit equityprice-time1 c; 100−0.20-0.20/+0.30+0.30 c/sh–home
inverted equityprice-time1 c; 100+0.10+0.10/−0.05-0.05 c/sh–home
bumped equityprice-time1 c; 100−0.20-0.20/+0.30+0.30 c/sh350 µs, allhome
batchbatch auction1 c; 1000/0100 ms intervalhome
pro-rata futurestop, pro rata0.25; 10/0 a contract–size 500
FIFO futuresprice-time0.25; 10/0 a contractmessage ratiohome
cryptoprice-time1; 1−0.5-0.5/+2.5+2.5 bp0.125/s, burst 516-s pacing
eventprice-time1 c; 10/05 s, new orders3-tick threshold
optionstop, pro rata1 c; 1−25-25/+50+50 c/ctrisk toolsnot run
FX ECNprice-time1 pip; 1M0/0.05 bp–not run
on-chainpool–30 bp pool feeblock timenot run

The crypto budget is a per-instrument share of an account’s: 200 000 orders a day, the dated box’s figure, shared by about eighteen instruments, leaves one order every eight seconds for each, with a burst of five. The event venue’s five-second delay on new orders sits inside the one-to-twelve seconds the dated box reports for one betting exchange’s in-play markets.

29.2 Equities and options venues

On a US equity exchange the profile’s first question is the fee sign. A maker-taker venue pays the maker a rebate and charges the taker up to the access fee cap; an inverted venue charges the maker and pays the taker, so its queues are shorter and its fills are more often the informed ones (Chapter 17). In the chapter’s run the two venues are the same book with the fee signs swapped: the quoter trades 14 567 units on each, the same fills, and its fee line moves from a rebate of $29 to a charge of $15 over the twenty minutes. Nothing in the quoter’s parameters has to change for that; its accounting does, and so does the decision of whether to quote there at all.

The second question is the feed. An order-by-order feed (a market-by-order feed such as Nasdaq’s ITCH, where a replaced order takes a new reference) lets the quoter find its own orders and quote off everyone else’s; a market-by-price feed shows totals per level, and a quoter must subtract its own size, which is exact only once its acknowledgements have arrived. The chapter’s quoter identifies its orders by the references in their acknowledgements, and the simulator delivers acknowledgements before the public feed (15 against 20 microseconds), as private order entry usually does. With the acknowledgement arriving second, a first draft of this quoter took its own order for somebody else’s and chased it.

The third question is the delay. The bumped equity venue delays every message by 350 microseconds, the delay one US exchange has run since 2016. In the run it changes nothing: the arbitrageur’s order and the quoter’s cancel are delayed alike, the arbitrageur still wins every race, and 42% of the quoter’s volume is still taken on a jump. The bump in that design protects the venue’s pegged orders, which reprice before the delayed arbitrageur arrives (Chapter 9); it does not protect a displayed quote whose owner reacts through the same delay. An asymmetric delay, one that spares cancels, would; a US proposal of that kind was disapproved in 2020.

The share of the quoter’s volume taken by the fast arbitrageur within a jump of the efficient price, on each simulated venue, with the home venue’s parameters and with the venue’s own; three seeds of 20 minutes, a jump every 20 seconds on average. The arbitrageur hears of a jump 20 microseconds before the quoter and sends through a 5-microsecond link against the quoter’s 20. Data: hf_venues.playbook.
Figure 29.2. The share of the quoter’s volume taken by the fast arbitrageur within a jump of the efficient price, on each simulated venue, with the home venue’s parameters and with the venue’s own; three seeds of 20 minutes, a jump every 20 seconds on average. The arbitrageur hears of a jump 20 microseconds before the quoter and sends through a 5-microsecond link against the quoter’s 20. Data: hf_venues.playbook.

Options venues add two fields a stock venue does not have: mass quotes, one message that replaces the bid and offer of many series, and exchange-side quote risk protection, which stops a maker’s executions when those across a class in a short window exceed limits it has set (Chapter 19). The profile records both, with the protection’s parameters as the desk has set them; they are the last line of defence on a venue where a single sweep touches hundreds of series.

29.3 Futures and FX venues

A pro-rata futures book shares each incoming order among the resting orders in proportion to their sizes, after giving a share to the order that set the price. Size is the parameter: the quoter with the home venue’s 100 units traded 10 884 units in the runs, and with the profile’s 500 it traded 40 633, 3.7 times as much with fewer messages. The larger size also has more of itself taken on each jump, 58% of its volume against 47%, so the edge per unit barely moves, −0.14-0.14 ticks against −0.17-0.17; whether to show the size depends on the edge, and on how many of the other makers over-quote in turn (Chapter 15). A FIFO futures book is a price-time book with contract units: in the runs it trades exactly as the lit equity venue, fee line aside. What its profile adds is the exchange’s message-efficiency benchmark, messages over traded volume per product group, which a requote threshold spends (Chapter 10).

As of September 2026 — One venue per type, as their rules read

US equitiesNasdaq’s ITCH feed is order by order; a replaced order gets a new reference. The access fee cap is $0.003 a share until the first business day of November 2027, when the $0.001 cap adopted in 2024 applies.
Speed bumpIEX’s approval as an exchange, on 17 June 2016, came with a 350-microsecond delay on its inbound and outbound messages. The SEC disapproved an asymmetric four-millisecond delay on Cboe EDGA in February 2020.
FuturesCME’s pro-rata algorithms give the order that first improves the market its share, then allocate pro rata, rounding down, with the remainder FIFO (a vendor’s guide, August 2025). CME’s messaging efficiency programme compares messages over volume with product-group benchmarks.
OptionsCboe’s risk tools stop a maker’s executions once its notional, volume, count or percentage-of-quote limit over a period of 100 milliseconds to a day is reached.
FXSome primary venues introduced speed bumps to protect dealers (BIS, 2022); last look must be disclosed under the FX Global Code.
CryptoA large spot venue’s endpoint returned order limits of 100 per 10 seconds and 200 000 a day on 24 September 2026.
BettingOne betting exchange delays placing bets in play by one to twelve seconds so that customers can cancel unmatched bets.

FX venues split the profile in two: a central limit order book (an ECN) with a firm-price protocol, and the disclosed or undisclosed last look of the streaming channels (Chapter 21). The profile for an ECN holds the minimum size (a million of the base currency is a common lot, so the home venue’s 100 units is not even a valid order: validate says so), the fee in basis points or per million, the venue’s latency floor or speed bump if it has one, and the session, which runs five days round the clock with a weekly gap.

29.4 Crypto, on-chain and event venues

A crypto venue meters orders. With the profile’s budget, one order every eight seconds and a burst of five, the quoter with the home venue’s parameters sent 2 735 orders in twenty minutes and had 2 581 of them rejected: every rejected order was sent again at the next book update, and each rejection consumed nothing but left the quote missing. Paced to one requote every sixteen seconds, the rule the profile’s validation enforces (two orders a requote within the budget), it sent 118 orders, none rejected, and traded 8 333 units against 7 267 (Figure 29.3).

The crypto venue’s order budget (one order every eight seconds, a burst of five) against the quoter’s pacing: orders sent and accepted (left, log scale) and volume traded (right), three seeds of 20 minutes. Up to an eight-second gap the venue accepts 151 to 154 orders whatever is sent, the whole budget; volume peaks at eight seconds. Data: hf_venues.budget_curve.
Figure 29.3. The crypto venue’s order budget (one order every eight seconds, a burst of five) against the quoter’s pacing: orders sent and accepted (left, log scale) and volume traded (right), three seeds of 20 minutes. Up to an eight-second gap the venue accepts 151 to 154 orders whatever is sent, the whole budget; volume peaks at eight seconds. Data: hf_venues.budget_curve.

The budget binds in every run up to an eight-second gap: the venue accepts 151 to 154 orders in twenty minutes, 0.125 a second plus the burst, whatever the quoter sends. What the pacing decides is which ones. A quoter that fires at every book update spends the budget in bursts and has no orders left when the market moves; a paced one spends it evenly. Volume peaks at an eight-second gap, 10 100 units, with 28 orders rejected in bursts; the sixteen-second rule gives up a sixth of that volume to have no rejections at all. The cancels are free in this budget, as they are on the venue in the dated box; the jump cancel never waits, which is why the profile’s validation requires it.

An on-chain venue has no matching engine and no profile field for one: its fields are the block time, the pool’s fee, the gas and the builder auction that orders the transactions in a block (Chapter 25). The simulator does not run it; the profile records it so that the desk’s venue list is complete and so that a strategy that assumes an order book is refused there.

An event venue that delays new orders in play, and not cancels, protects resting orders: the arbitrageur’s order waits five seconds, the quoter’s cancel does not, and only 5.6% of the quoter’s volume was picked off, against 42% on the lit venue. But the delay applies to the quoter’s own new orders too, and 52% of its volume there was taken, not made: an order priced for the book it saw lands five seconds later in a book that has moved, crosses it, and trades as the aggressor at the old price. The edge was the worst of the eight venues after the batch, −0.52-0.52 ticks a unit. The profile’s parameter, a three-tick requote threshold, cut the messages by 70% (799 to 238) for 6% less volume, because a requote that lands five seconds late is mostly wasted, and cut the taken share to 34%; the edge did not improve (−0.57-0.57). Fixing it needs code that prices for where the book will be when the order lands, or sends no new order while the price moves.

29.5 Onboarding a new venue

The batch venue is the other one no parameter fixes. It protects the quoter completely, no volume picked off, because the jump cancel lands in the same interval as the arbitrageur’s order and is processed before the batch clears. But a quoter that joins the touch in a uniform-price auction is filled only when the batch clears through its price, which happens when the order flow in that batch runs against it: 2 567 units at −1.12-1.12 ticks a unit, every fill in the auction. The venue needs a quoter that prices against its fair value (Chapter 2), not the touch.

That result sets the order of onboarding. A desk writes the venue half of the profile from the rulebook, the fee schedule, the feed and order-entry specifications and the technical notices; validates it with the home venue’s quoting half, which lists what the home parameters break; runs the strategy on the simulator configured from the profile, with the home and the proposed parameters, and reads the difference; then connects to the venue’s test environment, runs the conformance tests the venue requires, and starts with small size under the risk controls of Chapter 27, as a staged rollout (One Quant Book 7, chapter 21).

venuevolumeownpicked offedge (ticks)messagesown
lit equity14 567=42%+0.03+0.03591=
inverted equity14 567=42%+0.03+0.03591=
bumped equity14 567=42%+0.03+0.03591=
batch2 567=0%−1.12-1.12330=
pro-rata futures10 88440 63347% / 58%−0.17-0.17 / −0.14-0.14474419
FIFO futures14 567=42%+0.03+0.03591=
crypto7 2678 33356% / 48%−0.07-0.07 / −0.17-0.172 857191
event8 3677 9006% / 4%−0.52-0.52 / −0.57-0.57799238

The table is the chapter’s named result: the quoter’s volume, the share picked off, its edge (ticks a unit against the efficient price five seconds later) and its messages on each venue, with the home venue’s parameters and, where they differ, the venue’s own (an equals sign: nothing to change). In this market joining the touch is roughly break-even on the continuous venues, as chapter 1 found; the venues differ in what takes the edge away, and a profile’s parameters recover only what parameters can.

The profile is kept alive after onboarding. Venues change fee schedules monthly, add order types, move data centres and change limits; each change is a new version of the venue half, validated against the quoting half, and replayed through the simulator before it takes effect. The profile’s date is the date somebody last read the rulebook.

29.6 Tutorial: one code, eight venues

Goal. Encode eleven venue profiles, validate each with the home venue’s quoting parameters, and run one quoter on the eight simulated venues with the home and the venue’s own parameters. End state: the result table and the three figures.

  1. The profiles: firm.venueprofile.standard(), a Registry that validates each profile on entry and round-trips through JSON.
  2. The rules: validate; hf_venues.home_errors lists what the home parameters break (the crypto budget, the FX lot).

                e.append(f"unknown order type {t!r}")
        q = p.quoting
        if q.size <= 0 or q.size % p.lot:
            e.append("quote size must be a positive multiple of the lot")
        if q.post_only and "post_only" not in p.order_types:
            e.append("the quoting uses post-only orders, which the venue does not offer")
        if p.asymmetric and not p.speed_bump_ns:
            e.append("an asymmetric delay needs a delay")
        if p.asymmetric and "post_only" in p.order_types and not q.post_only:
            e.append("the delay spares post-only orders: the quoting should send them")
        if p.budget_orders_per_s > 0:
            if q.gap_ns <= 0:
                e.append(f"requotes are not paced, against a budget of {p.budget_orders_per_s} orders a second")
            elif 2e9 / q.gap_ns > p.budget_orders_per_s * 1.0001:      # a requote sends at most one new order a side
                e.append(f"requotes can need {2e9 / q.gap_ns:.3f} orders a second against a budget of "
                         f"{p.budget_orders_per_s}")
            if not p.cancels_free:
                e.append("cancels must be free: the jump cancel cannot wait for the budget")
        if p.fee_unit == "bp" and p.asset_class in ("equity", "futures"):
            e.append("fees in basis points on an equity or futures venue")
        if p.venue_type in SIMULATED and not p.simulated:
    Listing 29.1. The rules that tie the quoting half to the venue half: lot, post-only, asymmetric delays and the order budget. code/firm/venueprofile/firm_venueprofile.py
  3. The quoter, written once: it joins the others’ best prices, requotes past a threshold and no faster than its pacing, and cancels its stale side on a jump signal.

    
        def on_timer(self, ctx, tag):
            kind, s = tag
            if kind == "requote":
                self.pending = False
                self._requote(ctx)
                return
            side = "S" if s > 0 else "B"                      # a jump up makes our offer stale
            self.cool[side] = ctx.now_ns + self.q.cool_ns
            for o in list(ctx.orders.values()):
                if o["side"] == side and o["status"] in ("live", "pending"):
                    self._cancel(ctx, o)
    
        def on_report(self, ctx, rep):
            if type(rep).__name__[-1] == "J" and getattr(rep, "reason", "") == "T":
                self.rejects += 1
    
        def _requote(self, ctx):
            b, a = self._ext_best(ctx, 1), self._ext_best(ctx, -1)
            if b is None or a is None or b >= a:
                return
            pos, q = ctx.position(1), self.q
            b, a = b - q.offset * self.tick, a + q.offset * self.tick
            want = {"B": (b, q.size if pos + q.size <= q.limit and ctx.now_ns >= self.cool["B"] else 0),
                    "S": (a, q.size if pos - q.size >= -q.limit and ctx.now_ns >= self.cool["S"] else 0)}
            changed = False
            for side, (px, qty) in want.items():
                mine = [o for o in ctx.orders.values() if o["side"] == side and o["status"] in ("live", "pending")]
                keep = [o for o in mine if qty and abs(o["price"] - px) < q.min_move * self.tick]
                for o in mine:
                    if not keep or o is not keep[0]:
                        self._cancel(ctx, o)
                        changed = True
                if not keep and qty:
                    ctx.send(X.Order(1, side, qty, px, post_only=q.post_only))
                    self.messages += 1
                    self.orders += 1
                    changed = True
            if changed:
    Listing 29.2. The jump signal empties the stale side for a cooling period; the requote keeps one order a side at the target unless the target moved by the threshold. code/firm/venueprofile/firm_venueprofile.py
  4. The runs: hf_venues.playbook (three seeds of 20 minutes, home and own) and hf_venues.budget_curve.

What to change next. Give the batch venue a quoter that prices against a fair value; add a delay-aware quoter for the event venue that sends no new order while the price moves; add the options venue with a mass-quote throttle.

29.7 Build: venue profiles

Purpose. Keep one validated, versioned page per venue, and turn it into the simulator’s configuration, the quoter’s parameters and the registry and fee-schedule rows.

Interface. Quoting, Profile (to_dict, from_dict), validate(p), Registry (get, by_type, simulated, dump, load), standard(), HOME, exchange_config(p), venue_record(p) (Book 1’s firm.venues), fee_schedule(p) (Book 1’s firm.feesched), jumps, Quoter, Sniper, run(p, quoting, seconds, seed).

Rules. Prices in 1/10 000 of the currency, as the simulator’s; units as the market’s; a profile that fails validation cannot enter a registry; the budget applies to the quoter’s session only (the background stands for many participants with their own).

Acceptance tests. code/firm/venueprofile/tests/: every standard profile validates and the home parameters break the crypto budget and the FX lot; a malformed profile lists all its faults; JSON round trip; the simulator’s configuration for pro rata, batch, event and crypto; short runs in which the bumped venue changes no race, the inverted venue changes the fee sign only, the event venue’s delay protects resting orders, the paced quoter has no rejects, and the larger pro-rata size trades more than twice the volume.

Stretch. A profile diff that lists which rules a venue notice breaks; the options venue with mass quotes; versioned profiles with effective dates.

Sources and further reading

  • Nasdaq, TotalView-ITCH 5.0 specification.
  • US Securities and Exchange Commission, Release No. 34-78101 (IEX, 2016) and the order disapproving Cboe EDGA’s liquidity provider protection delay (February 2020).
  • CME Group, Globex Messaging Efficiency Program, rule filing with the CFTC, 8 November 2019.
  • Betfair Developer Program, “Why do you have a delay on placing bets on a market that is in-play”.

29.8 Exercises

Exercise 29.1 ★

The crypto budget is 0.125 orders a second with a burst of five. How many orders can the venue accept in twenty minutes, and how does that compare with the runs?

Solution

Solution of Exercise 29.1.

0.125×1 200+5=1550.125\times1\,200+5=155 orders. The runs with a pacing of eight seconds or less had 151 to 154 accepted: the budget, all of it, whatever was sent.

Exercise 29.2 ★

A requote sends at most one new order on each side. What minimum gap between requotes does the budget require, and what does the home venue’s quoting set?

Solution

Solution of Exercise 29.2.

Two orders every 2/0.125=162/0.125=16 seconds. The home venue’s quoting has no pacing at all (a gap of zero), which the profile’s validation refuses.

Exercise 29.3 ★

On the pro-rata book, an incoming order of 1 000 contracts meets a level of 5 000 resting contracts, of which the order that set the price holds 200 and the quoter 500. With a 40% top-order share and the rest pro rata, how many does the quoter get?

Solution

Solution of Exercise 29.3.

The top order gets min⁡(0.4×1 000, 200)=200\min(0.4\times1\,000,\,200)=200. The other 800 contracts are shared among the remaining 4 800 in proportion to size: the quoter gets ⌊500×800/4 800⌋=⌊83.3⌋=83\lfloor 500\times800/4\,800\rfloor=\lfloor83.3\rfloor=83, and the rounding remainders go FIFO.

Exercise 29.4 ★★

Why does a symmetric 350-microsecond delay change none of the quoter’s fills in the runs, and what would change that?

Solution

Solution of Exercise 29.4.

Every message of every agent is delayed by the same 350 microseconds, so the arbitrageur’s order still arrives before the quoter’s cancel, and the tape’s flow, whose events are tens of milliseconds apart, meets the quoter’s orders in the same order as without the delay. An asymmetric delay that spares cancels, or a quoter that reacts to a signal the arbitrageur does not have, would change the races.

Exercise 29.5 ★★

On the event venue only 6% of the quoter’s volume is picked off, yet its edge is −0.52-0.52 ticks. Explain.

Solution

Solution of Exercise 29.5.

The delay protects resting orders from the arbitrageur but applies to the quoter’s own new orders: 52% of its volume there was taken, not made, because an order priced for the book it saw landed five seconds later in a book that had moved and crossed it. Those takes are at stale prices, in the direction the price had already moved.

Exercise 29.6 ★★

On the batch venue the quoter is never picked off. Why does it lose more than a tick a unit, and what would you change?

Solution

Solution of Exercise 29.6.

In a uniform-price batch the quoter’s bid at the touch executes only when the batch clears at or below it, which happens when the batch’s selling outweighs its buying: its fills come when the price is going its way least. It is never picked off because its jump cancel lands in the same interval as the arbitrageur’s order and is processed before the clearing. The fix is in the pricing, not the parameters: quote around a fair value that anticipates the batch’s clearing price, and size by the imbalance.

Exercise 29.7 ★★★

Coding. With hf_venues.budget_curve, which pacing maximises volume, how many orders does it have rejected, and why does it beat the sixteen-second rule?

Solution

Solution of Exercise 29.7.

An eight-second gap: 10 100 units against 8 333 at sixteen seconds, with 28 orders rejected in twenty minutes. The sixteen-second rule leaves tokens unused (118 of about 155 accepted); the eight-second pacing uses them all, relying on the burst to absorb the moments when both sides need a requote at once, and pays for it with a few rejects.

Exercise 29.8 ★★★

Find the flaw. “The new venue’s profile passed validation and the simulator shows our usual edge, so we can go live at full size on Monday.”

Solution

Solution of Exercise 29.8.

Validation checks the profile against its own rules, and the simulator checks the strategy against the simulator’s model of the venue: neither checks the profile against the venue. The first days must run in the venue’s test environment and then at small size under risk limits, comparing fills, rejects and fees with the profile, before full size.

29.9 Problem: One Code, Eight Venues

Problem 29.1

Weekend problem — one code, eight venues

A market-making desk that quotes on a US equity exchange is asked to take its quoter to seven other venue types.

Part I — The venues.

  1. Define a venue profile and its two halves.
  2. List the fields of the venue half and, for each, a chapter of this book where it mattered.
  3. What do the dated box’s venues say about matching, delays and budgets?
  4. Why are an on-chain pool and an FX last-look stream in the registry although the simulator does not run them?

Part II — The rules.

  1. Give the validation rules that tie the quoting half to the venue half.
  2. Which rules do the home venue’s parameters break, and on which venues?
  3. Why must the jump cancel be free under the budget?
  4. How does the quoter find its own orders, and what goes wrong if the feed shows an order before its acknowledgement arrives?

Part III — Measurements.

  1. Describe the market of the runs: the flow, the jumps, the arbitrageur, the quoter’s signal.
  2. Give the volume, share picked off, edge and messages on each venue with the home parameters.
  3. Which venues change with the venue’s own parameters, and by how much?
  4. Describe the budget curve and explain why the accepted orders are flat up to eight seconds.

Part IV — The verdict.

  1. State the named result: the quoter’s capture and message count on each venue type with and without the venue-specific parameters.
  2. Which venues need a parameter, which need nothing, and which need different code?
  3. Why does the bumped venue not protect the quoter, and what kind of delay would?
  4. What would you do on the event venue?
  5. What would you do on the batch venue?
  6. How would you onboard a ninth venue, step by step?
  7. How do you keep a profile current, and who signs off a change?
  8. In one sentence: what does a venue profile buy?
Solution

Solution of Problem 29.1.

  1. See Definition 29.1; the venue half (what the venue does) and the quoting half (what the desk does there).
  2. Matching (Chapter 15), tick and lot, fees and unit (Chapter 17), feed (Chapter 1), order types (Chapter 10), delays (Chapter 9), budgets (Chapter 24), session and quirks.
  3. Order-by-order feeds with new references on replace; a symmetric 350-microsecond delay and a disapproved asymmetric one; top order then pro rata on some futures; message-efficiency ratios; execution-based risk tools on options; 100 orders per 10 seconds and 200 000 a day on a crypto venue; a one-to-twelve-second in-play delay on placing bets.
  4. So that the list of venues is complete and a strategy that assumes an order book is refused where there is none.
  5. Size a multiple of the lot; post-only only where offered; post-only orders where a delay spares them; requotes paced within the order budget; free cancels under a budget.
  6. The crypto budget (no pacing) and the FX lot (100 units against a million).
  7. The jump cancel is the quoter’s protection; if it waited for tokens, a budget breach would turn into a pick-off.
  8. By the references in its acknowledgements, which arrive before the public feed; if the feed came first, the quoter would take its own order for someone else’s and chase it.
  9. Book 7’s tape flow replayed as real orders; a jump of the efficient price every 20 seconds on average; an arbitrageur who hears of it first and takes the stale best level; the quoter hears 20 microseconds later and cancels its stale side.
  10. Lit, inverted, bumped and FIFO futures: 14 567 units, 42% picked off, +0.03+0.03 ticks, 591 messages; batch 2 567, 0%, −1.12-1.12, 330; pro rata 10 884, 47%, −0.17-0.17, 474; crypto 7 267, 56%, −0.07-0.07, 2 857; event 8 367, 6%, −0.52-0.52, 799.
  11. Pro rata (size 500: 40 633 units, 58% picked off, −0.14-0.14, 419 messages); crypto (16-s pacing: 8 333 units, 191 messages, no rejects); event (3-tick threshold: 7 900 units, 238 messages, −0.57-0.57).
  12. Up to eight seconds the venue accepts the whole budget, 151 to 154 orders; volume rises as pacing spreads them, peaks at eight seconds and falls beyond sixteen, where the budget is no longer used.
  13. The table of the chapter’s result: volume, share picked off, edge and messages on each venue, home and own.
  14. A parameter: pro rata, crypto, event. Nothing: lit, inverted (the fee line only), bumped, FIFO futures. Different code: batch and event.
  15. The delay applies to the cancel as to the arbitrageur’s order; an asymmetric delay that spares cancels would.
  16. Price new orders for where the book will be when they land, or send none while the price moves; keep resting orders, which the delay protects.
  17. Quote around a fair value rather than the touch, and size by the batch’s imbalance.
  18. Write the venue half from the rulebook and specifications; validate with the home quoting half; run the simulator with home and proposed parameters; the venue’s test environment and conformance tests; small size under risk controls; full size once fills, rejects and fees match the profile.
  19. Version it; each venue notice is a new version, validated and replayed before its effective date; the desk head and the venue’s owner sign off.
  20. Learning a venue’s rules before the first order rather than from the losses.

29.10 Interview questions

Interview question 29.1 ★ developer

What fields would you put in a venue profile, and which three would you check before the first order?

Solution

Solution of Interview question 29.1.

Matching rule, tick and lot, fees and unit, feed, order types, delays, budgets, session and quirks, and the desk’s parameters. Before the first order: the lot (a size the venue refuses), the budget and what a breach does, and the fee sign.

What the interviewer is looking for: rules tied to parameters, not a list of facts.

Interview question 29.2 ★★ trader

You move a quoting strategy from a price-time equities venue to a pro-rata futures book. What do you change first, and what is the risk of the change?

Solution

Solution of Interview question 29.2.

The size: allocation follows displayed size, so the home size gets a small share. The risk is that a larger size is also more of what is taken when the price jumps (58% against 47% of volume in the chapter’s runs), and that everyone over-quotes in turn.

What the interviewer is looking for: size as the pro-rata parameter, and its cost.

Interview question 29.3 ★★ developer

Your orders on a crypto venue are being rejected in bursts, and your quotes are missing when the market moves. Diagnose and fix.

Solution

Solution of Interview question 29.3.

The order budget: requotes at every book update burn the tokens in bursts, each rejected order is sent again, and the tokens are gone when the market moves. Pace requotes within the budget, keep cancels outside it, and spend the burst on moves, not on noise.

What the interviewer is looking for: reading rejects as a budget, not a network fault.

Interview question 29.4 ★★ researcher

A venue introduces a delay on incoming orders that spares cancels. How does it change a maker’s economics, and whose?

Solution

Solution of Interview question 29.4.

Resting quotes can be cancelled before the delayed taker arrives, so the maker’s adverse selection from fast takers falls and it can quote tighter or bigger; the fast takers lose, and so, in part, do slow takers who wait longer. A maker whose own new orders are delayed pays in stale placements.

What the interviewer is looking for: who pays for the protection.

Interview question 29.5 ★★ researcher, trader

With an order budget of bb a second and a burst of BB, and requotes of two orders each, what pacing uses the budget without rejects, and why might a faster pacing trade more?

Solution

Solution of Interview question 29.5.

At most bb orders a second on average, so a requote of two orders every 2/b2/b seconds never breaches. A faster pacing can trade more because the burst BB absorbs short spurts and the quotes stay nearer the touch, at the cost of occasional rejects.

What the interviewer is looking for: average rate against burst.

Interview question 29.6 ★★★ researcher

In a uniform-price batch auction a maker joins the best bid and offer. Show that its fills are adversely selected, and describe a quoting rule that is not.

Solution

Solution of Interview question 29.6.

The maker’s bid at the touch executes only if the clearing price is at or below it, which happens when sell orders in the batch exceed buy orders at that price: its fills are conditioned on selling pressure, so they are followed by lower prices. A rule that quotes around a fair value adjusted for the batch’s expected imbalance, and sizes down when the imbalance is informative, is not adversely selected in the same way.

What the interviewer is looking for: conditioning on the clearing event.

Terms defined in this chapter

See all 2333 terms in the glossary