Maslov's order book model
Previously we have discussed what order book is. We have also discussed simplified model inspired by physics (here. Let us now consider another simple model [1], which appears to be a bit more realistic model of the order book.
The model
Strictly speaking we cannot classify Maslov's model as an agent-based model because this model does not have agents in traditional sense. In this model it assumed that at each time tick one agent comes out of the pool of agents and submits his order.
The submitted order could be either bid (buy) or ask (sell) order with equal probabilities. Also the order could be either limit (with probability
If the order is a market order and there is at least one order on the suitable (opposite) side of the order book, then both orders are executed and the new market price is set. Namely, market order is matched with the best available order from the opposite side of the order book and the limit order is removed from the order book. In this post we use
If the order is a limit order, then it will be placed into the order book. Before placing the order into the order book, we must set its limit price. In this model limit price for the order is set randomly. If the order is a bid limit order, then the order's limit price is picked randomly from the interval
Unlike real markets this model does not have order cancellation possibility. Yet in order to avoid overflow problems, we limit each order book side to
The forth model parameter is
Interactive applets
In the previous text we have already presented a simple implementation of this model to illustrate how the order book works. Here we once again share the same app as you can now look at it from a different perspective. Unlike another app at the end of the text, this app has fixed model parameter values:
The other app we would like to share in this post is more flexible, it allows to change the four parameters discussed in the text. You can change the parameter values and observe how they impact the relevant, log-price and absolute return, time series (bottom figures) as well as the main statistical properties, the probability density function and the power spectrum density, of the absolute return time series (top figures).

Acknowledgment. This post was written while reviewing literature relevant to the planned activities in postdoctoral fellowship ''Physical modeling of order-book and opinion dynamics'' (09.3.3-LMT-K-712-02-0026) project. The fellowship is funded by the European Social Fund under the No 09.3.3-LMT-K-712 ''Development of Competences of Scientists, other Researchers and Students through Practical Research Activities'' measure.
References
- S. Maslov. Simple model of a limit order-driven market. Physica A 278: 571-578 (2000). doi: 10.1016/S0378-4371(00)00067-4.