# Model

The model simulates the continuous double auction, a market structure common to most modern exchanges. Traders submit bids and offers to buy and sell respectively at the best price they are willing to transact at. If prices cross—a bid meets or exceeds a previous offer, or the converse—a transaction takes place at the earlier listed price. If an incoming order is unable to transact with any existing orders, it is placed in the limit order book. This consists of two lists, the bid book and the ask book which contain the previously unfilled orders on the buy and sell side respectively.

At each time step in our model, a random order of unit size is generated. Orders have equal probability of being a buy or sell and are given a price drawn from a uniform probability distribution with limits 1 and 200. These hard limits on order prices should not be thought of as boundaries that would exist in real markets, but instead are assumed for simplicity. In real markets, we would expect participants to place limit orders according to some humped shaped distribution around the equilibrium clearing price (which would change through time). For simplicity, we assume this humped distribution is a uniform distribution with limits and that the clearing price is constant through time. Using a dynamic clearing price and/or a different distribution with open limits (such as a Gaussian), although perhaps more realistic, would not change the main results of the paper.

Orders fill the limit order book until a transaction takes place. When a transaction occurs, all unfilled orders in the limit order book are cleared and the process of generating new orders is started again. Figure 2a illustrates this diagrammatically.

The HFT interaction is modeled by running two identical exchanges simultane­ously. If transactions are unable to take place on either market in a given time step, but would occur if the two markets were combined, HFT is permitted to transact between the two markets. Figure 2b illustrates this diagrammatically. We make an idealized assumption that HFT is perfectly competitive so that their profit is zero. Therefore, the HFT transactions in the two markets take place at the same price, which we set to the midpoint between the bid price and offer price of the two orders in the two markets.

For example, let the bid price on market 1 be denoted by b1 and the ask price on market 2 be denoted by a2, where bi > a2. When HFT transacts with these orders, the transactions take place at price (b1 + a2)/2 in both markets.

 No Transaction Transaction No Transaction No Transaction Fig. 2 A diagram of the order book in both scenarios modeled. (a) exhibits the market without HFT, at time steps with and without a transaction occurring. Note that transactions can only occur if a bid exceeds an offer. (b) shows the connecting effect HFT. The order book is cleared entirely after each transaction