Trading intensity modeling #66
Replies: 9 comments 1 reply
-
I'm uncertain whether my implementation aligns with the original author's intentions. In the beginning, I also tried the same way you mentioned and arrived at the same outcome. So I changed it to what it is now. The current implementation reflects my interpretation as follows: First and foremost, a fundamental assumption underlying the backtesting and strategy is no market impact. This means that the size of your orders should not influence the market, and the market is not affected by your orders. Trading intensity, or order arrival, is counted based on whether your orders can be filled by the trades occurring in the market. Additionally, if the sell trade occurs at 80, it becomes slightly intricate because you must take your queue position into account. Queue position is considered within the backtesting, but in order arrival, queue position is not factored in; only the trades that pass through are counted. |
Beta Was this translation helpful? Give feedback.
-
I wasn’t able to find in the original paper (A&S) as well as in more recent works the assumption that all possible orders are executed up to the recorded trade depth. Imagine that the mid is 100, bid 90 at 110, tick size = 1. You get a large buy order which fills orders up to 115. First of all, you will not just receive trade with price 115, because at least there is an ask at 110. So you will receive a bunch of trades, likely going through prices 110, 111, 112, 113, 115 – assuming that there we orders at those levels. If we use your approach I see two problems: 1) you will fill the bins 100–110, but there was no liquidity there; 2) you would populate some bins more times then you should. Please check out the section 4.4.1 in the following paper which describes calibration of the params. I’m curious what do you think. https://theses.hal.science/tel-01266156/file/2015PA066354.pdf |
Beta Was this translation helpful? Give feedback.
-
I would also love to chat with you in private if possible. Please email [email protected] if you’re okay with that. |
Beta Was this translation helpful? Give feedback.
-
In my implementation, the market maker bot places orders every 100 milliseconds. The trading intensity against our possibly submitted orders is counted based on market trades within the same 100ms interval for a specified window, 10 minutes in the example. Market trades are aggregated by considering the highest buy price and the lowest sell price within this timeframe(100ms), to check if our orders can be filled if placed at each price level. For example, within a 100ms interval, if buy trades occur with the highest price at 100, below this price, all price levels at which the bot can submit sell orders are considered filled (count: +1). While other trades may occur at prices like 96, 98, or 99 during this interval, they do not impact the trading intensity count. This is because the bot submits orders at the specified interval, so once an order at a specific level is filled, no further orders are placed for that level within the interval. Please email [email protected] if you still need to chat with me in private. |
Beta Was this translation helpful? Give feedback.
-
In the crypto world the assumption that your order is "invisible" to the market tends to be more true because there is also the hidden demand for liquidity from the arbitrageurs. Sometimes you are being executed just because you left an order there and some arbitrageur is picking you up. It's part of the game, specially if you are getting rebates for it. Another way of seeing trade intensity is to measure it through queue position and not by price. I never implemented it but seems to make more sense in deep order books of large tick assets, though Stoikov advises against this type of asset for MM in his video. Lehalle's reference for this theme is Sophie's paper in French, which is very close to @sergeysolovev 's comment |
Beta Was this translation helpful? Give feedback.
-
Regarding the second point, of the few videos (I'm aware of) of Gueant. https://www.imsi.institute/videos/market-making-algorithms-the-next-success-of-reinforcement-learning/ . He discusses the topic towards the end of the talk |
Beta Was this translation helpful? Give feedback.
-
Regarding deep order books of large tick assets, briefly, trading intensity based on queue position can be estimated as follows: For instance, let's consider buy trades occurring within a 100ms interval, with a mid-price of 100: 10 trades at 105 At depth 5, the total trade quantity is 15. So, orders at queue positions ranging from 0 to 14 at depth 5 are considered filled (count[depth][:sum_trade_qty] += 1). By performing this within a specified window, such as a 10-minute interval, I think we can obtain a similar exponential decaying distribution for each depth(mainly at the top of book). Of course, while we can determine where our orders could be placed in the same way to price-based trading intensity, it requires a more sophisticated queue positioning algorithm, given that we cannot directly insert orders within the queue. But, still a simple approach could be to wait and cancel orders if the queue becomes too short. I may update it sooner or later. |
Beta Was this translation helpful? Give feedback.
-
@nkaz001 yep agree Given that Gueant himself says that AS's model and also the GLFT are not suited for LOBs, I wonder still today which kind of modelling he recommends. |
Beta Was this translation helpful? Give feedback.
-
In the introduction section of his recent paper, he summarizes the research on market-making in order-driven markets. Additionally, XTX has a plenty of valuable research slides, one of which focuses on emphasizing alpha for market-making in CLOB. But still, there seems opportunities in crypto markets, even in the absence of alpha. |
Beta Was this translation helpful? Give feedback.
-
From Calculating Trading Intensity:
When calculating trading intensity, the trades are aggregated down to the mid. Is it really a fair thing to do? In there was a big order smashing throught multiple levels, we’ll receive all corresponding trades from the data feed. Also there may be not much liquidity around the mid (wide bbo spread), but this way to model it will tell us that most of trading was half tick away from the mid.
I tried to collect the trades without aggregating them down to the mid, and the resulting intensity chart is not a nice decaying exponential curve. To the point, that it’s almost unfittable.
Beta Was this translation helpful? Give feedback.
All reactions