Estimating Market-Making Order Arrival Rates from Trade Data
Summary
This answer describes a practical way to estimate the order-arrival parameter used in the Guéant-Lehalle-Tapia market-making model. For each quote distance from a chosen reference price, label trades according to whether their prices cross the corresponding bid or ask threshold. Divide the trading day into fixed clock-time windows, count qualifying trades in each window, and average those counts to obtain an arrival-rate estimate for that distance. Repeating the process across distances produces a curve like the one in the referenced paper.
The method can be applied separately to bid and ask activity, or the two estimates can be combined when a simpler symmetric model is adequate. Estimates depend on the window length and need not scale proportionally when the window changes. The answer suggests checking whether fitted model parameters imply plausible spreads relative to the market and refining the setup through backtesting. It presents a practical recipe, not a unique calibration standard; reference-price choice, window size, market conditions, and the difficulty of evaluating high-frequency strategies can all affect the result.
Key ideas
- For each quote distance, identify trades beyond the corresponding bid or ask threshold relative to a reference price.
- Count qualifying trades within fixed clock-time windows and average the counts to estimate arrival rates.
- Repeat the procedure across quote distances to construct an arrival-rate curve.
- Bid and ask rates can be estimated separately or combined when a symmetric approximation is suitable.
- Window length and model choices affect the estimates, so inspect the resulting spreads and strategy performance.
Tags
Full text
# How does one calibrate lambda in a Avellaneda-Stoikov market making problem leading to Gueant-Lehalle-Tapia model?
# How does one calibrate lambda in a Avellaneda-Stoikov market making problem leading to Gueant-Lehalle-Tapia model?
The title is similar to that of the question I was referred to here which has been answered by Lehalle himself!
I'm trying to implement the Gueant-Lehalle-Tapia model which is how I got to this answer where Lehalle refers to another paper by Sophia Laruelle (here, crude English translation by AI: here) where in Section 3.1 she explains how to first estimate the lambda and then use regression to estimate A and K in the GLT formulae. What I don't understand it how I would do it in a real dataset. What she suggests is using a Nelson-Aalen type of estimator within a timeframe of [0, T] to calculate the lambda. But then in the next paragraph she says that T=15 transactions (Ref. Figure 1). Am I supposed to resample based on time or ticks? And then I don't understand how she would use this to calculate lambda for different distances as she suggests in the figure.
In trying to answer this I came across this library hftbacktest and the author Naz's related question here about this particular problem. And he seems to ignore what Sophia suggests and instead assuming arrivals to be a Poisson process, models the inter-arrival times and fits as exponential to find the lambda.
I'm quite confused! To summarise my question, all I want to know is that if I had a days worth of trades tick data how would I get to Sophia's Figure 1 in Section 3.1 of the paper? Thanks a lot.
PS: A first year Quant very new to market making. Sorry if I made a mistake or didn't explain anything required.
## Answer by Nicolás Zanni (score 1, accepted)
https://quant.stackexchange.com/a/77527
For generating that Figure, its exactly like Lehalle said.
I dont remember where I saw the specific points, but my solution was something like this:
- Take a $\delta$ value and make a binary array with a 1 if the traded price is less than Reference Price (Mid, microprice, etc..) - $\delta$ (For bid case, + $\delta$ ask case) and 0 if not.
- Then, take a subset of data(10/15/20 min would be fine). So for a 15min sample, all the data between 9:30Am and 9:45Am, then for 9:45 to 10:00, ...
- For each of the subsets, you count the number of 1 in the binary array and append it to a list.
- Iterating through all the subsets in your day/s, take the mean of the list, and then you have your first pair ($\delta$, $\lambda$).
- Iterate trough all $\delta$s and you will have a similar Figure like Sophie Laurelle.
Some things to consider besides those that are mentioned in the posts you shared:
- This can be done for bid and ask, so you can have different $\lambda$ for each $\delta$. Generally, the LOB exhibit symmetric properties, and they will likely be together. For an easy solution, you can also take the mean and you will have a single curve.
- This Poisson estimation is based on the the sample time you take, so the lambda would be $\hat{\lambda}_{10min}$ and its going to be different to $\hat{\lambda}_{20min}$(Not necessarily twice the first one), but probably the general form of the figure will not change much, just something scaled.
- Consider that the parameters estimated (k, A) are used to construct your optimal spread, so when plugging the estimated parameters, you can have a sense if the optimal spread is too little/big (depends totally on the market) for the actual market spread (ask - bid). Think that you have to be executed to at least try to make a profit, so the numerical values need to be "reasonable".
- Remember that there isnt a "best" way to solve this problems, so start simple and then try to be creative and see what small changes do to the strategy PnL. (Ref price, params change, some forecasts, etc..) Obviously backtesting this in HFT is difficult, but its surprising that small changes in the strategy can have a huge impact in real PnL.
My english writing its not the best, but hope it helps!Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.