Skip to content
Module 07 of 1255 min readMixed

Algorithmic and high-frequency trading

Execution algorithms (VWAP, TWAP, implementation shortfall). Market-making algos. HFT — latency arbitrage and what the speed advantage actually buys.

58%

Listen along

Read “Algorithmic and high-frequency trading” aloud

Plays in your browser using on-device text-to-speech — nothing leaves the page.

Learning objectives

By the end of this module, you should be able to:

  • 01Distinguish execution algorithms from prop algorithms
  • 02Describe what high-frequency trading does and what it doesn't
  • 03Identify the role of co-location and latency in modern trading

Algorithmic trading dominates modern markets. ~80% of US equity volume is algorithmic. The breakdown: about half is execution algos (helping institutions trade with minimal market impact), about half is proprietary algos (taking positions for profit). The two have different goals and different mechanics.

Execution algorithms

Execution algos solve a specific problem: institutions want to buy or sell large quantities without moving the market against themselves. The institutional trader's job is not to predict price direction; it is to fill a parent order produced by the portfolio manager at a cost as close to a defined benchmark as possible. Each algorithm targets a different benchmark and has different trade-offs between market impact, timing risk, and information leakage.

VWAP — the most-used execution benchmark

text
Σ ( price_i × volume_i )
VWAP = ────────────────────────────────────
Σ volume_i
where:
i = index running over every trade in the measurement window
(typically the full trading day)
price_i = price at which trade i printed
volume_i = shares (or contracts) executed at price_i
Σ = summation across all trades i in the window
Numerator = total dollar value traded in the window
Denominator = total volume (share count) traded in the window
Reading: VWAP is the average market price weighted by how much volume
traded at each level. A trader whose average fill price beats the
day's VWAP has executed 'better than average' from a benchmark sense.

A VWAP execution algorithm aims to fill a parent order at a price close to the day's VWAP by slicing the order into child orders sized proportional to the forecast intraday volume curve. Historical volume curves are bell-shaped with humps near the open and close; VWAP algos place more child orders during high-volume periods to track the benchmark.

TWAP — simpler, slower, lower information leakage

text
TWAP = ( 1 / N ) × Σ price_i
where:
N = the number of equal time intervals into which the
execution window is divided (e.g. 78 five-minute slots
in a 6.5-hour US trading day)
price_i = the average market price during interval i
Σ = sum across the N intervals
A TWAP execution slices the parent order into equal child orders
delivered at equal time intervals. Each child order is the same size,
regardless of where volume actually flows that day.

TWAP works well when intraday volume patterns are unreliable (illiquid names, after-hours) or when the trader wants to minimise predictability and information leakage. The cost: timing risk is higher because the trade is spread across the day regardless of where the market actually moves.

Implementation shortfall — the honest benchmark

text
IS = ( Decision price − Average fill price ) × ( Filled shares )
+ ( Decision price − Closing price ) × ( Unfilled shares )
+ Commissions and fees
for a buy order. For a sell, swap the signs on the price differences.
where:
Decision price = the market mid-price at the moment the portfolio
manager decided to trade — the 'arrival price'
Average fill = the volume-weighted average price actually paid
price on the filled portion of the order
Filled shares = the number of shares actually executed before
end of window
Closing price = the market price at end of execution window for
any shares left unfilled
Unfilled shares = the residual that was not executed
Commissions = brokerage costs, exchange fees, regulatory fees

Implementation shortfall captures the total cost of executing: market impact on the filled portion (the gap between decision price and average fill), opportunity cost on the unfilled portion (the gap between decision price and where the market ended up), plus explicit costs. It is the honest accounting because it includes the cost of what you didn't execute — which traders who only optimise for VWAP can ignore. The IS-minimising algorithm uses real-time market signals to balance impact against opportunity cost dynamically.

Other execution-algo flavours

  • POV (Percent of Volume): execute at a defined percentage of market volume (e.g., 10% of every print). Used when filling time is flexible but market impact must be controlled.
  • Iceberg: post a small visible quantity at a price; replenish automatically as it fills. Hides true order size from the visible book.

Proprietary trading algorithms

  • Market making: post continuous bid-ask quotes, earn spreads. Algos manage inventory, adjust spreads to changing volatility, hedge exposure dynamically. Citadel Securities, Virtu, Susquehanna dominate equity market making.
  • Statistical arbitrage: identify pairs or baskets of securities that have historically moved together. When they diverge, bet on convergence. Renaissance Medallion, D.E. Shaw built empires here.
  • Latency arbitrage: exploit price discrepancies between venues. If a stock trades 17.50 on NYSE and 17.51 on NASDAQ for a few milliseconds, buy on NYSE and sell on NASDAQ. Requires extreme low latency.
  • Trend-following: detect price momentum and ride it. Used by CTAs (commodity trading advisors). Most macro hedge funds use some flavour of this.
  • Event arbitrage: trade announcements (earnings, M&A) faster than humans can react. Race to be first to read the press release and trade on it.

What HFT actually is

High-frequency trading is a subset of algorithmic trading characterised by extremely low latency (microseconds), short holding periods (seconds or less), and high transaction volumes (millions of trades per day per firm). Major HFT firms: Citadel Securities, Virtu Financial, Hudson River Trading, Jump Trading, DRW. HFT firms typically run several strategies simultaneously — market making for the bulk of revenue, latency arbitrage as a sideline, statistical arbitrage as a longer-horizon play.

Co-location and the latency race

HFT firms pay exchanges to co-locate their servers in the same data centre as the exchange's matching engine. This reduces the speed-of-light latency from milliseconds to microseconds. Major exchanges have entire buildings of co-located servers next to the matching engine. Specialised microwave networks transmit market data between New York, Chicago, and London faster than fibre — every microsecond of edge matters.

The honest HFT debate

Critics argue HFT extracts rents from slower traders without adding social value, and creates market fragility (Flash Crash, May 2010). Defenders argue HFT provides liquidity, narrows bid-ask spreads (the average US equity bid-ask spread is 1 cent vs 12.5 cents pre-decimalisation in 2001), and lowers retail trading costs. Both are partly right. The Volcker Rule and post-2010 SEC regulations have curtailed the worst practices (quote stuffing, spoofing) without eliminating HFT's structural role. The market is genuinely different — cheaper, faster, but more fragile during stress.

Algo trading in Kenya and East Africa

Kenyan algo trading is very limited. NSE Kenya doesn't have a sophisticated co-location offering. Daily volumes are too thin for HFT to be profitable. Some institutional brokers use simple execution algos (VWAP, TWAP) for large client orders. Prop algorithmic trading is rare. The market structure is closer to 1990s US equity than to 2026 US equity. As exchange technology and volumes grow, algo trading should follow — but it's a 5-10-year journey, not next year.

Exercise

You're a head of trading at a Kenyan pension fund managing KES 200bn. You want to deploy KES 5bn over the next month into a basket of NSE equities. Walk through how you'd structure execution. What algos or manual approaches would you use? What would you avoid?

Key takeaways

  • Execution algos help fill institutional orders without market impact. VWAP, TWAP, implementation shortfall.
  • Prop algos take directional positions for short horizons. Statistical arbitrage, market making, latency arbitrage.
  • HFT is real but smaller than headlines suggest — and it provides genuine liquidity benefits alongside the controversies.
Loading progress…
LeadAfrikPublic Economics Hub