Olox Olox

Theme

Documentation
Back to Home

Market Microstructure: Understanding How Markets Work

Introduction to market microstructure - how prices are formed, bid-ask spreads, order flow, market makers, and the mechanics of trading in Indian markets.

6 min read Jan 15, 2025

Introduction: The Hidden Mechanics of Markets

“Behind every stock price you see is a complex web of orders, algorithms, and market structure that determines how and why prices move.”

Market microstructure is the study of how markets work at the granular level—how orders interact, prices form, and trades execute. Understanding these mechanics can improve your trading and help you avoid costly mistakes.


What is Market Microstructure?

Definition

Market microstructure studies the process by which investors’ latent demands are ultimately translated into prices and transactions.

Key Questions

QuestionArea
How do prices form?Price discovery
Why do prices differ from fair value?Market friction
What determines bid-ask spread?Transaction costs
How does information enter prices?Information efficiency
Who provides liquidity?Market making

Why It Matters

ForImportance
TradersBetter execution, lower costs
InvestorsUnderstanding price movements
RegulatorsMarket design, fairness
FirmsOptimal order strategies

Price Discovery

What is Price Discovery?

The process by which market prices are determined through the interaction of buyers and sellers.

Price Discovery Mechanisms

MechanismHow It Works
Continuous auctionOngoing order matching
Call auctionOrders collected, single price
NegotiatedBilateral bargaining
Quote-drivenDealers provide prices

Indian Market Mechanism

Pre-Open Session (9:00-9:15):

  • Call auction
  • Opening price discovered
  • Single equilibrium price

Normal Trading (9:15-3:30):

  • Continuous auction
  • Price-time priority
  • Real-time matching

Opening Price Calculation

Algorithm:

  1. Collect all orders by 9:08
  2. Calculate volume at each price
  3. Find price maximizing traded volume
  4. If tie, minimize imbalance
  5. If still tie, closest to previous close

Example:

PriceBuy VolumeSell VolumeTradeable
₹1021,0005,0001,000
₹1013,0004,0003,000
₹1005,0003,0003,000
₹997,0001,0001,000

Opening Price: ₹101 or ₹100 (maximum tradeable = 3,000)


The Order Book

Order Book Structure

Bid Side (Buyers):

PriceQuantityOrders
₹99.955,00012
₹99.908,00023
₹99.853,0008

Ask Side (Sellers):

PriceQuantityOrders
₹100.002,0005
₹100.054,00011
₹100.106,00015

Key Metrics

MetricValueMeaning
Best Bid₹99.95Highest buy price
Best Ask₹100.00Lowest sell price
Spread₹0.05Difference
Bid Depth16,000Total buy volume
Ask Depth12,000Total sell volume

Order Book Dynamics

What Happens When:

EventImpact
Large buy orderBid depth increases
Market buyAsk side depleted
News releaseBoth sides reprice
UncertaintySpread widens

Bid-Ask Spread

What is the Spread?

The difference between the best ask (lowest sell) and best bid (highest buy) price.

$$Spread = Best\ Ask - Best\ Bid$$

Spread Components

ComponentDescription
Inventory costRisk of holding position
Adverse selectionTrading with informed
Order processingTransaction costs
CompetitionNumber of market makers

Spread Variations

FactorEffect on Spread
High liquidityNarrow spread
Low liquidityWide spread
High volatilityWider spread
Large tick sizeMinimum spread
More competitionNarrower spread

Indian Market Spreads (Typical)

Stock TypeSpread
Nifty 50 stocks0.01-0.05%
Midcap0.05-0.15%
Smallcap0.10-0.50%+
Illiquid1%+

Impact on Trading

Round-Trip Cost: $$Cost = Buy\ at\ Ask + Sell\ at\ Bid = Spread$$

Example:

  • Buy at ₹100.05 (ask)
  • Sell at ₹99.95 (bid)
  • Loss: ₹0.10 (0.1%)

Implication: You start every trade “underwater” by the spread amount.


Liquidity

What is Liquidity?

The ability to buy or sell quickly at a price close to the true value.

Dimensions of Liquidity

DimensionMeasure
TightnessBid-ask spread
DepthOrder book volume
ResilienceSpeed of price recovery
ImmediacyExecution speed

Measuring Liquidity

