The main goal of this document is to define standard concepts which will be used in later use cases.

FX Trading Setup

Let’s consider an example of a broker or a mid-tier bank (FX Market Participant “FXMP”) that deals with several FX Liquidity providers. The FXMP trades in a taker-only model (sends market orders or with limit order which are immediately marketable, so-called trade-on-quote in FX). The outcome of each trade request can be FILL, PARTIAL FILL or REJECT. PARTIAL FILL is equivalent to a FILL on part of the trade and a REJECT on the remaining order quantity. To simplify exposition we assume only FILL and REJECT are possible – PARTIAL FILL can alway be translated in FILL and REJECT pair.

The FXMP is assumed to trade in an “Aggregator Setup”. This is a standard dealer mearket setup with some quirks specific for FX markets. The FXMP is connected (meaning it has credit lines either direct or via prime brokerage setup) with several LPs and uses “aggregator” software to collect bids and asks in real time (See Figure 1 below). We call this construction a liquidity stack. LPs’ are not aware of each other presence and hence they participate in continuous blind auction. Due to the setup, the FXMP has more information than the LPs (asymmetric information). The best price wins. The winning LP is subject to the so called “winners curse” (i.e. there is a chance that this LP won the trade by pricing it incorrectly). Because of this informational asymmetry, LPs reserve the right to reject the trade (so called “last look”). The most common reason for the last look is a stale quote.

Figure 1: Liquidity Stack

FX Liquidity Analysis Challenges

The FXMP would like to get some insights into its liquidity stack creation. Namely it is about selection of LPs and what is the optimal way to use them. The following questions have to be address:

  • What are relevant liquidity metrics for each LP? Are they doing a good job?
  • Is the current allocation to different LPs optimal of there is a room for improment?
  • What are relative strengths and weaknesses of each LPs?. For example some can be good in high volatility enviroment.
  • Is the number of LPs optimal? Should we add more LPs or remove some?
  • Is the trading style optimal? Should it be faster or slower?

We assume that execution always happens at the best visible price (hence the routing rule is just trading at the best bid or ask depending on the required side). This is the most common approach but not necessarily the optimal one:

  • Is trading at the “best bid/ask price” really the best routing/execution or can the routing be improved within the current liquidity stack.
  • Even if it is the best routing in the current liquidity stack, can it be improved by changing the stack (adding or removing LP).

FX Market Description

FX can be (simplistically) described as a hybrid decentralised quote-driven market with some order driven venues (which are complicated by bilateral credit between order book participants). However, it is useful to think about FX liquidity as something which can be acquired from several interlinked sources. A number of primary liquidity providers quote two way prices on a 24/5.5 basis.

The typical setup of an FX market participant (FXMP) is shown on Figure 2 below.  The FXMP services its clients by providing access to wholesale liquidity. The FXMP either provides a direct market access or uses its balance sheet to warehouse risk and hedge the client flow (B-Book model) or use the mix of the two.

Figure 2: Business Setup Around Individual Client

In Figure 2, clients are either retail clients (in the case of a retail broker), retail brokers (in the case of a bank) or brokers/second-tier banks in the case of a top-tier bank. LPs are normally top-tier or sometimes second tier banks. Tradefeedrs client objective function for analytics/datascience would be to direct client flow optimally to the existing LPs and constanly explore if new LP should be added into the mix. Also feeback look of different LP engagement to client flow should be quantified and explored (for example improve LP stack can lead to better client price and attract significantly different client segments thus generating the need for more analysis).

It is important to put a picture in Figure 2 into broader market picture shown in Figure 3. Top-tier banks and certain non-bank liquidity providers create “real” liquidity (primary LPs) in the sense that (a) they do not look at anybody else prices and price purely out of their order flow (b) they take balance sheet risk by accepting the orders and change their quotes based on their order flow. This is FX price formation process. Primary provided offset they balance sheet risk in anonymized fashion via ECN.

Second-teir bank and retail brokers normally receive two way price from primary providers. So the act in client capacity to primary providers.

Figure 3: LP Hierarchy (Providers of liquidity are in yellow)

Client connects to LP via GUI or FIX. Both GUI and FIX connections can be either direct or via ECN. ECN can acts as an aggregator of prices which is convenient but this can add additional latency lag. Hence convenience of this arrangement has to be analysed and weighted against potential costs..

The number of clients can considerably exceed the number the LPs. As per Figure 3 not all market participants have clients. But they all have the LPs. Connection to LP is normally done via specialised software (aggregator).

FX Trading Definitions: Taker Trades

We consider the scenario where FXMP is a price taker so he pays the spread by buying at the bid and selling at the offer thus using Trade on Quote marketable limit orders (where limit is current quote price possible allowing for slippage)

Single Trade Execution Visualisation

The rest of the document will be based on the concepts visualized on Figure 4. Observed best bid and offer (BBO) size is assumed to be enough for the trade.

Figure 4: Terminology

Spread P&L and Spread Paid

Buy side client executes against bid/offer prices (Figure 4). The client always buys at the ask price and sells at the bid price thus compensating the market maker for the risk transfer. The difference between mid and execution prices is called Spread P&L (Figure 4) . The terminology comes from market makers as this is what they earn if they cover their risk at mid or if they receive exactly offsetting trade at the same time (buy immediately followed by sell). Spread P&L can be calculated as:

In the above formulas the indicators is equal to -1 if the Side is Buy, meaning that buying above the mid is negative spread P&L for buy side (which is normally the case).

Spread Paid in a negative of Spread P&L. This is more natural terminology for FXMP on a taker side. This is because looking at positive numbers is conceptually easier. Buying above the mid (selling below the mid) would imply positive Spread Paid. Spread Paid can be only of the main variables to minimize for a price taker.

Larger trades would have larger P&L hence adjusting them for trade size is important to compare across trades (of course even when adjusted for the size, the spread per million would still be bigger for bigger trades simply because of risk transfer argument. Dividing by size here just mean that expressing cost of trading in unit-free measure like basis point)

Therefore, spread P&L per million is just a percentage difference between execution price and mid-price expressed in “per million” units (multiplied by 1 million). Mid-price is sometimes referred to as reference price and can be different for different market participants (as in Figure 2,  each market participant observes its own unique liquidity determined by its bilateral credit relations with its liquidity providers).

Decay or Reversion

Decay or Reversion measures short term directionality of a trade. Consider Figure 4 again and assume that the client buys at the ask price. On Figure 4, the mid price goes upward after the buy and hence this trade P&L is positive. Decay from trade time t to some future time can be expressed as:

Therefore, the decay is purely determined by the mid-price evolution after trade. Just like with Spread P&L, decay of larger trades is naturally larger. Therefore to simplify the cross trade compassion we need to adjust it by the trade size as follows (again as with Spread P&L decay per millon would still be bigger for bigger trades due to market impact. Per million is purely accounting transformation)

Therefore, decays P&L per million is just percentage change in mid-price expressed in “per million” units.

The decay terminology comes from market makers and quantifies how much the spread P&L received from the client “decays” or disapperas after say 1 minute. For example if client bought at $50/m above the mid, the market maker expects to make $50 per million if offsetting trade happens before the market moves. However if the market moves $20/m in the clients favor before an offsetting trade for the market maker, the profit will only be $30/m. Therefore potential spread P&L “decayed” by $20/m.

Decay or reversion is an important measure for market markets as trades with strong positive directionality are less attractive for market markets.


This document defines the basic concepts of measuring the performance of individual trades. It provides the context and definitions for Tradefeedr analytics platform.