How Market-Making Works (Poorly Illustrated)
Sup fuckers, this would be a tweet thread but an article is easier. Less of you will probably read it, but whatever. Title is self-explanatory, I drew some shit in Microsoft paint and maybe it’ll help you understand what I’m talking about (press x to doubt).
First picture up there is supposed to be an orderbook for our example trading pair, let’s call it ASSET1!/USD. For now, we’re gonna assume a couple things:
- This is a futures contract.
- We’re the only market-maker on this pair on this exchange (and nobody else is placing limit orders).
- There is an available market for the underlying spot asset and there is no premium on our futures.
- We are independent, which means we haven’t signed an agreement with the exchange and can provide liquidity (or choose not to) any way we like.
- The minimum tick size is $0.01.
- All taker orders pay 2.5 bps (0.025%) in fees, all maker orders receive a 1bp (0.01%) rebate.
So. The last trade to occur (denoted by the arrow) was a market sell into a limit buy for a price of $100.00, which is now the mark price. We have an order to buy one more contract at $100.00, then another bid for 1 contract at $99.99 and yet one more contract at $99.98. We also have mirrored sells, with one contract offered at each tick up to $100.03.
The difference between the best bid price and best offer price (collectively called the bb/o) is called the spread, right now it is $0.01. As market-makers, our goal is to capture spreads by buying and selling in equal amounts. Since we’re the only market-maker, if someone were to sell one contract at market, they would hit our bid of $100. We’re now long 1 contract at a price of $100, right?
Wrong. Because of the fee structure, when the seller accepted our bid of $100, they had to pay 0.025% * $100 in fees ($0.025), out of which $0.01 is paid to us. Essentially, even though we bid at $100.00, when our order was hit, the final price that we paid after our rebate was only $99.99, while the seller only received $99.975 of our $100 bid after fees.
Let’s take a look at the updated orderbook:
Mark price is still $100, because that’s the last price at which a trade happened. But now the spread is $0.02 and the book is imbalanced because we haven’t changed anything yet. In reality, one side of the book being 50% larger than the other ought to be corrected, but let’s keep it simple for now and ignore that.
If someone comes along and buys at market, great! We’ll have made a spread of the $0.01 displayed, but we’ll also have earned the rebate on both the buy and sell orders. Our spread would actually end up being worth about $0.03, even though we’re buying at $100 and selling at $100.01. Then we’d replace those orders, balancing the book and our exposure again.
If we can do that once every couple seconds or faster, that $0.03 each time will turn into a pretty decent return on capital! But of course price isn’t going to bounce between $100 and $100.01 forever, so what happens when it moves?
Let’s say the spot market (which our market tracks identically, for example’s sake) drops from $100 to $99.80. We’ve just bought one contract at $100 (aka $99.99), but we’re quick and pull our 99.99 and 99.98 bids before someone can arbitrage against us. THIS is where market-making starts getting tricky. There’s a couple approaches to handling scenarios like this. You could just sell your contract at market (if there were other market-makers here) for a loss of around $0.22 and hope to make it back on future spreads. But since that’s not an option for us (and it’s rarely the best one), we can choose to drop our best offer down to $99.81, which would net us a realized loss of around $0.17 if filled. This is a bit better than dumping on the market, but still not great. We have the advantage of being the only market-maker here though.
So we place our offer at $99.98, which is roughly our breakeven price, and we place our bids at $99.80 and $99.79. Let’s take a look at the book:
Our spread is now blown out much wider than it was, but we aren’t losing money if our offer is accepted. In fact, since we’re the only market-maker, we could decide to not even lower our asking price at all! If someone decides the offer is fine? Great! Mark price would jump back up, and the whole drop would have been a quick deviation. But even though we set the spreads in this scenario, that doesn’t mean that anyone will want to transact with us if we only offer bad prices. So more realistically, our bid price likely looks more attractive than our ask price to the rest of the market. Let’s say our bid at $99.80 gets filled, which translates roughly to a cost basis of $99.79. Now, we’re long two contracts at an average cost basis of $99.89 each, so we drop our offer price to $99.89. All of a sudden, that massive spread has been cut in half AND we’ll still make a little money from the rebate if we manage to sell both contracts. As we averaged down, we were able to tighten our spread back up and continue normal operations.
But how common are moves like that in this market? What if the market had dropped 5 or 10% instead of .2%? Following the above approach of averaging down, we’d likely still have to sell at a loss because otherwise our spreads would simply be too gigantic to attract a counterparty.
Market volatility happens, and it’s always got the potential to cost us money. So how do we avoid or mitigate it?
We’re gonna need to figure out a few things:
- How volatile is the market across various timeframes?
- How much volume does the market do?
Volatility is a measure of how much the market bounces around compared to its average performance. It’s measured by comparing the average distance over time between price and where price would be if it was performing exactly the same as it’s performance average (see full calculation here). It’s important to note that volatility measured over different timeframes tells us very different things about how we should react to it.
Volume on the other hand, simply tells us how often we might be able to get our orders filled, hence how many spreads and rebates we could earn.
If volatility is low across the board, large size and tight spreads are the way to go. You’re just trying to maximize volume. If price moves against you though, just cut the loss as soon as possible or you could eat some hefty drawdown.
If daily volatility is low, but intraday volatility is high (meaning that price moves a lot more without really getting anywhere), you can widen those spreads and use larger orders. You might not make as many spreads, but they’ll pay better! In this environment, you can protect yourself by averaging in with a bit more confidence when price moves against you.
If daily volatility is high but intraday volatility is low (meaning that price trends up and down hard during the day but at a consistent rate), you’ll likely want to make tight spreads with small size, aiming for more spreads instead of bigger ones and then cut your losses quickly when price moves against you.
If volatility is high across the board, you can widen your spreads but use smaller size, averaging in very carefully to protect yourself. This is the riskiest sort of market to make in my opinion, but often scares away other market-makers, leaving more opportunity.
Final notes and stuff
Market-making is a game of averages. You’re measuring the average number and average size of your spreads against the average volume and the average momentum and and average volatility in the market, all while trying to compete with any number of other participants who could throw the averages out the window at any point in time they want to. How well you can do at it is usually a function of how well you react when things don’t match the averages. Most of the time you make a steady stream of money, and then every once in a while the market only hits one side of the book, chews through your orders and you’re forced to unload inventory at a loss. (“Quick Bob, what’s the average on that?”)
But I like it, and I don’t think enough people talk about it in plain English, most of the other shit I’ve read on the topic is either written in hieroglyphics by the math guys at Stanford or it’s poorly-typed on Reddit by your neighbor Steve who thinks the market-makers are why his 1d TSLA calls are losing. Figured I’d try and straddle that line a bit.
There’s infinitely more to say about market-making but I don’t know most of it and I said I’d publish this article like three days ago. Since I haven’t yet, I’m just gonna abruptly stop this here. Might do a part two on this at some indeterminate point in the future, might not, we’ll see! Also might do more “Poorly illustrated” stuff with Microsoft paint but as always, no commitments because I don’t feel like obligating myself. To any more practiced market-makers reading this, please feel free to tell me why I’m wrong about everything, unless you’d rather just laugh and keep picking me off (fuckers).
If you enjoyed the read, gimme claps (up to 50), subscribe here, follow me on twitter and retweet this article post, call me a cunt, whatever, see you next time.