Back to strategies

Market Making Strategy

Quote both sides of the book while controlling inventory and adverse selection

Market Making Strategy is a market-microstructure trading template that transforms level-1 and level-2 bid, ask, depth, trades, and queue updates into short-horizon order decisions, then controls fills, cancels, inventory, and inventory caps, quote-staleness limits, adverse-selection stops, and kill-switch thresholds. - High-frequency market making research

This strategy is provided as an educational example inspired by common public technical-analysis concepts and reference material. It is for research and product demonstration only and does not constitute investment advice.

⚠️ Strategy Suitability
RISK: EXTREME
Best For
  • Markets where level-1 and level-2 bid, ask, depth, trades, and queue updates is timestamped, sequenced, and fast enough to support live order decisions.
  • Venues where expected spread capture exceeds adverse-selection and inventory costs can be converted into orders before the edge is consumed by spread, fees, or latency.
  • Research environments that model queue position, partial fills, cancels, message limits, and adverse selection explicitly.
Avoid In
  • Delayed, sampled, or candle-only data where order-book state and fill priority cannot be reconstructed.
  • Markets where the expected edge is smaller than spread, exchange fees, market-impact, or infrastructure latency.
  • Backtests that assume every quote is filled at the displayed price without queue, cancel, or venue-risk modeling.
🕒 Timeframes
TickSub-secondIntraday
🌍 Markets
StocksFuturesCryptoFX
📢 High-frequency strategies are extremely sensitive to data quality and execution assumptions; inventory caps, quote-staleness limits, adverse-selection stops, and kill-switch thresholds must be enforced before deployment.
Q: What is the core idea behind Market Making Strategy?
The strategy reads level-1 and level-2 bid, ask, depth, trades, and queue updates, waits for expected spread capture exceeds adverse-selection and inventory costs, sends two-sided passive quotes around fair value with inventory skew, and exits when inventory exceeds target, fair value shifts, quote age expires, or fill quality deteriorates.
Q: Why is Market Making Strategy hard to backtest?
It depends on order-book sequencing, queue position, cancel timing, partial fills, fees, and latency; candle data cannot prove that the trades were executable.
Q: What is the biggest risk in Market Making Strategy?
The biggest risk is usually adverse selection: the strategy gets filled when the market is about to move against it, while favorable quotes are cancelled or not filled.

How This Strategy Works

5-stage decision flow from market reading to trade management

1
Feed State
Normalize live order-book inputs
Ingest level-1 and level-2 bid, ask, depth, trades, and queue updates with deterministic timestamps and sequence checks
Reject stale, crossed, locked, or gap-filled book states before signal calculation
Track venue-level spread, depth, queue position, and message throttles
BBMACD
2
Signal Test
Estimate short-horizon edge
Trigger only when expected spread capture exceeds adverse-selection and inventory costs
Require edge to clear spread, fee, adverse-selection, and cancel-risk assumptions
Compare the current book state with same-venue historical microstructure regimes
TouchApproaching cross
3
Order Logic
Place quote or aggressive order
Use two-sided passive quotes around fair value with inventory skew only when queue and fill assumptions are executable
Select venue, price level, order type, and cancel rule before sending orders
Throttle messages so the strategy does not depend on impossible order churn
BB SignalMACD Cross✓ GO
4
Unwind Rule
Manage fills and stale signals
Execute with resting limit orders that refresh when fair value, spread, or queue state changes
Exit when inventory exceeds target, fair value shifts, quote age expires, or fill quality deteriorates
Cancel resting orders immediately when the book state invalidates the signal
BUYPartialSELLProfit Zone
5
HFT Risk
Cap adverse selection and venue risk
Apply inventory caps, quote-staleness limits, adverse-selection stops, and kill-switch thresholds as hard pre-trade and live-trading controls
Stress feed delays, queue loss, crossed markets, disconnects, cancels, and partial fills
Disable the strategy when live fill quality diverges from tested assumptions
EntrySLTPTrailing Stop2%R:R
Strategy Components Reference

Market Making Strategy

Quote both sides of the book while controlling inventory and adverse selection

