
How Market Makers Determine Bid and Ask Prices in Trading
Market making is a fundamental function in today’s electronic financial markets, providing liquidity, reducing spreads, and enabling smoother trading for market participants. But how do market makers actually decide on the bid and ask prices they quote? This article provides a comprehensive deep-dive into the algorithms and mathematical models behind bid-ask price determination, including hands-on Python code, real-world trading examples, and essential interview questions for quant roles.
A market maker is a financial intermediary or trading firm that continuously quotes both buy (bid) and sell (ask) prices for a particular asset, thereby standing ready to buy or sell at those prices. Their presence ensures liquidity, narrows the bid-ask spread, and allows other market participants to transact efficiently.
The biggest challenge for market makers is inventory risk. When they buy at the bid and sell at the ask, they accumulate a position (inventory). If the market moves against them, they can incur losses. Therefore, optimal bid and ask prices should balance the trade-off between profit from the spread and risk from holding inventory.