Properties of Limit Order Books
Whilst reading “Empirical and Mathematical Properties of Limit Order Books”, I came across “A Family of Financial Market Models”. Although old, FinancialMarketModel is of interest for anyone interested in markets and order books since the wiki offer some appropriate reading material coupled with source code. Possibly of most interest is the player functionality, and the DoubleAuctionOrderBook offering basic limit order processing:
DoubleAuctionOrderBook behaves like a typical stock market. Some (patient) traders place limit orders which specify a quantity and price. Other (impatient) traders place market orders which execute immediately at the market price, provided that there is adequate liquidity provided by outstanding limit orders. As implemented, placing or cancelling a limit order takes log time, placing a market order takes constant time, and cleanup takes linear time, all w.r.t. the number of limit orders pending
Having been involved in a number of market projects over the years, although the FinancialMarketModel is limited to basic limit orders, the source code is at least public, and the player concepts are relevant to anyone coding there own market from an acceptance test perspective. For those ambitious, this codebase could we consider in terms of adding peg orders (or similar) to being to model further market behavior – possibly considering cloning the NYSE Euronext order types.