# How does one calibrate lambda in a Avellaneda-Stoikov market making problem?

In market making models derived originally from Avellaneda-Stoikov, there is a function lambda that represents the arrival rate of orders. In its prodigy, there are different representations of lambda, some linear, exponential, etc. But, all of these are functions of the difference between the maker's quote and the reference price. How do you calibrate it on initialization?

Also, in a Gueant-Lehalle-Tapia model, how are A and K practically calibrated?

• Perhaps @lehalle will answer this... – Alex C Sep 19 '17 at 3:38
• He's certainly the best candidate to do so! – Kch Sep 19 '17 at 4:13

(First of all, sorry to have taken so much time to see this question...)

For the paper you refer to (Guéant-L-Tapia), there is a report (in French) by Sophie Laruelle about how to do it in practice: Faisabilité de l’apprentissage des paramètres d’un algorithme de trading sur des données réelles, this title translates into "Feasibility of learning parameters of automated trading systems on real data". Fortunately they are a lot of formulas and charts in her report, so you should be able to understand what she does.

In short:

• you want to estimate the intensity of to be "hit" by a market orders when you have a limit order at a distance $\delta P$ to the mid-price
• for any starting time $t_0$ record the mid-price $P^m(t_0)$
• check the time $\delta T$ when the price reach $P^m(t_0)-\delta P$ (you have to do the same for $P^m(t_0)+\delta P$ too, but here I will describe it for a buy order).
• you need to make some assumptions on:
• what to do if $P^m(t_0)-\delta P$ is higher than the best bid
• what does "the price reach a given level" means: first trade at this price, or first hit at the next price level? you can take your position in the queue to be in between.
• once it is done: for every pair of $\delta P$ and $t_0$, you have a corresponding $\delta P$, its means that under a Poisson assumption you have a lambda for each $\delta P$. This is Figure 1 of Sophie's report: • than you have to fit the lambdas with $k\exp -A \Delta P$. You have several methods. One of the methods proposed in the report is $$k = \mathbb{E}_{P1,P2}\left(\frac{\log\lambda(\Delta P1) - \log(\lambda(\Delta P2)}{\Delta P1 - \Delta P2}\right),\quad A=\mathbb{E}_{P}(\lambda(\Delta P) \exp k \Delta P)$$ But you can use a linear regression if you prefer. This is Figure 4 of the report: • Shouldnt the second $\delta P$ in the fifth bullet point, just above the first figure, be $\delta T$ ? so thet the line reads: for every pair of $\delta P$ and $t_0$, you have a corresponding $\delta T$ , its means... – Mesalas Sep 10 '18 at 10:01
• In bullet point three you write: "check the time δT when the price reach $Pm(t_0)−\delta P$". Which price are you referring to here, the mid-price? – Mesalas Sep 10 '18 at 10:54
• it is the price at which a marketable order is sent: say we monitor a buy order (on the bid side), then a selling order at this price or lower, or a best ask price at this level would be enough, @Mesalas – lehalle Sep 10 '18 at 19:33
• @lehalle Thanks for this explanation. I have a question, however - aren't these empirical fill rates at odds with the fact that the paper has the MM reprice her orders after some amount of time, even without a fill occurring? – wildbunny Apr 15 '19 at 9:01
• hello, is there an English translation of that paper somewhere? Thanks – i squared - Keep it Real Oct 20 '19 at 22:18