AI × Quant Trader Series — Day 23¶
What is Market Making?¶
Reading time: ~20 minutes
Prerequisites: What is High Frequency Trading, What is Market Microstructure, What is an Order Book, What is a Matching Engine
Focus: understanding one of the most fundamental strategies in electronic markets
Part 1: Introduction¶
Financial markets cannot function without liquidity.
Every time you buy a stock, someone must be willing to sell.
Every time you sell Bitcoin, someone must be willing to buy.
If nobody provides liquidity, trading becomes slow, expensive, and unpredictable.
This is where Market Making comes in.
A market maker continuously posts both buy and sell orders, making it easier for other participants to trade at almost any moment.
In return, the market maker earns compensation by capturing part of the bid-ask spread.
Market making is therefore not merely a trading strategy.
It is one of the core mechanisms that allows modern electronic markets to operate efficiently.
Part 2: What is Market Making?¶
A market maker continuously provides two-sided liquidity.
For example:
The objective is simple:
- Buy slightly below the current market price.
- Sell slightly above the current market price.
If both orders are executed,
the market maker captures the spread.
Unlike directional traders,
market makers generally profit from facilitating trading, not from predicting long-term price movements.
Part 3: Why Markets Need Market Makers¶
Imagine an exchange with no liquidity providers.
The order book might look like:
The spread is enormous.
Trading becomes expensive.
Now introduce several market makers.
Competition narrows the spread.
Liquidity improves.
Trading becomes cheaper for everyone.
This is why many exchanges actively encourage market makers through incentive programs.
Part 4: The Basic Market Making Cycle¶
A simplified market making loop looks like:
Receive Market Data
↓
Calculate Fair Price
↓
Quote Bid
↓
Quote Ask
↓
Wait for Execution
↓
Update Inventory
↓
Repeat
The process runs continuously throughout the trading session.
Every market update may trigger new quotes.
Part 5: Capturing the Spread¶
Suppose a market maker quotes:
If both orders execute,
the gross profit becomes:
This seems small.
However,
professional market makers may repeat this process thousands of times each day.
Small profits accumulated consistently can become substantial.
Part 6: Inventory Risk¶
Market making is not risk-free.
Suppose only the bid executes.
The market immediately falls.
The market maker now holds an unwanted long position.
This is known as inventory risk.
Managing inventory is often more important than maximizing spread capture.
Many market-making strategies continuously adjust quotes based on current inventory.
Part 7: Adverse Selection¶
One of the greatest challenges facing market makers is adverse selection.
Imagine quoting:
A highly informed trader suddenly buys from you.
Seconds later,
the market moves sharply higher.
The spread earned is tiny.
The inventory loss may be much larger.
Professional market makers therefore continuously evaluate whether incoming order flow contains informed trading activity.
Part 8: Quote Management¶
Market makers rarely leave quotes unchanged.
Instead,
they continuously:
- Update prices
- Modify sizes
- Cancel stale orders
- Respond to volatility
- Adjust inventory
In highly active markets,
quotes may change hundreds or thousands of times each second.
Efficient quote management is therefore a core engineering challenge.
Part 9: Technology Behind Market Making¶
A production market-making system requires much more than pricing logic.
Typical components include:
- Market Data Engine
- Local Order Book
- Fair Value Model
- Quote Generator
- Risk Engine
- OMS
- Exchange Gateway
- Position Manager
Every component must operate with low latency and deterministic behavior.
The strategy is only one part of a much larger trading infrastructure.
Part 10: Market Making in High Frequency Trading¶
High Frequency Market Making combines quantitative models with ultra-low latency infrastructure.
The objective is to:
- Update quotes quickly
- React to market changes
- Minimize inventory risk
- Reduce adverse selection
- Capture liquidity rebates
- Maintain competitive prices
Success depends on both financial modeling and systems engineering.
A sophisticated pricing model cannot compensate for slow execution.
Part 11: Where godzilla.dev Fits¶
Building a production market-making platform requires reliable trading infrastructure before any pricing model can be implemented.
godzilla.dev provides many of the foundational components needed for market-making systems, including market data processing, order management, risk management, exchange connectivity, and low-latency communication.
This allows quantitative developers to focus on pricing logic and inventory management instead of rebuilding the underlying trading infrastructure.
As strategies evolve, the surrounding system architecture remains stable and reusable.
Part 12: Key Takeaways¶
Market Making is the process of continuously providing liquidity by quoting both buy and sell prices.
Successful market makers balance three competing objectives:
- Capture the bid-ask spread
- Control inventory risk
- Minimize adverse selection
Although often viewed as a trading strategy, market making is fundamentally an essential market function that enables efficient price discovery and continuous liquidity.
Modern market making combines quantitative models with high-performance trading infrastructure.
Performance Engineering Notes¶
A market-making strategy is only as effective as the infrastructure supporting it.
Every market update may require recalculating quotes, modifying resting orders, and submitting new requests within microseconds.
As a result, production market-making systems rely heavily on shared memory, lock-free communication, cache-aware data structures, and low-latency networking.
The engineering challenges are often just as significant as the financial ones.
What's Next?¶
The next article explores another widely used quantitative trading strategy:
- What is Statistical Arbitrage?