Quant Memo
Core

Self-Trade Prevention Modes: Cancel Newest, Oldest, Decrement

A firm with two desks or two algorithms trading the same instrument can end up matching its own orders against each other — a wash trade that helps nobody and can look like manipulation — so exchanges offer several distinct ways to automatically prevent it.

A large firm often has more than one desk, strategy, or algorithm trading the same instrument at the same time, and they don't always know what the others are doing. It's entirely possible for one of the firm's own buy orders to match against one of the firm's own sell orders sitting in the same order book — a self-trade (or wash trade) that doesn't actually transfer risk anywhere, generates unnecessary transaction costs, and in some jurisdictions can even look like the kind of wash trading regulators treat as manipulative. Exchanges solve this by letting firms tag their orders so the matching engine itself refuses to cross them.

How it works

A firm tags its orders with a self-trade prevention ID (sometimes shared across all the firm's accounts, sometimes scoped more narrowly to a specific desk). When two orders sharing that ID would otherwise match, the exchange applies one of several configurable modes instead of letting the trade happen:

  • Cancel Newest — the more recently submitted of the two orders is cancelled, leaving the older, longer-resting order in the book with its queue priority intact.
  • Cancel Oldest — the reverse: the older order is cancelled and the newer one remains.
  • Cancel Both — both orders are pulled entirely, useful when a firm would rather lose both resting orders than risk any ambiguity about which one should survive.
  • Decrement / Decrease and Cancel — if the two orders are for different quantities, the smaller one is fully cancelled and the larger one has its size reduced by the smaller order's quantity, effectively "netting" the overlap without wiping out the larger order's remaining size or its place in the queue.

Choosing a mode

The choice matters mostly for queue priority: a market maker who cares deeply about not losing its place in the book on a resting quote will prefer Cancel Newest, so an incoming order from another part of the firm never bumps out an established, well-positioned quote. A firm less concerned with priority might use Cancel Both for simplicity. Decrement mode is common on venues that expect frequent size mismatches between a firm's own orders and want to preserve as much resting liquidity as possible rather than cancelling entire orders outright.

Self-trade prevention tags let a firm's own orders be automatically stopped from matching each other, with modes like Cancel Newest, Cancel Oldest, Cancel Both, or Decrement determining exactly which order (or how much of it) survives — the choice matters most for preserving queue priority on the order a firm cares about keeping resting.

If a market maker keeps unexpectedly losing queue priority on quotes it never intended to touch, check whether self-trade prevention is configured to Cancel Oldest rather than Cancel Newest — that single setting decides which of the firm's own competing orders gets to keep its place in line.

Related concepts

Practice in interviews

Further reading

  • CME Group, Self-Match Prevention Functionality
  • Nasdaq Rulebook, Self-Trade Prevention
ShareTwitterLinkedIn