Level 5 — MasteryHFT & Advanced Concepts

HFT & Advanced Concepts

90 minutes60 marksprintable — key stays hidden on paper

Chapter: 6.5 High-Frequency Trading & Advanced Concepts Time limit: 90 minutes Total marks: 60 Instructions: Answer ALL three questions. Show full derivations, code, and reasoning. Calculators permitted. Where code is requested, pseudo-Python is acceptable but must be logically complete.


Question 1 — Latency Arbitrage & Colocation Physics (20 marks)

A latency arbitrageur observes a price update on Exchange A (in New Jersey) and wishes to trade the same instrument on Exchange B (in Chicago), a great-circle distance of 1180 km away. The signal travels through fibre-optic cable with refractive index n=1.47n = 1.47; speed of light in vacuum c=3.0×108c = 3.0 \times 10^8 m/s.

(a) Compute the one-way theoretical minimum propagation latency through the fibre. Compare it to the vacuum/near-vacuum latency achievable by a microwave line-of-sight network (assume n1.0003n \approx 1.0003, treat as vacuum). Give the time advantage in microseconds. (6)

(b) The fibre route is not straight — it is 15% longer than great-circle due to right-of-way constraints. Recompute the fibre latency and the total microwave advantage (one-way). (4)

(c) A competitor colocates its server inside Exchange B's datacentre, reducing its "last-mile" processing + local-network latency from 250μs250\,\mu s to 30μs30\,\mu s, while you use standard Direct Market Access (DMA) at 250μs250\,\mu s. Assuming both of you receive the Exchange A signal simultaneously via the same microwave feed, model the total race time for each and determine who wins and by how much. State the two distinct latency components each trader is optimising. (5)

