Free lesson · HFT & microstructure
HFT economics and the information-to-fill timeline
Open interactive lessonPractice calculationsExplore labs
Start with the idea
HFT operates where information and execution opportunities can change within the time it takes to observe, compute, transmit and receive an acknowledgement. Speed helps only when the remaining opportunity is worth more than the cost of acting.
Symbols, units & horizon
- α₀: initial conditional expected edge in basis points
- ℓ: information-to-action latency in milliseconds
- τ: assumed exponential decay time in milliseconds
- c: all-in expected cost in the same basis points
- V: expected net edge per attempted action under this toy model
- ℓ*: maximum latency for positive edge when α₀>c>0
- ln: natural logarithm
When and why to use this
Use latency sensitivity to determine the feasible trading horizon and identify which engineering delay actually reduces expected return.
Separate market making, short-horizon directional prediction, cross-instrument lead–lag and execution optimisation. Market making supplies liquidity and bears selection/inventory risk; directional strategies pay for immediacy; execution algorithms optimise an existing parent order rather than create an investment thesis.
Record exchange event time, local receipt time, feature completion, decision, send and acknowledgement. A feed timestamp is not the earliest moment your process could have traded. Packet loss, sequence gaps, clock uncertainty and tail latency affect which book was genuinely actionable.
A retail polling API may support a useful slower strategy but does not reproduce exchange-level queue dynamics. First measure an opportunity-decay curve and the operational latency distribution. Spend on faster code or infrastructure only when the economic sensitivity justifies it.
HFT economics and the information-to-fill timeline
- Assume the remaining edge decays exponentially; this is a model to estimate, not an exchange law. Subtract the cost hurdle.
- At break-even α₀exp(−ℓ/τ)=c. Divide by α₀ and take logs: −ℓ/τ=ln(c/α₀).
- Multiply by −τ to obtain ℓ*=τln(α₀/c). If α₀≤c, even zero latency offers no positive edge under these assumptions.
Initial edge 2 bps, cost 1 bp and τ=10 ms imply break-even latency 6.931 ms. At 5 ms, remaining edge≈1.213 bps and net≈.213 bps.
Apply it in a strategy
- Define a short-horizon conditional price or execution target and estimate decay on a formation sample.
- Replay the full observed latency distribution, including tails, instead of subtracting one average delay.
- Compare net edge with a slower, simpler implementation before committing to a lower-latency architecture.
Research deliverable
Create a timestamp diagram and a net-edge-versus-latency plot with a documented cost and uncertainty range.
Research sources, review dates and limitations
Python implementation
Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.
from math import exp,log
def latency_edge(initial,cost,decay_ms,latency_ms):
if initial<=0 or cost<=0 or decay_ms<=0 or latency_ms<0: raise ValueError("Positive scales required")
net=initial*exp(-latency_ms/decay_ms)-cost
hurdle=decay_ms*log(initial/cost) if initial>cost else None
return net,hurdle
print(latency_edge(2,1,10,5))Continue learning
High-Frequency Trading: Signals, Queues & Execution — all lessons- HFT economics and the information-to-fill timeline
- Order-book features: imbalance, microprice and event flow
- Volume clocks, trade imbalance and VPIN
- Queue position, fill probabilities and adverse selection
- Inventory-aware quoting and economic edge development
- Event-driven backtesting and order lifecycle correctness
- HFT research promotion, drift and operating limits
Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations