Simulation Research on Artificial Financial Market Based on Multiple Competitive Market-Makers

Most of the past studies about dealership market involved only one monoplistic market-maker. The paper aims to build an artificial financial market based on multiple competitive market makers on ANYLOGIC platform, in which one market-maker adopts BAYES learning rule to estimate the fundamental value and the other employs a rough method. In order to validate the effectiveness of dealers’ quotes, we carried out two group simulation experiment. The results show that the quote of each dealer can converge to the fundamental value with certain deviation. What’s more, the deviation of the market-maker with learning ability is smaller while the converging speed slower.


Introduction
In dealership market market-makers are obligated to quote first and then investors submit orders which are cleared by market-makers at the prices they quote. Such trading rule results in adverse selection because of information asymmetry. In order to compensate for the loss produced by the trades with informed traders, market-makers have to keep a spread between ask price and bid price. Bagehot [1] puts forward the idea of explaining the spread from the point of view of information for the first time, which is radically different from the inventory models developed by Demsets [2] , Garman [3] , Mendelson [4] etc. Afterwards Copeland and Galai [5] proposes the concept of information cost and builds a one-period model about market-maker' pricing problem with some traders owning superior information [6] . Given that one-period model can't reflect market dynamics, Glosten and Milgrom [7] bring up the sequential trade framework and they believe that trade itself would expose the hidden information to affect dealer' pricing behavior. Therefore, market-maker could adjust its quote according the type of trade. Das [8] extends Glosten and Milgrom Model and develops an algorithm to realize the theoretical model.
The trading rule of information model mentioned above have one thing in common-there is only one monopolistic dealer responsible for one stock. If adopting such rule, the exchange has to spend a huge cost to supervise the dealer' behavior for maintaining the transparency and justice of the market. In order to make market-maker consciously quote effective prices, it is necessary to introduce multiple competitive market-makers rule which is adopted by NASDAQ. There existed some empirical studies on NASDAQ, but till now few researchers build and study financial market using such trading rule from the perspective of experiment.
The paper improves the learning market-maker model more realistically based on Glosten and Milgrom model and builds an artificial financial market based on multiple competitive market-makers. Through simulation experiments the effectiveness of every market-maker' quote is validated.

