# Translating Order books accounting for fees

I am trying to understand how fee structure plays into how I should best execute a trade.

Say there are two exchanges with the following order book:

Exchange A:

60   |   7189.5 | 7190.0   |90
4    |   7189.0 | 7190.5   |90
1    |   7188.5 | 7191.0   |90
4    |   7188.0 | 7191.5   |90
12   |   7187.5 | 7192.0   |90


Exchange B:

106  |   7197.5 | 7197.9   |186
405  |   7196.8 | 7198.1   |190
2    |   7196.4 | 7198.7   |100
2    |   7185.3 | 7199.2   |9
15   |   71838  | 7199.5   |19


Lets now say that exchange A has a maker rebate of 2.5BPS (ie -0.025%) and a taker fee of 7.5BPS (+0.075%)

Exchange B has a maker fee of 2BPS (ie +0.025%) and a taker fee of 5.0BPS (+0.05%)

Is there any way to translate them to in a way normalise the order books for fees to see where its best to execute a trade all else being equal.

I might have missed a bunch of info that is necessary. Happy to add to this once they come to light.

When fees are not symmetric, to take fees into account on orderbook needs to know if you want to provide or consume liquidity: you have in fact two different views (ie two ranking) on the same orderbook:

Say you are a buyer, and do the calculation for the first limit only. $$P^B(i)$$ and $$P^A(i)$$ are respectively the prices at the bid and ask on venue $$i$$, where marker fees (ie for liquidity providers) are $$f^m(i)$$ and taker fees (for liquidity consumers / removers) $$f^t(i)$$. Remember that for rebates, you have to put a minus sign in the fees.

• if you you want to provide liquidity, you have to compare $$P^B(i)\cdot(1+f^m(i))\stackrel{?}{\lt} P^B(j)\cdot(1+f^m(j)),$$
• if you want to consume liquidity the game is taking place at the ask: compare $$P^A(i)\cdot(1+f^t(i))\stackrel{?}{\lt} P^A(j)\cdot(1+f^t(j))$$ (you add fees to the price because you are buying, hence you will spend more money; for a seller you will get less money, so you have to put a minus sign in front of the fees).

But the reasoning cannot stop at this point:

• For liquidity consumption, it is simple: just go to the cheapest venue.
• But for liquidity provision, you need to account for the probability to obtain a transaction.

Say for instance that the best bid of venue $$i$$, once fees are taken into account, is cheapest than the the best bid of venue $$j$$, even that it is equal to the second bid of venue $$j$$. How can you be sure that consumers (ie seller) will not go to venue $$j$$ first? since the fees are not the same, the order can be inverted for them: it may be more attractive for consumers on venue $$j$$... In such a case you will wait on venue $$i$$, expecting a better net price, but nobody will ever come to trade there with you...

To avoid this configuration, the price improvement to wait on venue $$i$$, ie $$\Delta P^m(i|j):=P^B(j)\cdot(1+f^m(j)) - P^B(i)\cdot(1+f^m(i))$$should have the same sign as the price improvement to come and consume on this venue, ie $$\Delta P^t(i|j):=P^B(i)\cdot(1-f^t(i))- P^B(j)\cdot(1-f^t(j)).$$

This is somehow a theoretical equilibrium, thus you can have a look at the rate at which market orders are consuming your side, at your price limit to assess the probability to obtain e transaction. You can do this on a long term historical basis (estimating the Markov chain of rates given the state of the orderbook on several days), or in real-time.

For details have a look at Market Microstructure in Practice (1st or 2nd edition).

• Not sure what market you have in mind here, but for US equities, this is a really confusing way to put it. 1) Fees/rebates are per share, so not proportional to price 2) You can't take liquidity outside of best bid/ask, so you just compare fees/rebates. Nov 24 '19 at 10:22
• @LazyCat the question was in BP, hence I answered in BP. It the the case in Europe. If you have rebate per share (like in the US, you are right), it is really easy to translate my formulas with fees per share. Nov 24 '19 at 10:54
• Thank you so much @lehalle. Genuinely appreciate you taking the time to answer. Nov 24 '19 at 13:23