Market making — the provision of continuous two-sided quotes at which other market participants can buy or sell — is the lifeblood of liquid financial markets. Without market makers, buyers seeking immediate execution would face illiquid conditions and wide bid-ask spreads, increasing transaction costs for every market participant. Over the past two decades, AI and machine learning have transformed market making from a business dominated by intuitive human traders to one of the most algorithmically sophisticated activities in finance.

The Economics of Market Making

A market maker simultaneously posts a bid price (at which they will buy) and an ask price (at which they will sell), earning the spread between the two. The spread compensates for three costs: order processing costs (technology and operational overhead), inventory risk (the risk that the market moves adversely between buying and selling), and adverse selection (the risk that an incoming order comes from a trader who knows the true value of the asset better than the market maker).

The Avellaneda-Stoikov model, published in 2008, formalised the optimal market-making problem in continuous time: given a stochastic inventory level and a risk-averse market maker, what bid-ask spread maximises the expected terminal wealth? The solution involves adjusting quotes around a "reservation price" that accounts for inventory risk, widening the spread as inventory becomes more extreme.

Machine Learning for Spread and Inventory Management

The Avellaneda-Stoikov model and its descendants require several simplifying assumptions — constant volatility, Poisson arrival rates for orders — that do not hold in real markets. Machine learning replaces these parametric assumptions with empirically estimated components. Survival models (similar to those used in biostatistics) estimate the probability of a fill at different price levels; neural networks predict short-term price direction and volatility from order book features; RL agents learn optimal quote adjustment strategies that minimise inventory accumulation while maximising spread income.

Inventory management is particularly crucial: a market maker who accumulates a large directional position is exposed to market risk. ML models trained on historical order flow data learn to identify patterns that predict whether the current inventory imbalance is likely to resolve naturally (through balanced two-sided flow) or requires active hedging (through aggressive trades in the same or correlated instruments).

Adverse Selection Detection

The most sophisticated component of AI-driven market making is adverse selection detection — identifying when incoming orders come from informed traders who have a genuine edge on the market maker. Order flow toxicity measures, such as Volume-Synchronised Probability of Informed Trading (VPIN), use the imbalance between buy-initiated and sell-initiated volume over short intervals as a proxy for informed trading activity. When VPIN spikes, market makers widen their spreads or temporarily pull quotes entirely to protect against being "picked off" by informed flow.

Deep learning models applied to order book dynamics can identify the fingerprints of institutional order flow — characteristic patterns of iceberg orders, order placement and cancellation sequences, and velocity profiles — that signal the presence of informed traders. By adjusting quotes in anticipation of adverse selection, AI-driven market makers substantially reduce the cost of providing liquidity.

Impact on Market Quality

The proliferation of AI-driven market making has had broadly positive effects on market quality. Bid-ask spreads in major equity markets have declined by more than 90% since the early 1990s, driven largely by electronic market making and increased competition. Transaction costs for institutional and retail investors alike are a fraction of what they were a generation ago.

Critics point to fragility: AI-driven market makers share similar risk models and may simultaneously withdraw liquidity during stress events, amplifying volatility. The May 2010 Flash Crash and subsequent mini-crashes have been attributed partly to this phenomenon. Balancing the efficiency gains of AI market making with the need for robust liquidity provision during market dislocations remains an ongoing challenge for both regulators and market structure designers.