Guest Post: My take on market making and inventory risk

Guest Post: My take on market making and inventory risk

Blog » Guest Post: My take on market making and inventory risk


June 18, 2020 · 3 min read

This below article is adapted from community member(Discord ID: phgnomo#1429)'s comment in our Discord group. Our blog will provide a space for our community members who produce quality content on market making, crypto algo trading, trading strategies and insights. In the future, we are going to feature more high quality guest posts.

All views expressed in this article belong to the original poster and shall NOT be considered as financial or investment advice.

The goal of a market marking strategy is to fill both opposing orders as soon as possible. So the usual movement of the price of an asset is:

    1. stay on a range of prices
    1. deviate from the range, starting an upward or downward trend
    1. get back to a range on a differente level

The majority of the profit of market making comes when the price is bouncing on a range. To take advantage of that, the market maker must find the optimal spread value, where the price will bounce from the lowest point to the highest point like in this case -

Now, here is what happens with small and large spread respectively. With a large spread, you will do less trades, but each trade will have a bigger profit. With small spread, you do more trades, with a smaller profit margin. However, large spread might end up increasing the inventory risk for one main reason - the time it will take for the opposing order to be filled.

  • Blue line, small spread: it took 4 hours for the opposing order to get filled
  • Greel line, big spread: took 6h 30min for the opposing order to get filled

Therefore, you were stuck with your short inventory 2.5 hours more than with the smaller spread. A lot can happen within the 2.5 hours in volatile markets. Imagine if you spread were a bit bigger...You would be stuck stuck on a short trade for 9+ hours.

What if the price never touched that point, and went to the opposing direction? You would be stuck there way longer until the opposing order were fulfilled.

The inventory risk isn't about trading less, it is about the risk of not closing the opposing trade. By not closing the opposing trade as planned,you will have to decide if you will close the deal at a loss, a smaller profit, or hold the position for a longer time. As a smaller market maker, you might not feel it. But for a bigger market maker, it will incur a lot of costs associated with how long you have the position open, for example, asset custody costs, employee wages, eletricity bill, operational loans, etc.

Now let's talk about volatility. High volatility means that the price have a high probability to bounce on a bigger range. Therefore, a bigger spread is good, because there is a bigger chance that both opossing orders will be filled quickly. However, when the market has low volatility, the spreads must be tightened, or you risk not filling both orders.

Some traders might mix up inventory risk with directional risk. Now when prices start to trend on one direction or another, that is a different kind of risk called directional risk

The thing is, the directional risk has an effect of increasing your inventory risk, if you do your operations the same way you did while the price was on a range like what just happened today with RLCETH.

At some point of the day, the price started to trend and hasn't never come back yet.

In this case, what happened is that my sell orders started to fill faster than the buy ones. My inventory risk increased not because my spread was small, but because my buy orders wouldn't be filled quickly, so i got stuck on some long positions. If I had a bigger spread, my inventory would still fill up (at a smaller pace). But the effect of this bigger spread would be that I would have to wait even longer to fill the opposing buy order, because it will take a longer time for the price to return to an even lower point. With the smaller spread, I have a higher probability of getting out of the bad position earlier.

When a trend begins, there is basically two options:

    1. stop the trades until prices get back to an ideal range
    1. adjust your risk by adjusting your spreads on the trend direction. In the case shown in the above chart, you can shorten you bid spread and widen your ask spread. If you don't do so, you risk having a lot of sells and fewer buys, which increases your inventory risk.


Inventory risk isn't about taking more or less time to fill one side of the operation, but about how long it takes to close both sides, which is closing the deal and getting the profit as planned.

Join our conversation on Discord or Reddit.

About Hummingbot

Who we are and why we are building Hummingbot.

Learn more

Get the latest updates from Hummingbot