Market Microstructure & Limit Order Book Matching in Quantitative Finance
Continuous double auction markets match buyers and sellers across a discrete price grid ordered by price-time priority ().
The Limit Order Book Dynamics
Let and denote bid and ask queue depths at price level :
Mathematical Model / Equation
Order book imbalance provides short-term directional alpha:
Mathematical Model / Equation
Stochastic Jump-Diffusion Asset Pricing
The continuous asset price dynamic governed by Merton's jump-diffusion SDE:
Mathematical Model / Equation
Where is a standard Brownian motion and is a Poisson process with jump intensity .
go
type Order struct {
ID int64
Price uint64 // Fixed-point integer (e.g. $100.50 -> 1005000)
Quantity uint64
Timestamp int64
}
type OrderBook struct {
Bids map[uint64]*RingQueue
Asks map[uint64]*RingQueue
}Price discovery occurs in sub-microsecond intervals where memory latency governs execution advantage.