Spreader

An advanced algo for trading spreads between products in different order books.

Configure the spreader to trade a designated spread between multiple products. You define the parameters for each leg of the spread, and some general spread settings to match your desired execution preferences.

The spreader can be used for a variety of different strategies, including cross-exchange arbitrage, futures vs spot basis trading, and relative value trading. Common examples of spreads are ES-SPY, HO-G, BTC Fut - BTC Perp, BTC Perp - BTC Spot.

Currently, the spreader supports two-leg spread configurations. Support for n-leg spreads is planned for a future release.

The spreader works through 2 execution styles:

  1. Spread Taking

    1. No orders out until the spread hits the desired level

    2. The algo will then send orders out relative to the far side (the crossing side) of the BBO

  2. Quote then Hedge

    1. Each product can quote relative to the near side of the BBO. If it gets filled, all other legs will fire a taking order at the far side of their order books. Therefore, the price of each quote is based on the required price to get the desired spread value assuming that all the other legs are takes

Figure 1: Execution for a spread that trades with price multipliers of 1 and -1 respectively. Note that the same execution holds true for market 2 (in particular, the labelling of market 1 and 2 is completely arbitrary)

A spread will have legs with quoting parameters that you configure. Taking parameters apply at the spread level. The taking params will be relative to the far side of the bbo. The quoting params will be relative to the near side.

Every leg will have at most one taking order, one quoting order, and one quote hedge out at once.

Setting the Limit Price

The limit_price is similar to the price of a limit order in the synthetic spread orderbook. It is the most aggressive (i.e. worse price you are willing to accept) level you are looking for the algo to trade the spread. This parameter will determine how the algo quotes and takes in each leg.

For example, in Figure 1 if the limit_price is -0.06 we will quote in market 2, assuming we can hedge aggressively into the bid in market 1. However, we will not quote in market 1, because if we do get filled, we cannot hedge immediately at the best bid of 100.5 in market 2 without violating our limit_price of -0.06 (assuming we get the fill, it would come to a spread price of -0.05). We will also not submit any simultaneous spread taking orders, as these will grab us fills with an aggregate spread price at -0.04.

In real markets, While the spreader's quotes and spread takes in each leg are priced with prospective fills in other legs in mind, these orders might not get filled if the market moves away from you in market B right after a fill in market A, leaving you "hung".

chase_ticks is designed to reduce the probability of getting "hung" on one leg as the other moves away from you, by designating a certain amount of ticks you are willing to pay up by on that leg. While this greatly alleviates the fill probability issue and is generally recommended for securing hedges, it introduces slippage. Slippage, particularly in the leg that is hedging or taking, is the difference between the expected execution price and the price of the fill. With slippage it is possible for the spreader algo to get prices worse than the designated limit_price. Therefore, the chase_ticks parameter should be configured cleverly by the user to strike a balance between higher hedge fill probability and lower slippage.

Last updated