Self-match prevention: Microstructure hack or trading signal?

August 28, 2024
Title picture for Self-match prevention: Microstructure hack or trading signal

This guide goes through all the basics you need to know about self-match prevention as a quant or algorithmic trader.

  • Purpose and implementation.
  • Using self-match prevention as a trading signal.
  • Using self-match prevention as an execution trick.

Self-match prevention (SMP) refers either to matching engine functionality or a set of trading rules that prevent a market participant's orders from matching against each other on the same trading venue.

The main intent of SMP is to prevent market manipulation. Many exchange operators began implementing SMP as a risk control in the lead-up to MiFID II and MiFIR Articles 17 and 48.

In less-regulated markets that do not enforce self-match prevention, self-matching trades can be exploited to create the artificial appearance of volume or interest in an instrument. This is especially prevalent in crypto.

Another benefit of SMP is that it reduces transaction costs for the participant by netting out opposing orders.

SMP is usually implemented by allowing users to tag their orders with an identifier, which informs the matching engine not to match two orders that share the same identifier.

When the matching engine detects that a buy order and a sell order that share the same identifier are about to match, the matching engine intervenes and takes some predefined action, such as canceling one of the orders or reducing the size of one or both orders.

The order entry protocol of the venue may allow the user to specify the predefined action that they'd like to matching engine to take.

SMP may come in different names. On the Intercontinental Exchange, self-match prevention is also called Self-Trade Prevention Functionality (STPF). On the London Metal Exchange, self-match prevention is also called Self-Execution Protection (SEP).

The CME FAQ on Self-Match Prevention has a good write-up on SMP which includes some generic explanation that's not unique to CME.

There's a third, unadvertised use of self-match prevention: as a microstructure hack.

To intuit this, one might ask: Who's most likely to use self-match prevention?

Retail and uninformed traders typically take directional exposure and don't layer the book on the opposite side right up to the instant before they cross and take a position.

It takes some bookkeeping and order state management to layer the book, and most uninformed traders don't have the connectivity environment to debug in-flight order management, race conditions, and the likes that come with it.

This creates a class of features that filter on informed trades where a participant crossed the spread and pulled their orders on the opposite side simultaneously. Here's an example of markout PnLs averaged across aggressive trades conditioned on SMP activity on a particular instrument and day:

Markout pn ls averaged across aggressive trades conditioned on smp activity e5420f6d34 png

There are several limitations to this type of feature:

  • It might not occur frequently enough to gather sufficient sample size for your model fitting.
  • The matching engine must publish data events in a manner that lets you reverse engineer SMP occurrences, e.g. same tag 60 timestamp for a simultaneous trade and cancel on two sides of the book.
  • There may be cases where this is indeterminate or difficult to distinguish from other types of compound order events.
  • You need MBO data that is normalized and timestamped properly to expose this behavior. For the above backtest and markouts, I used Databento's normalized MBO (L3) data.

Since SMP allows one to enter a new order and cancel one or more orders simultaneously, this provides an exchange-side atomic event which can be used towards a latency advantage. Other types of atomic events like this include mass quoting and cancels, exchange-side risk limits that automatically cancel orders upon breach, display quantity replenishment, and so on.

In particular, this can be exploited towards spoofing or sourcing hidden liquidity in a manipulative manner. For example, a market participant may create a new price level or join an existing level with one or more large orders that are tagged with a self-match prevention identifier. This usually creates the appearance of interest on one side of the market or skews other participants' order book imbalance features, and promotes those participants to join the spoofer.

Then, the spoofer can send an aggressive order to flip their apparent position, canceling their passive orders and trading against the participants that had joined the spoofer earlier. Since self-match prevention is atomic, this action is instantaneous and doesn't give those participants enough time to react to the order cancellations.

It's important to note that this behavior will likely invite enforcement action on regulated markets.

Interested in more articles on practical microstructure and engineering problems like this? Check out Databento’s blog.

Databento is a simpler, faster way to get market data. We’re an official distributor of real-time and historical data for over 40 venues, and provide APIs and other solutions for accessing market data.