Skip to content
01TX
Insights

Trading Infrastructure

Scoring LPs without making them flap

3 min read

With several LPs connected, some will be better than others at certain times and on certain pairs. Somebody can watch for that, but it's better if the bridge keeps score and acts on it, with people overseeing instead of doing the watching.

The usual inputs are the reject rate (split by reason if the LP gives one), slippage against the price you sent the order at, how fresh its quotes are, how often a partial fill comes back, and the time from order to acknowledgement. Keep them per LP and per symbol or group of symbols. An LP that's good on the majors can be poor on everything else, and one blended score hides that.

Use more than one time window. A short one catches an LP that has just gone bad. A long one catches slow decay that a short window would treat as noise.

How flapping starts

Take a simple rule: if the reject rate over the last five minutes goes over some threshold, disable the LP. It trips, the LP stops getting orders, the window empties, the rate drops to zero, the LP is switched back on, takes orders, gets some rejects, and trips again. You get a loop that looks like instability but is just your own rule reacting to itself.

Several things help. Use different thresholds to disable and to re-enable. Require a minimum time in the disabled state. Bring the LP back at a reduced weight, or with small test orders, instead of full flow. And don't judge on tiny samples: three rejects out of four orders isn't a 75% reject rate, it's four orders.

One threshold: off above 30%, back on as soon as it dips underreject rate30%LP getting flow22 switchesTwo thresholds and a minimum off time: back on only below 10%reject rate30%10%LP getting flow3 switches
IllustrationA simple simulation of one LP with the same behaviour in both charts. A single threshold makes it switch constantly as the reject rate hugs the line. Separate thresholds and a minimum off time switch it far less.

You stop learning when you stop trading

Once an LP is switched off you only see its quotes, not its execution. You can still score what you can see, such as quote age, how often it crosses the others, and how its prices compare with the rest of the book. For fill quality you need some real flow, which is the argument for bringing it back gradually.

Automatic changes should also alert someone and say why in the log, and a manual override should stick until a person removes it. Nobody likes finding out afterwards that an LP was off for a week because of a rule nobody remembered.

Sensible thresholds depend on the LP and the pair, and numbers from someone else's setup won't transfer. A reasonable first step is to record all of these metrics for a few weeks without acting on them, look at how they're distributed, and set the rules after that.

Building something that runs into these problems directly?