AI & Trading

Order Book Dynamics for Retail Quants

Most retail traders look at a candlestick chart. Professional algorithms look at the Limit Order Book (LOB). If you don't understand how orders match, you cannot write a profitable high-frequency strategy.

The Limit Order Book (LOB)

The LOB is a list of all passive (limit) orders waiting to be executed. It has two sides:

  • The Bid: Buyers waiting for someone to sell to them. (Provides Liquidity)
  • The Ask (Offer): Sellers waiting for someone to buy from them. (Provides Liquidity)

Market Orders vs Limit Orders

When you submit a Market Order, you are demanding immediate execution. You cross the spread and take liquidity from the passive limit orders resting on the book. This costs you the spread.

Example:
Bid: $100.00 (100 shares)
Ask: $100.05 (100 shares)

If you buy at Market, you pay $100.05.
If you sell at Market, you receive $100.00.