Volume-Based:

  • Daily turnover
  • Number of trades

Spread-Based:

  • Quoted spread
  • Effective spread

Impact-Based:

  • Market impact cost
  • Implementation shortfall

Liquidity Providers

ProviderRole
Market makersContinuous quotes
ArbitrageursCross-market liquidity
Institutional investorsLarge passive orders
Retail investorsDiverse order flow

Market Impact

What is Market Impact?

The price change caused by your own trading activity.

Types of Impact

TypeDescription
TemporaryPrice bounce back
PermanentInformation reflected

Market Impact Model (Simple)

$$Impact = k \times \sqrt{\frac{Volume}{ADV}}$$

Where:

  • k = stock-specific constant
  • Volume = your trade size
  • ADV = average daily volume

Example

ParameterValue
Your order50,000 shares
ADV500,000 shares
k0.1 (assumed)
Impact0.1 × √(0.1) = 0.0316 = 3.16%

Minimizing Impact

StrategyHow It Helps
Split ordersReduce per-order size
Trade over timeAverage out impact
Use limit ordersAvoid market impact
Dark poolsHidden liquidity
AlgorithmsOptimize execution

Information and Prices

Efficient Market Hypothesis

Forms:

FormInformation Reflected
WeakPast prices
Semi-strongAll public information
StrongAll information (including private)

Information Asymmetry

Informed vs Uninformed Traders:

Trader TypeInformationTiming
InformedHas superior infoTrades ahead of news
UninformedPublic info onlyTrades randomly

Adverse Selection

The Problem:

  • Market makers don’t know who’s informed
  • If they trade with informed, they lose
  • They widen spreads to compensate
  • Everyone pays more

Order Flow Information

Interpreting Order Flow:

SignalPossible Meaning
Large buy ordersInformed buying?
Bid depth decreasingBuyers pulling back
Spread wideningUncertainty increasing
Volume spikeNews or informed activity

Trading Mechanisms

Order-Driven vs Quote-Driven

AspectOrder-Driven (India)Quote-Driven
Prices set byIncoming ordersDealer quotes
ExecutionOrder book matchingAgainst dealer
TransparencyHighLower
ExamplesNSE, BSEForex, bonds

Auction Mechanisms

TypeDescriptionUse
ContinuousOngoing matchingNormal trading
Call/BatchPeriodic matchingOpen/close
Sealed bidHidden bidsIPO

Price Priority Rules

Indian Markets:

  1. Price priority (best price first)
  2. Time priority (first-in-first-out at same price)

Market Quality Measures

Key Indicators

MeasureWhat It Shows
SpreadTransaction cost
DepthCapacity to absorb orders
VolatilityPrice stability
EfficiencyInformation incorporation

Benchmarks

MetricGoodPoor
Spread (liquid stock)<0.05%>0.20%
Daily volumeHigh relative to outstandingThin
Price discoveryMatches fundamentalsDisconnected

Key Takeaways

  1. Price discovery – How market finds equilibrium price
  2. Order book – Queue of bids and asks
  3. Spread is cost – You pay spread to trade
  4. Liquidity varies – Large caps tight, small caps wide
  5. Market impact – Large orders move prices
  6. Information asymmetry – Informed traders vs market makers
  7. Mechanism matters – Order-driven auction in India

Disclaimer

This article is for educational purposes only. Understanding market microstructure helps in trading but doesn’t guarantee profits. Markets are complex and unpredictable. This is not trading advice.


Frequently Asked Questions

Q: Why does the spread exist? A: Market makers/liquidity providers face risks (inventory, adverse selection) and costs. The spread compensates them for providing liquidity.

Q: How can I see the order book? A: Trading platforms show top 5-20 levels of the order book. Full order book (Level 3) may require special subscriptions.

Q: Does low spread mean I should trade? A: Low spread means lower transaction cost, which is good. But it doesn’t tell you about direction or value—spread is about cost, not opportunity.

Q: Why do spreads widen during volatility? A: Market makers face higher risk when prices are volatile. They widen spreads to compensate for the increased probability of loss.

Q: How do algorithms use microstructure? A: Algos optimize execution by reading order book, estimating impact, splitting orders, timing execution, and finding hidden liquidity.

Understanding market microstructure is like understanding the plumbing of a building—invisible when it works, but essential for everything to function properly.