In a recent post we described a technique to visualize routing performance of institutional orders and compare with activity in the market. By transforming fill data from orders into RGB pictures, we encode into a single chart the details of where, when and how the order was executed. The transformed data can be used to feed a deep learning model to allow us to employ well-established techniques of image analysis. We can also view these images directly to see patterns that can help us optimize future implementation performance.
We can apply similar techniques to the market even when we aren’t analyzing our orders’ performance. This will show us the trading characteristics for a given security. We can look at specific time ranges or compute averages over longer time horizons to hone our routing logic when we engage with the market. We can directly answer questions such as whether a stock is trading more often on the bid, the ask or somewhere in between, or how much of the volume is being executed in specific dark pools.
In Canada, where broker codes are published for each trade executed, we can take the analysis a step further and understand not only where, when and how a stock is trading, but also who is trading it, i.e. which broker is trading it and in what manner, at which venue and at specific times.
When we consider our order, we tend to think in terms of being active by crossing the spread, being passive by booking our orders that are later filled at the near-touch or executing in between the best bid and offer in a dark capacity.
When we look at the market, we don’t have these concepts anymore because if one side of a trade is active, the other is necessarily passive – a buyer executes passively on the bid trades with an active seller who crossed the spread. So instead of thinking in terms of active, passive, and dark, we instead compute the volume that trades on the bid, the offer or in-between.
For these images, we choose a convention of mapping the colours as follows: red maps to trades that occur on the prevailing ask, green is used for volume that trades on the prevailing bid and blue is volume that executes between the prevailing bid and offer. We ignore auctions for this analysis.
As we described in our previous post, we then map the volume based on which venue the trades occurred on and the time interval during which the trade occurred. We compute this for each of the three flavours of volume, i.e. bid-side, ask-side and in-between which we call dark. By stacking these grids on top of each other, we get colours that are mixtures of red, green, and blue. The intensity of any grid-point is proportional to the relative volume executed, so brighter pixels in our images represent relatively high volumes while dark images represent low volume, with black indicating no volume.
The next step, at least in Canada, is to use the information on each trade about which broker executed the trade as a buyer and seller respectively. We can thus represent the activity of individual brokers to see how they are interacting with the market for trades where they are a buyer and separately for trades where they are a seller. The overall market picture is simply the sum of these broker-specific images. See Figure 1 for an example image showing activity across all brokers.
Figure 1. We show a picture that encodes the overall trading activity for a single day for a single security. The pixels are coloured based on the mixture of bid-side, ask-side and intra-spread volume by mapping to an RGB colour space. The intensity of each pixel is proportional to the relative volume of the pixel. We see the brightest pixel as volume traded at Liquidnet (LICA) at the start of the day.
In Figure 2, we show the top brokers by value traded for a single security on a single day. The top 6 buying brokers are shown on the left while the top 6 selling brokers are shown on the right.
Figure 2. The same data shown in Figure 1, but grouped by side and broker. The top 6 brokers that bought stock are shown on the left and separately the top 6 brokers that sold stock are shown on the right. We can immediately see differences in the venue and time distributions. We also can see when and where the stock is trading bid-side versus offer-side as well as dark (in between bid and offer).
Inspection of Figure 2 shows several features. We can see that some brokers tend to execute across many venues, while other brokers activity tends to be concentrated on a few specific venues. For example, the broker in the top left of both buy and sell tends to trade on most venues for the given security, while other brokers tend to trade on only a few venues. Some brokers trade consistently in dark pool venues while others don’t trade at all in these venues. Some brokers trade on lit but unprotected venues such as XATS (Alpha), while others do not in this example.
We can also see in Figure 1 that there is a relatively large amount of volume executed on Liquidnet at the start of the day. We can tell because the brightness of the pixel is highest for this point. By looking at Figure 2 we can easily see that the top left broker was both the buyer and seller.
We also compute these images both across groups of securities and over longer time horizons. It is straightforward to compute these images in real-time as the trading day progresses so traders can use this type of information when deciding which broker to execute their order and what trading strategy would work best in the given environment. For example, if a lot of volume is trading in the dark, then it may make sense to use a dark algo, while if a lot of volume is trading on the bid and we want to implement a buy order, we may want to choose an algo that executes relatively passively.
Here we have shown how transforming data available from the tape (trades and quotes), we can determine who, when, where and how a given stock is being traded. This type of encoding makes it easy to leverage deep learning models used for image classification and analysis, so we can leverage all of the effort that has gone into these models. As a nice side-effect we can also simply look at these images to see obvious patterns that can directly impact our behaviour by helping us determine the timing, strategy and broker placement for implementing our institutional orders.
This is another example of how we can use unique ways of visualizing and analyzing publicly available data to generate insights that translate directly into best execution.
Comments