Broker Allocation With Thompson Sampling
Deciding how to split order flow across competing brokers is a classic explore-exploit problem, and Thompson sampling handles it by routing more flow to brokers that look better while still leaving room to keep testing the others.
A trading desk splitting orders across several brokers faces a genuine dilemma: routing everything to the broker with the best historical execution quality maximizes today's expected performance, but stops collecting data on the others, so the desk never learns if a competitor has quietly gotten better — or if the current favorite has started to slip. Thompson sampling resolves this by keeping a probability distribution over each broker's true execution quality, updating it as fresh trade data comes in, and then allocating each new order by literally drawing a sample from each broker's distribution and routing to whichever sample comes out highest.
Brokers with a strong track record and tight, confident distributions win most draws and get most of the flow, but a broker with a wide, uncertain distribution still wins occasionally just by chance, which is exactly enough exploration to keep updating the desk's belief about it without deliberately sacrificing execution quality to run a formal experiment.
Thompson sampling allocates broker flow by drawing from each broker's belief distribution and routing to the highest draw, automatically balancing exploiting known-good brokers against exploring uncertain ones.
If Broker A's estimated cost distribution is tightly centered and favorable while Broker B's is wider and less certain, Broker A wins most draws and most flow, but Broker B still wins a slice of orders often enough to keep refining the desk's estimate of its true quality.
Related concepts
Practice in interviews
Further reading
- Russo et al., 'A Tutorial on Thompson Sampling'