Market
Making
Spread
SC StratCraft
BBook State
level-1 and level-2 bid, ask, depth, trades, and queue updatesInput feed
Bid-Ask SpreadCost hurdle
Queue PositionFill priority
SEdge Signal
expected spread capture exceeds adverse-selection and inventory costsTrade evidence
Adverse SelectionToxic fill risk
All-In Cost ModelEdge hurdle
OOrder Rules
two-sided passive quotes around fair value with inventory skewPlacement rule
Venue SelectionRouting rule
Message ThrottleOperational guard
XExit Rules
inventory exceeds target, fair value shifts, quote age expires, or fill quality deterioratesPrimary unwind
Cancel RuleResting-order control
Inventory UnwindPosition control
RRisk Control
inventory caps, quote-staleness limits, adverse-selection stops, and kill-switch thresholdsExecution risk
Feed Health CheckData guard
Kill SwitchHard stop
Market Making Strategy
Market Making Strategy is a market-microstructure trading template that transforms level-1 and level-2 bid, ask, depth, trades, and queue updates into short-horizon order decisions, then controls fills, cancels, inventory, and inventory caps, quote-staleness limits, adverse-selection stops, and kill-switch thresholds.
Market Making Strategy Market Suitability
The Market Making Strategy strategy works best in Markets where level-1 and level-2 bid, ask, depth, trades, and queue updates is timestamped, sequenced, and fast enough to support live order decisions.. Venues where expected spread capture exceeds adverse-selection and inventory costs can be converted into orders before the edge is consumed by spread, fees, or latency.. Research environments that model queue position, partial fills, cancels, message limits, and adverse selection explicitly.. Traders should avoid using this strategy in Delayed, sampled, or candle-only data where order-book state and fill priority cannot be reconstructed.. Markets where the expected edge is smaller than spread, exchange fees, market-impact, or infrastructure latency.. Backtests that assume every quote is filled at the displayed price without queue, cancel, or venue-risk modeling.. The risk level is categorized as EXTREME. High-frequency strategies are extremely sensitive to data quality and execution assumptions; inventory caps, quote-staleness limits, adverse-selection stops, and kill-switch thresholds must be enforced before deployment.
What is the core idea behind Market Making Strategy?
The strategy reads level-1 and level-2 bid, ask, depth, trades, and queue updates, waits for expected spread capture exceeds adverse-selection and inventory costs, sends two-sided passive quotes around fair value with inventory skew, and exits when inventory exceeds target, fair value shifts, quote age expires, or fill quality deteriorates.
Why is Market Making Strategy hard to backtest?
It depends on order-book sequencing, queue position, cancel timing, partial fills, fees, and latency; candle data cannot prove that the trades were executable.
What is the biggest risk in Market Making Strategy?
The biggest risk is usually adverse selection: the strategy gets filled when the market is about to move against it, while favorable quotes are cancelled or not filled.
level-1 and level-2 bid, ask, depth, trades, and queue updates
level-1 and level-2 bid, ask, depth, trades, and queue updates supplies the market state used to estimate short-horizon supply, demand, spread, and queue conditions. Formula: Sequenced order-book events
Bid-Ask Spread
The bid-ask spread is the first cost hurdle that a short-horizon strategy must overcome before expected edge can be positive. Formula: Ask - Bid
Queue Position
Queue position estimates whether a resting order is likely to be filled before the market moves or the signal expires. Formula: Displayed size ahead of order
expected spread capture exceeds adverse-selection and inventory costs
expected spread capture exceeds adverse-selection and inventory costs defines the microstructure condition that must clear all costs before the strategy is allowed to send or maintain orders. Formula: Quote = Fair Value +/- Spread/2 +/- Inventory Skew
Adverse Selection
Adverse selection occurs when the strategy is more likely to be filled just before prices move against its position. Formula: Fill followed by unfavorable move
All-In Cost Model
The all-in cost model keeps a microstructure signal from being treated as profitable before fees, queue loss, and latency are included. Formula: Spread + fees + slippage + latency
two-sided passive quotes around fair value with inventory skew
two-sided passive quotes around fair value with inventory skew defines how the strategy converts a short-lived edge estimate into a specific price, side, size, and order type. Formula: Signal to order instruction
Venue Selection
Venue selection chooses where an order should rest or execute after comparing displayed liquidity, fee tiers, queue depth, and fill probability. Formula: Route by spread, queue, fee, and fill odds
Message Throttle
Message throttles prevent a backtest from depending on order and cancel rates that would be rejected or penalized in live trading. Formula: Orders and cancels within limit
inventory exceeds target, fair value shifts, quote age expires, or fill quality deteriorates
inventory exceeds target, fair value shifts, quote age expires, or fill quality deteriorates stops a microstructure trade from remaining open after the original short-horizon edge has disappeared. Formula: Close, cancel, or hedge stale exposure
Cancel Rule
The cancel rule removes resting orders when spread, depth, queue, or signal state changes enough to invalidate the original quote. Formula: Cancel when quote becomes stale
Inventory Unwind
Inventory unwind rules bring filled positions back toward the target exposure before small fill errors become directional risk. Formula: Reduce exposure toward target
inventory caps, quote-staleness limits, adverse-selection stops, and kill-switch thresholds
inventory caps, quote-staleness limits, adverse-selection stops, and kill-switch thresholds defines non-negotiable limits for venue state, feed health, exposure, order rate, and realized fill quality. Formula: Pre-trade and live hard limits
Feed Health Check
Feed health checks stop trading when the order-book state is stale, incomplete, out of sequence, or inconsistent across venues. Formula: No stale, missing, or out-of-sequence events
Kill Switch
A kill switch disables the strategy when loss, latency, reject rate, disconnects, or fill slippage exceeds the tested operating envelope. Formula: Disable on loss, latency, or disconnect breach