> ## Content Index
> Fetch the complete content index at: https://aligrithm.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# 5.50 Market Making With Competitors You Can't See
- URL: https://aligrithm.com/market-making-with-competitors-you-cant-see/
- Published: 2026-08-31T02:00:51.000Z
- Updated: 2026-08-31T02:00:51.000Z
- Description: Add a competitor's inventory as a second state variable in Avellaneda-Stoikov: a matrix ODE closed form beats PPO (500M epochs, 99% paired-t). The fill you miss shifts their next quote and degrades yours.
- Author: ali askar
- Tags: 5. Microstructure Alpha

The Avellaneda-Stoikov framework gives you a clean optimization: post at some depth from the midprice, collect fills according to an exponential probability, penalize inventory quadratically, and done. The framework treats you as the only market maker. Every market order that does not fill you vanishes. That assumption is false in one way that has a real consequence: every unfilled order goes to someone else, and that someone adjusts their quotes accordingly.

Boyce, Herdegen, and Sánchez-Betancourt (2024) patch this. They keep the A-S skeleton and add one extra state variable: the cumulative inventory of the competition. When a buy order arrives and fills the competitor instead of you, the competitor becomes one unit longer. Because the competitor's quotes depend on their inventory, that missed fill shifts their next ask, changes the gap between your depth and theirs, and degrades your fill rate from that moment forward. The fill you passed on is not neutral. It is a future liability.