(d) Explain, with reference to the physics above, why regulators and exchanges introduced speed bumps (e.g., IEX's 350 µs coiled-fibre delay). Argue whether a fixed speed bump neutralises latency arbitrage of the type in (c). (5)


Question 2 — Execution Algorithms: VWAP vs TWAP vs POV (22 marks)

An institution must buy 600,000 shares over a 6-interval trading window. The predicted market volume and prices per interval are:

Interval ii 1 2 3 4 5 6
Market volume ViV_i (k shares) 200 400 800 600 300 200
Price PiP_i ($) 50.0 50.2 50.5 50.3 50.1 50.0

(a) Compute the schedule (shares per interval) for a TWAP algorithm and for a VWAP algorithm (proportional to predicted volume). (5)

(b) Compute the average execution price achieved by each algorithm (ignore market impact; fills at PiP_i). Then compute the interval-VWAP benchmark VWAPmkt=ViPiVi\text{VWAP}_{mkt} = \frac{\sum V_i P_i}{\sum V_i}. Which algo tracks the benchmark exactly, and why? (6)

(c) A POV (Percentage of Volume) algorithm targets participation rate ρ=15%\rho = 15\% of realised volume. Realised volumes turn out to be 1.2× the predicted ViV_i in every interval. Compute the shares POV executes each interval and the total. Does POV complete the 600k order? If not, describe precisely how a POV algorithm handles the residual and the associated risk. (6)

(d) Write pseudo-code for a POV executor that, per interval, (i) reads realised volume, (ii) caps the child order at ρ×Virealised\rho \times V_i^{realised}, (iii) tracks remaining quantity, and (iv) forces completion in the final interval. Comment on why (iv) reintroduces market-impact risk. (5)


Question 3 — Market Making, Flash Crashes & Circuit Breakers (18 marks)

(a) A market maker quotes a two-sided market with a spread of 4 cents on a 40.00stockandturnsover8,000,000shares/day(roundtrip),capturinghalfthespreadperroundtriponaverage.Modeldailygrossspreadrevenue.Thensubtractanadverseselectioncostequalto3540.00 stock and turns over **8,000,000 shares/day** (round-trip), capturing half the spread per round trip on average. Model daily gross spread revenue. Then subtract an adverse-selection cost equal to **35%** of gross spread revenue and a rebate/fee net *credit* of 0.0002 per share traded (one-sided volume = round-trip volume). Compute net daily P&L. (6)

(b) During a flash crash, liquidity evaporates. Model, using a simple limit-order-book depletion argument, why an aggressive sell market order of size QQ walks the book: given book depth d(p)d(p) shares available at each price level spaced Δ\Delta apart, express the average fill price as a function of QQ and show that vanishing depth (d0d \to 0) causes unbounded price impact. (6)

(c) A market-wide circuit breaker (Level 1) triggers at a 7% decline from the prior close and halts trading for 15 minutes. On a stock closing at $40.00, compute the Level 1 trigger price. Then argue, referencing the 2010 Flash Crash, whether single-stock Limit Up-Limit Down (LULD) bands or market-wide breakers better prevent HFT-driven cascade, and state one failure mode of each. (6)


End of paper.

Answer keyMark scheme & solutions

Question 1

(a) Speed in fibre v=c/n=3.0×108/1.47=2.0408×108v = c/n = 3.0\times10^8 / 1.47 = 2.0408\times10^8 m/s. Fibre latency tf=1.18×1062.0408×108=5.782×103t_f = \dfrac{1.18\times10^6}{2.0408\times10^8} = 5.782\times10^{-3} s =5782μs= 5782\,\mu s. (2) Microwave (vacuum) vc=3.0×108v \approx c = 3.0\times10^8: tmw=1.18×1063.0×108=3.933×103t_{mw} = \dfrac{1.18\times10^6}{3.0\times10^8} = 3.933\times10^{-3} s =3933μs= 3933\,\mu s. (2) Advantage =57823933=1849μs1.85= 5782 - 3933 = 1849\,\mu s \approx 1.85 ms. (2) Why: microwave travels ~straight line at near-c; fibre both slows light (n) and is straight here for the comparison.

(b) Fibre path =1.15×1180=1357= 1.15 \times 1180 = 1357 km. tf=1.357×1062.0408×108=6.650×103t_f' = \dfrac{1.357\times10^6}{2.0408\times10^8} = 6.650\times10^{-3} s =6650μs= 6650\,\mu s. (2) Microwave advantage =66503933=2717μs2.72= 6650 - 3933 = 2717\,\mu s \approx 2.72 ms. (2) Why: physical routing overhead compounds the refractive slowdown.

(c) Both receive signal simultaneously, so propagation cancels; only last-mile differs.

  • Colocated: 30μs30\,\mu s.
  • DMA: 250μs250\,\mu s. Colocated trader wins by 25030=220μs250 - 30 = 220\,\mu s. (3) Two components each optimises: (1) propagation latency (network distance — solved by microwave/colo proximity) and (2) processing/last-mile latency (order gateway + local switching — solved by colocation inside the matching-engine datacentre). (2)

(d) Speed bumps add a fixed, deterministic delay to incoming orders so that a marginally faster trader cannot pick off stale quotes (latency arbitrage against slow market makers). (2) Rationale: level playing field, protect resting liquidity, reduce "picking off." (1) A fixed speed bump applied equally does not neutralise the (c)-type race, because it adds the same 350 µs to both traders — the 220 µs relative advantage persists; the winner is unchanged. (2) (Speed bumps only help when asymmetric — e.g., applied to aggressive orders but not to the market maker's cancels, as in IEX's design protecting the pegged midpoint.)


Question 2

(a) Total =600,000= 600{,}000; 6 intervals. TWAP = equal: 600000/6=100,000600000/6 = 100{,}000 shares per interval. (2) VWAP proportional to ViV_i. Vi=200+400+800+600+300+200=2500\sum V_i = 200+400+800+600+300+200 = 2500k. Fraction ×600000\times 600000:

  • i1:200/2500×600000=48,000i1: 200/2500 \times 600000 = 48{,}000
  • i2:96,000i2: 96{,}000
  • i3:192,000i3: 192{,}000
  • i4:144,000i4: 144{,}000
  • i5:72,000i5: 72{,}000
  • i6:48,000i6: 48{,}000 (3) (sum = 600,000 ✓)

(b) TWAP avg price =16Pi=50.0+50.2+50.5+50.3+50.1+50.06=301.16=50.1833= \frac{1}{6}\sum P_i = \frac{50.0+50.2+50.5+50.3+50.1+50.0}{6} = \frac{301.1}{6} = 50.1833. (2) VWAP avg price =wiPiwi= \frac{\sum w_i P_i}{\sum w_i} with wiViw_i \propto V_i: ViPi=200(50.0)+400(50.2)+800(50.5)+600(50.3)+300(50.1)+200(50.0)\sum V_i P_i = 200(50.0)+400(50.2)+800(50.5)+600(50.3)+300(50.1)+200(50.0) =10000+20080+40400+30180+15030+10000=125,690= 10000 + 20080 + 40400 + 30180 + 15030 + 10000 = 125{,}690k. VWAPmkt=125690/2500=50.276\text{VWAP}_{mkt} = 125690/2500 = 50.276. (2) VWAP algo achieves exactly 50.27650.276; it tracks the benchmark exactly because it weights each interval's fill in the same proportion as market volume, so the achieved price = volume-weighted benchmark by construction. TWAP (50.183350.1833) differs because equal weighting under-buys in high-volume/high-price intervals. (2)

(c) POV: child =ρ×Virealised= \rho \times V_i^{realised}, ρ=0.15\rho = 0.15, realised =1.2Vi= 1.2 V_i. So child =0.15×1.2×Vi=0.18Vi= 0.15 \times 1.2 \times V_i = 0.18 V_i (in k shares):

  • i1:0.18×200=36i1: 0.18\times200 = 36k
  • i2:72i2: 72k
  • i3:144i3: 144k
  • i4:108i4: 108k
  • i5:54i5: 54k
  • i6:36i6: 36k Total =0.18×2500=450= 0.18 \times 2500 = 450k shares. (3) POV executes only 450,000, leaving 150,000 residual — it does NOT complete. (1) Handling: POV is volume-driven, not deadline-driven — if volume is insufficient it under-fills. Options: (i) leave order incomplete (participation constraint honoured), or (ii) increase ρ\rho / switch to aggressive completion near close. Risk: forcing completion raises participation → higher market impact and signalling; leaving residual → timing/opportunity risk (unfilled at target). (2)

(d) Pseudo-code: (3 for correct logic, 2 for part iv commentary)

def pov_execute(total_qty, rho, intervals):
    remaining = total_qty
    for i, iv in enumerate(intervals):
        realised_vol = read_realised_volume(iv)      # (i)
        cap = int(rho * realised_vol)                # (ii)
        if i == len(intervals) - 1:                  # (iv) final interval
            child = remaining                        # force completion
        else:
            child = min(cap, remaining)
        send_order(child, iv.price)
        remaining -= child                           # (iii) track remaining
        if remaining <= 0:
            break
    return remaining

Commentary on (iv): forcing child = remaining in the last interval can demand a quantity far exceeding ρ×V\rho \times V, so the order becomes a large fraction of available liquidity — market impact spikes (walks the book), and the forced aggression reveals urgency, worsening execution price. This is the fundamental impact-vs-completion trade-off. (2)


Question 3

(a) Gross spread revenue: half-spread =0.02= 0.02 captured per round trip. Round-trip volume 8,000,000 shares. Interpretation: capturing half the 4¢ spread (0.020.02) per share of round-trip flow. Gross = 8{,}000{,}000 \times 0.02 = \160{,}000.(2)Adverseselection. **(2)** Adverse selection = 0.35 \times 160000 = $56{,}000.(2)Rebatecredit. **(2)** Rebate credit = 0.0002 \times 8{,}000{,}000 = $1{,}600. Net P&L = 160000 - 56000 + 1600 = $105{,}600$. (2)

(b) Market order size QQ consumes book levels. With depth dd per level and spacing Δ\Delta, filling QQ needs k=Q/dk = \lceil Q/d \rceil levels. Prices paid: p0,p0+Δ,,p0+(k1)Δp_0, p_0+\Delta, \dots, p_0+(k-1)\Delta (buy; symmetric for sell walking down). Average fill price for a sell walking down from p0p_0: pˉ=1Qj=0k1d(p0jΔ)=p0ΔQdk(k1)2.\bar p = \frac{1}{Q}\sum_{j=0}^{k-1} d\,(p_0 - j\Delta) = p_0 - \frac{\Delta}{Q}\cdot d\cdot\frac{k(k-1)}{2}. With kQ/dk \approx Q/d: impact ΔQd(Q/d)22=ΔQ2d\approx \frac{\Delta}{Q}\cdot d \cdot \frac{(Q/d)^2}{2} = \frac{\Delta Q}{2d}. (4) As d0d \to 0 (liquidity evaporates in a flash crash), impact ΔQ2d\frac{\Delta Q}{2d} \to \infty — price impact is unbounded, i.e., the order walks arbitrarily far down the book (this is how the 2010 Flash Crash saw prices hit stub quotes near $0.01). (2)

(c) Level 1 trigger = 40.00 \times (1 - 0.07) = 40.00 \times 0.93 = \37.20$. (2) Argument: LULD bands (single-stock, e.g. ±5–10% over a rolling 5-min window) prevent individual runaway prints and stub quotes — directly addresses the 2010 mechanism where individual stocks printed at absurd prices while the index moved modestly. Market-wide breakers halt the whole market on aggregate index decline. (2)

  • LULD failure mode: fragmented liquidity / momentum can push a stock repeatedly to band edges causing many short halts ("limit state" cycling), harming price discovery; also inconsistent bands across venues.
  • Market-wide breaker failure mode: too coarse — a single-stock or ETF cascade (as in 2010) may not breach the aggregate index threshold, so the market-wide breaker never fires while individual names collapse. (2)
[
 {"claim":"Fibre one-way latency for 1180km at n=1.47 is ~5782 microseconds","code":"c=Rational(3,1)*10**8; n=Rational(147,100); v=c/n; t=Rational(118,100)*10**6 / v; result = abs(float(t)*1e6 - 5782) < 2"},
 {"claim":"Microwave advantage with 15pct longer fibre is ~2717 microseconds","code":"c=3.0e8; n=1.47; v=c/n; d=1.15*1.18e6; tf=d/v; tmw=1.18e6/c; adv=(tf-tmw)*1e6; result = abs(adv-2717) < 3"},
 {"claim":"VWAP achieved price equals market VWAP 50.276","code":"V=[200,400,800,600,300,200]; P=[50.0,50.2,50.5,50.3,50.1,50.0]; vwap=sum(v*p for v,p in zip(V,P))/sum(V); result = abs(vwap-50.276) < 1e-6"},
 {"claim":"TWAP average price is 50.18333","code":"P=[50.0,50.2,50.5,50.3,50.1,50.0]; twap=sum(P)/len(P); result = abs(twap-50.183333)<1e-4"},
 {"claim":"POV total executed at 0.18 factor is 450000 shares, residual 150000","code":"V=[200,400,800,600,300,200]; ex=sum(0.18*v for v in V)*1000; result = abs(ex-450000)<1e-6 and abs((600000-ex)-150000)<1e-6"},
 {"claim":"Market maker net daily P&L is 105600 dollars","code":"gross=8000000*0.02; adv=0.35*gross; rebate=0.0002*8000000; net=gross-adv+rebate; result = abs(net-105600)<1e-6"},
 {"claim":"Level 1 circuit breaker trigger price on 40.00 is 37.20","code":"trig=40.00*(1-0.07); result = abs(trig-37.20)<1e-9"}
]