Market Model
Market Environment. In the model there are two market-makers and two kinds of investors including informed traders and uninformed traders. The financial trading instruments are stock and cash. Here the fraction of informed traders is defined as α and the probability for an uninformed trader to buy or sell as β.
In the model an exogenous random variable is defined to represent the fundamental value of the security at time t. It is assumed that the fundamental value jumps when a trading day begins. The jump process is modeled as a random process following = + (0, ), where (0, ) represents a sample from a normal distribution with mean zero and variance . In order to simulate the sudden event in the practical market, it is assumed that at every trading period the fundamental value fluctuates with very small probability which can be expressed as = + (0, ), where (0, )represents a sample from a normal distribution with mean zero and variance . Trading Rule. At trading period t both of the market-makers set a pair of ask price and bid price respectively at the same time. The market ask price ( ) and bid price ( ) are determined by the two pair of quotes according to the following rule: if the distance between the position of market-makers' quotes is not too far, the market ask price equals the minimum over each dealer's ask price and the market bid price equals the maximum over each dealer' bid price; if not, in order to track the fundamental value the market ask (bid) price equals the average value of the dealers' ask (bid) prices because in such situation the quote of each dealer may deviate far from the fundamental value.
When the market ask price and bid price at trading period t are public to the whole market, it is assumed that only one investor is selected from the trading crowd and allowed to place a fixed amount of orders. In the model the fixed amount is defined as one unit.
Decision Rule of Investors. In the model it is assumed that the informed traders can acquire plenty of inside information and the fundamental value of the stock is known to them. The decision rule of informed traders in the paper is different from that in the Extended Glosten and Milgrom Model. Here it is assumed that informed traders think that market-makers would raise (lower) the ask (bid) price in certain proportion out of the motive to earn profits. Hence, informed traders compare V " with the modified market ask price (1 − %) and bid price (1 + %) , then place a buy order; else if < (1 + %) , then place a sell order; else, then place no order.
The uninformed traders' decision rule is very simple. They randomly place buy or sell order with equal probability β.
Market-making Strategies of Market-makers. In the model it is assumed that market-makers know the initial fundamental value ( ( ), the fraction of informed traders α and the probability of uninformed traders to trade β, but they don't know which type the selected trader is. In the paper the first market-maker is defined as MM1 and the second as MM2. Below is the detailed analysis about the strategies of MM1 and MM2.
1) Market-making Strategy of MM1 Glosten and Milgrom deduce the theoretical equations of ask price and bid price under a zero profit condition. They claim that the ask price equals the conditional expectation of the fundamental value when buy orders come and bid price equals the conditional expectation of the fundamental value when sell orders come [7] : ) 0 = *+ | 122/ The above ask price and bid price are unbiased estimation of the fundamental value based on the type of order. In order to consider the profit motive of MM1 in the paper, the above equations are adjusted according to the following rule: if no order comes at last trading period, the ask price and bid price are calculated from Eq.1 and Eq.2; if not, the ask price is raised up a certain proportion based on the ask price derived from Eq.1 and bid price is lowered equivalent proportion based on the bid price derived from Eq.2. Then we get: To solve Eq.5 and Eq.6 we have to know the prior probability distribution of . The following two steps specify how to initialize and update the probability distribution of : (1) Initializing the probability distribution of Firstly we should determine the upper and lower limit of according to the following equations: N P = ( + 4 − 1 . Then discretize into intervals with each interval representing one fen in RMB, therefore, ∈ S N , N + 1, … N P − 1, N P U. (  . in which = ∈ S0,1,2, … 8 − 1U and W is the normal density function with specified mean and variance. In the paper MM1 initializes the probability distribution before the market opens every day and ( is set to the mean value of at the closing trading period in last trading day. (2) Update the probability distribution of After one order submitted by the selected trader comes to the market, MM1will update the probability distribution of based on the type of the order. The new distribution is the prior probability distribution of at next trading period: )6( = ) = )6( = |c6716) Order In Eq.9 contains 3 types: buy, sell or no order. According to BAYES learning rule Eq.9 can be reduced to: Where )6(c6716) is the prior probability of certain type of order, it can be expressed as: )6(c6716) = ∑ )6(c6716| = ) ) 6( = ) in which )6(c6716| = ) is determined by the fraction of informed traders and the probability of uninformed traders to trade, then we get: 2) Market-making Strategy of MM2 In the paper, we set a fixed spread 2δ for MM2. fv is defined to represent the MM2' estimation on the fundamental value of the stock. Then we get: MM2 acquires fv from two aspects: From the fundamentals of the stock, the estimated value is defined as jo and jo = + q(0, r), in which q(0, r) represents a sample from a normal distribution with mean zero and variance r . In the real market, MM2 don't know the distribution of q.
From the historical deal price information of the stock, the estimated value is defined as jo and jo equals the deal price at last trading period. jo is the linear combination of jo and jo : ε is the weight of fv . If s is close to 1, MM2 cares about the fundamentals more; if s is close to 0, MM2 cares about historical trend of stock price more. At the start of simulation, jo = ( . Advanced Engineering Forum Vols. 6-7

Simulation Experiments and Results Analysis
The paper realizes the artificial financial market based on multiple competitive market-makers on ANYLOGIC platform. The simulation lasts 123 trading days and every trading day is discretized into 200 trading periods. There are 200 investors and 2 market-makers in the market. The parameters mentioned above are shown in table 1. Table 1 The parameters setting in simulation experiment The simulation experiment will validate the convergence of MM1' quote and MM2' quote to the fundamental value based on the high frequency financial data and low frequency financial data to prove the effectiveness of MM1' quote and MM2' quote. The high frequency data is the mean ask price and mean bid price at each trading period over 123 trading days. The low frequency data is the mean ask price and mean bid price at each trading day over 200 trading periods.
The comparison between MM1' intra-day quote and the intra-day fundamental value at 200 trading periods is shown in Fig.1. And Fig.2 shows the comparison between MM2' intra-day quote and the intra-day fundamental value at 200 trading periods.  Fig.1 and Fig.2 we see both MM1' quote and MM2' quote converge to the fundamental value with certain deviation. Moreover, the deviation of MM1 is smaller than MM2' , but the converging speed of MM1 is slower than that of MM2. The reason for such results is: at the beginning of a trading day, MM1 can't capture enough information to improve its inaccurate estimation on the probability distribution of the fundamental value because of little trading volume, while MM2 acquires noise-contained signals about the fundamental value, so the converging speed of MM1 is slower. But as trades happen continuously, MM1 modifies its expectation on the fundamental value through BAYES learning rule gradually, while MM2 isn't able to learn from the trades and is always using inaccurate information to estimate the fundamental value, so the converging deviation of MM1 is smaller than that of MM2. Fig.3 and Fig.4 show the comparison between MM1' daily quote and the daily fundamental value and the comparison between MM2' daily quote and the daily fundamental value at 123trading days respectively.  Fig.3 and Fig.4, we see the ask price and bid price of each market-maker move up and down surrounding the fundamental value. What's more, the trends of MM1' quote and MM2' quote are nearly the same. The phenomenon occurs because the expected fundamental value of MM2 contains a large proportion of the historical deal price which is determined by MM1 and MM2, namely MM2' quote contains MM1' price information.
In summary, whether the high frequency data of intra-day quotes in Fig.1 and Fig.2 or the low frequency data of daily quotes in Fig.3 and Fig.4 validates that the quote of market-makers in the model is effective.

Conclusions
An artificial financial market based on multiple competitive market-makers is built in the model presented in the paper, in which one market-maker adopts BAYES leaning rule to improve its expectation on the fundamental value and the other only employs a rough strategy to estimate the fundamental value. By simulation experiment, the following conclusion is gained: both of the two market-makers in the paper are able to set effective ask price and bid price, namely their quotes could converge to the fundamental value of the stock, furthermore, the converging deviation of the market-maker with learning ability is smaller than that of the other without learning ability, while the converging speed is slower.
In the paper, much attention is focused on the strategies of market-makers and the decision rules of investors are set rather simple, hence, the trades are all single-side. The future research will combine the relevant theory of Behavioral Finance to construct more practical investors to make the artificial financial market closer to the real market.