The paper derives an approximate closed-form solution through a matrix ordinary differential equation, shows it beats PPO trained for 500 million epochs with 99% confidence on a paired t-test, and documents that the reference market maker only needed to post more aggressively than the competition on 13 out of 10,000 simulated paths (0.13%). The math extends the old article ["The Three Pillars of Market Making: Fair Price, Spread, Skew"](https://aligrithm.com/the-three-pillars-of-market-making-fair-price-spread-skew/) directly: same objective function, same exponential fill model, two inventories instead of one.

## The competitor's rule of thumb

The setup has one reference market maker who optimizes and one competing market maker who follows an inventory-linear heuristic. Poisson buy and sell orders arrive at intensities lambda^a and lambda^b. Each order fills either the reference MM or the competitor depending on who posts the tighter depth.

The competitor uses an A-S-derived linear rule. Their ask and bid depths follow

$$ \\tilde{\\delta}^a\_t = \\bar{a} - \\beta \\tilde{Q}\_t - Z\_t, \\qquad \\tilde{\\delta}^b\_t = \\bar{b} + \\beta \\tilde{Q}\_t + Z\_t $$

where tilde\_Q is the competitor's cumulative inventory, a\_bar and b\_bar are their base spread levels, beta controls how aggressively they skew quotes for inventory management, and Z\_t is an independent noise Brownian motion. The reference MM observes tilde\_Q and Z at each instant, so the competitor's posted depth is known now. What the reference MM cannot control is how tilde\_Q evolves next, because that depends on how many orders she lets through.

Worked numbers using the paper's parameters (a\_bar = b\_bar = 0.1, beta = 0.05, no noise at Z = 0):

- Competitor at tilde\_Q = +1 (net long by 1): ask depth = 0.1 - 0.05*1 = 0.05, bid depth = 0.1 + 0.05*1 = 0.15\. The competitor narrows their ask (wants to sell) and widens their bid (slow to buy more).
- Competitor at tilde\_Q = -1 (net short by 1): ask depth = 0.1 + 0.05*1 = 0.15, bid depth = 0.1 - 0.05*1 = 0.05\. They widen their ask (not competing for buy fills) and tighten their bid (wants to buy to cover).

The reference MM watches these shifts in real time. When the competitor tightens their ask, that is the cue to match or stay passive and take fewer fills.

## How missed fills feed back

The departure from classical A-S is in the fill probability. The reference MM's ask fill rate depends on the gap between her own depth and the competitor's, not on the absolute depth:

$$ \\Lambda^a = \\lambda^a \\min\\!\\left(\\exp\\!\\bigl(-\\kappa\\,(\\delta^a - \\tilde{\\delta}^a)\\bigr),\\; 1\\right) $$

and the bid side mirrors this. If delta^a equals tilde\_delta^a, fill rate is lambda^a (full arrival intensity). If delta^a is wider (less aggressive), fill rate decays exponentially at rate kappa. If delta^a is tighter (more aggressive), fill rate caps at lambda^a because every arriving market order hits you first.

Worked example (kappa = 2, lambda^a = 10, competitor ask at tilde\_delta^a = 0.10):

- Reference posts delta^a = 0.20 (10 bps wider than competition): Lambda^a = 10 \* exp(-2 \* (0.20 - 0.10)) = 10 \* exp(-0.20) = 10 \* 0.819 = 8.19 fills per unit time.
- Reference posts delta^a = 0.30 (20 bps wider): Lambda^a = 10 \* exp(-2 \* (0.30 - 0.10)) = 10 \* exp(-0.40) = 10 \* 0.670 = 6.70 fills per unit time.
- Reference posts delta^a = 0.05 (5 bps tighter, inside competition): Lambda^a = min(10 \* exp(-2 \* (0.05 - 0.10)), 10) = min(10 \* exp(0.10), 10) = min(11.05, 10) = 10.0\. Capped at full rate.

The feedback loop works as follows. Suppose the reference MM posts wide and a buy order arrives. The competitor fills it. Competitor inventory rises by 1\. Their next ask depth shrinks by beta = 0.05\. The competition just got tighter on the ask, so the gap (delta^a - tilde\_delta^a) grows, and the reference MM's next fill rate falls. She must manage her own inventory risk against the cost of ceding orders that worsen the competitive environment she operates in.

The goal functional uses the competitor's midprice for terminal inventory liquidation:

$$ J(\\delta) = \\mathbb{E}\\!\\left\[X\_T + Q\_T\\!\\left(S\_T + \\frac{\\bar{a}-\\bar{b}}{2} - \\beta\\tilde{Q}\_T - Z\_T\\right) - \\gamma Q\_T^2 - \\phi\\!\\int\_0^T Q\_r^2\\,dr\\right\] $$

The term inside the parenthesis is the competitor's midprice. If the competitor holds large long inventory (tilde\_Q large), their mid is below S, which marks the reference MM's terminal inventory at a lower price and increases the effective terminal penalty. The two inventories are coupled not just through fill rates but through the terminal condition.

## The closed-form matrix ODE

The value function depends on t, Q, tilde\_Q, Z, and S. The S and X dependence separates cleanly via the linear-quadratic ansatz. What remains is a function g(t, q) that satisfies a nonlinear ODE system over the inventory grid from q\_underline to q\_bar.

The substitution omega(t, q) = exp(kappa \* g(t, q)) converts that nonlinear system into a linear one -- the same exponential change of variables that Guéant, Lehalle, and Fernandez-Tapia (2013) used for the single-MM problem. The linear system is then a matrix ODE whose solution is a matrix exponential.

Theorem 3.1 defines the tridiagonal matrix A with entries:

$$ A\_{q,q} = -\\phi\\kappa q^2 + \\beta\\kappa(\\lambda^a - \\lambda^b)q $$$$ A\_{q,q-1} = \\lambda^a \\exp\\!\\bigl(-1 - \\kappa(\\tfrac{\\beta}{2} - \\bar{a})\\bigr), \\qquad A\_{q,q+1} = \\lambda^b \\exp\\!\\bigl(-1 - \\kappa(\\tfrac{\\beta}{2} - \\bar{b})\\bigr) $$

The terminal vector v has entries v\_q = exp(kappa \* ((a\_bar - b\_bar)/2 \* q - (gamma - beta/2) \* q^2)). The solution is then:

$$ \\omega(t,\\, q) = \\bigl(\\exp(\\mathbf{A}(T - t))\\;\\mathbf{v}\\bigr)\_q $$

Worked reading with the paper's parameters (symmetric case, lambda^a = lambda^b = 10, kappa = 2, a\_bar = b\_bar = 0.1, beta = 0.05, phi = 0.1, gamma = 0.03):

Diagonal entries of A at q = 0: -phi \* kappa \* 0 + beta \* kappa \* (10-10) \* 0 = 0\. At q = 1: -0.1 \* 2 \* 1 + 0.05 \* 2 \* 0 \* 1 = -0.2\. Off-diagonal entries: lambda^a \* exp(-1 - 2\*(0.025 - 0.1)) = 10 \* exp(-1 + 0.15) = 10 \* exp(-0.85) = 10 \* 0.427 = 4.27\. A is a (21 x 21) tridiagonal matrix (inventories -10 through +10). The matrix exponential runs in milliseconds and needs computing only once per market session unless parameters drift.

The optimal depths follow from log-ratios of adjacent omega values:

$$ \\hat{\\delta}^a = \\frac{\\beta}{2} + \\frac{1}{\\kappa}\\!\\left(1 + \\log\\frac{\\omega(t,q)}{\\omega(t,q-1)}\\right) - \\beta\\tilde{q} - z $$$$ \\hat{\\delta}^b = \\frac{\\beta}{2} + \\frac{1}{\\kappa}\\!\\left(1 + \\log\\frac{\\omega(t,q)}{\\omega(t,q+1)}\\right) + \\beta\\tilde{q} + z $$

The -beta \* tilde\_q - z term in the ask depth is the competitor inventory adjustment. When tilde\_q = 1 (competitor is net long), ask depth reduces by 0.05 to match the competitor's own tighter ask. When tilde\_q = -1 (competitor is net short), ask depth rises by 0.05 because the competitor is not competing hard on the ask side and there is no need to tighten further.

The actual posted depth clips the unconstrained optimum at the competitor's level: delta^{\*,a} = max(hat\_delta^a, competitor's depth). Taking the maximum of the two depths means: if the unconstrained optimal is already wider than the competitor, post at the unconstrained optimal and take whatever fill rate that gives. If the unconstrained optimal happens to go below the competitor's depth (which forces you to top the book), post exactly at the competitor's level and fill every arriving order. In practice this happens rarely.

## What the numbers show

The paper runs 10,000 simulations with 1,000 timesteps across T = 1 under symmetric parameters. Three strategies compete head to head: the closed-form from Theorem 3.1, a numerical Euler-scheme approximation of the exact value function, and PPO trained over 500 million epochs.

![Optimal ask depths (solid lines) and bid depths (dashed lines) at t = 0.5, plotted as a function of competitor inventory on the x-axis, with reference MM inventory shown in the color bar from -9 (purple) to +9 (yellow). Red lines mark the competitor's own depths; the reference MM almost always posts wider.](https://storage.ghost.io/c/27/cb/27cb0fc8-2c77-4434-af9e-d5d32a916994/content/images/2026/08/article_459-depth_vs_competitor_inventory.png)

The depth surface shows the two-inventory structure directly. Ask depths slope downward as the competitor's inventory rises (tighter competition for buy-order fills) and bid depths slope upward. Each colored band is a different reference MM inventory. The purple bands (reference MM net short) push the ask tighter and the blue-green bands (reference MM net long) push the bid tighter, consistent with A-S inventory skew. The red lines mark the competitor's own depths: almost every colored line sits above (wider than) the red line, meaning the reference MM almost never tops the book.

![Bar chart comparing mean performance criterion with one-standard-deviation error bars for closed-form approximation (3.64), Euler numerical scheme (3.66), and PPO reinforcement learning (3.14) across 10,000 simulations](https://storage.ghost.io/c/27/cb/27cb0fc8-2c77-4434-af9e-d5d32a916994/content/images/2026/08/article_459-strategy_comparison.png)

Numbers: closed-form 3.64 (standard deviation 2.57), Euler 3.66 (2.56), PPO 3.14 (2.76). The 0.55% shortfall from the closed-form to the Euler exact solution is significant at 99% confidence by a paired t-test. PPO trails the closed-form by 0.50 units, about 14% below the Euler benchmark, despite 500 million training epochs. The authors flag that PPO hyperparameters and architecture choices may explain part of the gap. As-is, the analytic approach costs essentially nothing to compute and dominates.

The 0.13% figure is the most memorable output: in 10,000 simulated paths, only 13 ever required the reference MM to clip to the competitor's depth (i.e., the constraint in equation (3.7) bound). In the other 9,987 paths, the unconstrained optimal sat wider than the competition at every moment, and the reference MM never needed to top the book. The optimal strategy under symmetric arrival rates is to follow the competition's depth rather than race to beat it.

The old article ["DRL Market Making With a Periodic Signal and Real Latency"](https://aligrithm.com/drl-market-making-with-a-periodic-signal-and-real-latency/) showed that DRL wins over A-S when signals and realistic latency enter the picture. This paper shows the reverse in a signal-free two-inventory setting: the structured analytic solution dominates RL, and the structure costs a single matrix exponential per session.

![](https://storage.ghost.io/c/27/cb/27cb0fc8-2c77-4434-af9e-d5d32a916994/content/images/2026/08/article_459-visual-0.png)

## KEY POINTS

- Classical A-S treats every missed fill as a neutral event. This paper tracks missed fills explicitly: orders not filled by the reference MM go to the competitor, raise the competitor's inventory, shift their quotes, and degrade the reference MM's future fill rate.
- The competitor follows a linear inventory rule (A-S-optimal form): their ask shrinks and bid grows when they hold net long inventory (beta = 0.05 per unit in the paper's parameterization). The reference MM observes this state and adjusts quotes accordingly.
- Fill probability depends on the gap between the reference MM's depth and the competitor's depth, not on the absolute depth. A 10 bps wider post with kappa = 2 and lambda^a = 10 reduces the fill rate from 10 to 8.19 per unit time.
- The closed-form uses a matrix exponential: omega(q, t) = (exp(A\*(T-t)) \* v)\_q on a (q\_bar - q\_underline + 1)-dimensional grid. The approximation holds when the unconstrained optimal depth stays at or above the competitor's depth, which holds for the paper's symmetric parameters.
- Performance: closed-form 3.64 beats PPO 3.14 by 14%, with 99% confidence. The Euler exact solution (3.66) sits only 0.55% above the closed-form, a statistically significant but economically small gap.
- The reference MM topped the book in only 13 of 10,000 simulated paths (0.13%). The optimal behavior under symmetric order flow is to follow the competitor's depth rather than undercut it. Competition creates a natural inventory-sharing equilibrium.

## References

- Avellaneda, M. and Stoikov, S. (2008). [High-frequency trading in a limit order book](https://doi.org/10.1080/14697680701381228?ref=aligrithm.com). *Quantitative Finance*, 8(3), 217–224.
- Guéant, O., Lehalle, C.-A. and Fernandez-Tapia, J. (2013). [Dealing with the inventory risk: a solution to the market making problem](https://doi.org/10.1007/s11579-012-0087-0?ref=aligrithm.com). *Mathematics and Financial Economics*, 7(4), 477–507.
- Chordia, T., Roll, R. and Subrahmanyam, A. (2002). [Order imbalance, liquidity, and market returns](https://doi.org/10.1016/S0304-405X%2802%2900136-8?ref=aligrithm.com). *Journal of Financial Economics*, 65(1), 111–130.
- Boyce, R., Herdegen, M. and Sánchez-Betancourt, L. (2024). [Market Making with Exogenous Competition](https://arxiv.org/abs/2407.17393?ref=aligrithm.com). arXiv:2407.17393.