Mathematical Problems in Engineering

Volume 2014 (2014), Article ID 563912, 10 pages

http://dx.doi.org/10.1155/2014/563912

## An Agent-Based Computational Model for China’s Stock Market and Stock Index Futures Market

^{1}College of Management and Economics, Tianjin University, Tianjin 300072, China^{2}China Center for Social Computing and Analytics, Tianjin University, Tianjin 300072, China^{3}School of Business, East China University of Science and Technology, Shanghai 200237, China^{4}Department of Mathematics, East China University of Science and Technology, Shanghai 200237, China^{5}Research Center for Econophysics, East China University of Science and Technology, Shanghai 200237, China

Received 17 February 2014; Revised 25 March 2014; Accepted 6 April 2014; Published 17 April 2014

Academic Editor: Pankaj Gupta

Copyright © 2014 Hai-Chuan Xu et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

This study presents an agent-based computational cross market model for Chinese equity market structure, which includes both stocks and CSI 300 index futures. In this model, we design several stocks and one index future to simulate this structure. This model allows heterogeneous investors to make investment decisions with restrictions including wealth, market trading mechanism, and risk management. Investors’ demands and order submissions are endogenously determined. Our model successfully reproduces several key features of the Chinese financial markets including spot-futures basis distribution, bid-ask spread distribution, volatility clustering, and long memory in absolute returns. Our model can be applied in cross market risk control, market mechanism design, and arbitrage strategies analysis.

#### 1. Introduction

On April 16, 2010, CSI 300 index futures succeeded in listing on the China Financial Futures Exchange, which are the first index futures in China and provide a new hedge tool for Chinese financial market practitioners. However, the leverage properties of stock index futures, as well as their hedging strategies which may lead to market shocks, will increase the systemic risk, such as South Korea’s stock index futures market manipulation in 2006 and Dow Jones Industrial Average’s intraday flash crash caused by the E-mini futures contracts. Under the background that serious financial risk events frequently occurred, it is essential to grasp the law of financial risks and then do a good job in risk control and mechanism design, so that we can develop stock index futures and other derivatives successfully. Considering the comovement between stock index futures market and its underlying stock market, risk management in a single market is not sufficient. It is critically more important for us to focus on and control cross market risks.

Previous studies show controversial results for the role of index futures on the spot market. Some researchers found that futures market may stabilize the spot market, while others found that index futures can shock the underlying stocks. For examples, Bae et al. and Wang et al. separately analyzed South Korea’s KOSPI200 index futures, Hong Kong Hang Seng H index futures, and their corresponding spot markets and suggested that stock index futures increase the volatility of the spot market [1, 2]. Xiong et al. confirmed that derivatives can bring risk to stock market from the view of market manipulation [3]. In contrast, Drimbetas et al. argued that stock index futures reduce the stock volatility based on the analysis on the Greek financial market [4]. These studies show that different results are obtained under different samples and different time intervals. However, due to the limitation of empirical study, the impact mechanisms and transmission channels of cross market risk are unknown. Recently, scholars have pointed out that the trading mechanisms would affect the role of stock index futures on spot market. Based on 42 stock exchanges, Cumming et al. found that the trading mechanisms have significant influence on market liquidity [5]. Rittler suggested that futures market have spillover effects on the spot market and thus stock index futures take the role of information diffusion to stock market [6]. However, due to the complexity of the market microstructure and investors’ behavior, it is difficult to clearly analyze the interaction effects between the futures market and spot market. Hence it is more difficult to study the cross markets information and risk transmission mechanisms using traditional empirical studies or mathematical methods.

Agent-based computational models, which have developed rapidly in recent years, bring an alternative view angle for the research on the complicated relationships of cross markets. Several famous agent-based computation finance (ACF) labs have done some preliminary studies on the pricing of derivatives and the risk formation using agent-based computational models. Cappellini developed an artificial market called SumWEB where stock market and stock index futures market coexist, which provided a basic platform for studying cross market arbitrage and price manipulation behaviors [7]. Kobayashi and Hashimoto suggested that the market circuit-breaker would do a good job in controlling excessive price fluctuations and stabilizing the market [8]. Ecca et al. established an agent-based computational model which includes an artificial stock market and an artificial stock options market. They concluded that options would reduce the price volatility of the underlying stock [9].

However, the models above still stay far away from real market when talking about trading mechanisms or investors’ demand decisions. Some scholars even criticized that some of the existing agent-based computational models are toy models. In this direction, Westerhoff established an artificial stock market with heterogeneous interacting agents to consider some supervised mechanisms such as trading taxes, intervention from the central bank, and trading suspension. He pointed out that agent-based models would help to understand the role of regulatory policies [10]. Given that it is still a single-market model, it goes no further on the spot-future cross market interactions.

We design and develop an agent-based computational model with spot-futures cross market structure which coincides with the main characteristics of the Chinese stock market and the CSI index futures market. This model can be useful in analyzing asset pricing, information transmission, and risk spreading between the futures market and the spot market, as well as the implementation of hedging strategies.

#### 2. The Model

In this model, there exists a stock market where several stocks are traded and a stock index futures market where one stock index future is available. For each market, there are three types of investors, namely, informed traders, uninformed traders, and noise traders. What is more important is that there exists a kind of spot-futures arbitrageurs who build or close positions in both markets. Arbitrageurs’ behaviors lead to the comovement between the two markets. For each type of traders, the investment demands are endogenously determined and are subject to constraints from wealth, risk management level, and trading mechanisms in the market, which is largely in line with the present trading mechanisms of the Chinese stock market and the stock index futures market.

##### 2.1. Assets

In the artificial markets, we assume that there are five stocks and one stock index future whose underlying asset is the stock index, which is constructed based on these five stocks’ prices.

###### 2.1.1. Stocks’ Common Value

The evolution of the stock’s common value is given by where is the dividend growth rate of stock , namely, the random walk drift of the common value. The simulation time corresponds with some time interval in the real world, say, 5 seconds. We set the growth rate to be zero due to the extremely short time interval, which means . We assume . stands for the standard deviation in this diffusion process. Parameters of the five stocks are set as in Table 1.

###### 2.1.2. Stock Index

The unit of the stock index is called “point,” and the base period value of the index is 3000 points. The stock index is calculated using the weighted composite price index method, which is showed as follows: where is the market value of index stocks at period , which is the sum of current stock price multiplied by the number of shares outstanding , and is that of base period.

###### 2.1.3. Index Futures’ Common Value

The common value of stock index futures will be calculated according to the futures’ theoretical value; that is, , where is the current index, is the expiration date, and is the days that the stock index future has been listed.

##### 2.2. Markets

Consider the following. (i)There are two markets, a stock market which contains five stocks and a stock index futures market which contains one index future. Both markets adopt continuous double auction trading mechanism and the rule, considering the need of high-frequency trading. Investors can place limit orders or market orders. Buy limit orders whose prices are equal to or higher than the best ask price and sell limit orders whose prices are equal to or lower than best bid price are treated as market orders and executed instantly. According to the rules of the Chinese Financial Futures Exchange, limit orders have certain life time; that is, unexecuted limit orders will be cleared at the end of the day. (ii)The simulation time is similar to a five-second interval in real world, and there may be several transactions or no transaction during the time. (iii)Short selling is not allowed in the stock market but is allowed in the futures market. Thus arbitrageurs can only engage in positive arbitrage; that is, they can only buy stocks and sell futures. (iv)The stock index future market claims margin and settles balance of each margin account after the market close every day. Once the investor’s equity is less than the minimum margin requirement for holding positions, his positions will be forced to close one by one the next day, until his equity is no less than the required minimum margin. (v)The transaction price of the market is the average price of the several transactions during , and if no transaction is done, the price is equal to that of last time, namely, . (vi)There exist no transaction costs for both stocks and futures. (vii)If the wealth of an investor is smaller than a certain amount, he will be identified as bankrupt and exit the market. Another investor who is the same with the former one in investor type, initial wealth, and stocks or futures investment will enter the market.

##### 2.3. Traders Structure and Their Behaviors

There are seven kinds of investors in the markets. Investors that trade only stocks include informed traders, uninformed traders, and noise traders. For each of them, they are designed to randomly choose one stock and invest on it permanently. Also there are three similar types of traders that trade only in the futures market. The spot-futures arbitrageurs trade in both stock market and futures market.

The spot-futures arbitragers real-timely watch the relationship between the stock index and the price of the stock index futures. Once the futures price is higher than the upper boundary of the no-arbitrage range and reaches the arbitrageur’s expected profit point, he will take positions and buy stock portfolios and sell futures in the same time. He will close the position (sell stock portfolios and buy futures) once the futures price falls back to the arbitrage caps; otherwise he will hold the positions to due. The arbitrageurs seek the immediate execution of their orders; thus they only place market orders. To realize risk-free arbitrage, the spot-futures arbitrageurs allocate their wealth between stock portfolios and futures and keep the ratio of the margin for the whole assets within a specific range keeping the account safe.

The heterogeneous expectations and order submission size for six kinds of single-market traders are described as follows.

###### 2.3.1. Trader’s Expectation on Asset Price

Since the expectations of the three types of investors who trade only in the stock market are similar to those who trade only in the futures market, we talk about them together and remove the subscript that stands for the asset number for simplicity. Assume that all the investors know the current common value of a stock, while there is divergence in the futures common value.(a)Informed trader accurately knows the common value of the stock in the following periods when he enters the market, and the expected price is However, as for informed traders in futures market, they cannot accurately know as they are not able to predict accurately. Here we assume that they learn through stock’s common value; their expected price will be (b)Uninformed traders cannot know the future common value , but they know current common value . They obtain their expected prices by mixing three sources, including the current common value , -period average transaction prices , and current mid-point of bid and ask prices . The expected price is given by (c)The expected price of noise trader is randomly chosen within the five levels from the bid and ask prices in the order book, which is given by

###### 2.3.2. Order Size

Given price , an investor’s optimal positions depend on his utility function. Following the demand determined in [11], we assume that investors are absolutely risk averse, namely, they make their investment decision by maximizing CARA utility function, and their optimal positions is where is the absolute risk averse coefficient of investor is the variance of expected return of investor is expected price at period , which is different for different types of investors, and is the order submission price. If the demand quantity is larger (smaller) than the investor’s current position, then the investor buys (sells). is estimated by the variance of past returns:

##### 2.4. Parameter Settings

The evolution of common value of the five stocks has been described. Here we only specify parameter settings on the markets and the investors. Most of these parameters are consistent with the market structure and trading rules in the Shanghai Stock Exchange and the China Financial Futures Exchange.

Every simulation will run 54758 steps, corresponding to 19 days. Namely, each day contains 2882 steps and each step stands for five seconds. The risk-free interest rate in our model is 8%, which is close to the annual lending interest rates in China. The order book is cleared every day in both stock market and futures market. The minimum order size required in the stock market is 100 shares as in the real market. The tick size is 0.01 Chinese Yuan for stocks and 0.2 Chinese Yuan for the futures. The minimum margin rate is 18%, which is the margin rate required by brokers in real trading. The multiplier of futures contract in our model is 300 Chinese Yuan per point, which is also consistent with the IF1009 contract.

For the three types of investors in the stock market, each investor permanently invests in one stock which is randomly selected before the program begins. The initial positions are allocated randomly in the range , and the initial cash is equal to the initial values of all his stocks. For the three types of investors in the futures market, each one’s initial wealth is 3 million, and for each spot-futures arbitrageur it is 10 million. The orders submission interval for the six kinds of single-market investors obeys an exponential distribution; that is, the number of orders during one period follows the Poisson distribution. At the same time, for these six types of single-market investors, the order submission interval is equal to the order life. If they find limit orders submitted before are still unexecuted or not fully executed when they reenter the market, they will cancel the former orders first and then place new orders. For uninformed traders, the variables , , and that represent the weights when forecasting prices are randomly chosen from . The capital safety ratio for futures investors, which is the wealth share for futures investment, is no more than 60%. As for arbitrageurs’ ex ante expected profits for every futures contract, which should be enough to compensate the execution costs when trading in both two markets, we set them randomly in the range , which are equivalent to index futures’ tick sizes. Each investor’s wealth will be updated at the end of every period. If one’s wealth is less than the capital to buy 100 shares of his invested stock, he goes bankrupt and exits the market, while a new investor with the same initial settings as the former one will enter the market. So it is in the futures market when a futures investor cannot afford one index futures’ contract.

#### 3. The Simulation Results and the Statistical Properties

##### 3.1. The First Results

We employ basis, best bid-ask spread, volatility clustering, and autocorrelation of returns as well as other key indicators of market features to compare the agent-based computational cross market model with the 5-second high-frequency data of IF1009 contracts from August 20th, 2010, to September 15th, 2010. Among these indicators, volatility clustering and autocorrelation of returns are common stylized facts in financial markets that adopt continuous double auction trading mechanism [12]. At the same time, they are fundamental for the calibration of agent-based computational models.

Figure 1 shows the spot-futures basis series of the simulated data and the real data. The spot-futures basis is defined as We can find that the two groups of basis have similar downward trends which reflect the convergence of stock index and index futures as the maturity date is approaching. Further, the distributions of spot-futures basis are shown in Figure 2. Similar to the basis between IF1009 and CSI 300, the basis from our simulated model can also be well fitted by the general extreme value distribution.

The distributions of bid-ask spreads are shown in Figure 3. Both the spreads of IF1009 and that of our simulated futures decrease similarly and the magnitudes of each statistics are roughly identical.

The distributions of logarithmic returns are shown in Figure 4, where both IF1009 and the simulated futures show the same properties of leptokurtic and fat tails.

Figure 5 calibrates the long-term memory property of real IF1009 return and the simulated index futures return. Autocorrelation function plots of absolute returns can be used to verify long-term memory. We can also see that both IF1009 and our simulated futures have similar long-term memory.

Martens suggested that GARCH model can better describe the volatility of stock index futures [13]. To examine the volatility clustering of real data and simulation data, we conduct the test using GARCH(1,1) model, which is shown as follows: where is coefficient of GARCH and represents the degree of volatility clustering. A larger means higher volatility clustering. From Table 2, we can find that the return series of both IF1009 and simulated futures have similar volatility clustering. They all follow an AR(2)-GARCH(1,1) process and the values of are 0.81 and 0.90, respectively.

After comparing the spot-futures basis, the bid-ask spread, volatility clustering, and autocorrelation of absolute return, we figure that our agent-based computational model can reproduce the key features of the real spot market and the stock index futures market in China.

##### 3.2. More Experiments

Further, we carry out more computational experiments to clarify whether the simulation results are stable and whether the parameter settings of the five stocks would affect the outcomes of the model.

There are three parameters for stock common value setting: the initial value , the standard deviation of disturbance , and stock shares in the market. It is easy to understand that the initial value will have no obvious impact on the simulation results. In addition, stock shares in our model are only used to calculate the weights for stock index, so what may affect the outcomes of the model, if any, are disturbances’ standard deviations, not the weights, intrinsically. In view of this, we design two extra simulations for different standard deviations of disturbances as in Table 3.

Figures 6, 7, 8, 9, and 10 show the results of the comparative experiments. We can find that for all statistics, namely, spot-futures basis, bid-ask spread, logarithmic return, and its autocorrelation, the two simulations show similar statistical properties as the real market and the first results in the preceding subsection. Thus, we can conclude that the results of this cross market model are stable and this model can reproduce the key features of the real spot market and the stock index futures market in China.

#### 4. Concluding Remarks

According to the characteristics of CSI 300 index futures market and Shanghai stock market, such as continuous double auction trading mechanism, investor types, and investment strategies, we build up an agent-based computational model with spot-futures cross market structure. By analyzing the key properties including spot-futures basis distribution, bid-ask spread distribution, volatility clustering, and autocorrelation of absolute returns and then comparing them with those of real market data, we show that our model can successfully reproduce the Chinese financial markets’ features. Thus, the model can be applied to studies such as inherent risk diffusion, critical factors of cross market risk conduction, trading mechanisms, reasonability of investor structure, and execution risk of trading strategies.

Furthermore, what is the impact of the introduction of stock options and application of related hedging strategies on Chinese stock market? It will be a useful extension to include stock options in our current model to explore the equity markets from a systemic view.

#### Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

#### Acknowledgments

The authors thank editor Pankaj Gupta and anonymous referees for useful suggestions that helped them improve the paper substantially. This research is partly supported by NSFC (nos. 71320107003, 71131007, and 71271145), China Program for New Century Excellent Talents (NCET-07-0605), and Program for Changjiang Scholars and Innovative Research Team (IRT1028).

#### References

- S. C. Bae, T. H. Kwon, and J. W. Park, “Futures trading, spot market volatility, and market efficiency: the case of the Korean index futures markets,”
*Journal of Futures Markets*, vol. 24, no. 12, pp. 1195–1228, 2004. View at Publisher · View at Google Scholar · View at Scopus - S. S. Wang, W. Li, and L. T. W. Cheng, “The impact of H-share derivatives on the underlying equity market,”
*Review of Quantitative Finance and Accounting*, vol. 32, no. 3, pp. 235–267, 2009. View at Publisher · View at Google Scholar · View at Scopus - X. Xiong, Y. Zhang, W. Zhang, and Y.-J. Zhang, “The effect on volatility of stock market and stock index futures market after launching stock index options: a case of KOSPI200 index options,”
*System Engineering Theory & Practice*, vol. 31, no. 5, pp. 785–791, 2011 (Chinese). View at Google Scholar · View at Scopus - E. Drimbetas, N. Sariannidis, and N. Porfiris, “The effect of derivatives trading on volatility of the underlying asset: evidence from the Greek stock market,”
*Applied Financial Economics*, vol. 17, no. 2, pp. 139–148, 2007. View at Publisher · View at Google Scholar · View at Scopus - D. Cumming, S. Johan, and D. Li, “Exchange trading rules and stock market liquidity,”
*Journal of Financial Economics*, vol. 99, no. 3, pp. 651–671, 2011. View at Publisher · View at Google Scholar · View at Scopus - D. Rittler, “Price discovery and volatility spillovers in the European Union emissions trading scheme: a high-frequency analysis,”
*Journal of Banking & Finance*, vol. 36, no. 3, pp. 774–785, 2012. View at Publisher · View at Google Scholar · View at Scopus - A. N. Cappellini, “SumWEB: stock market experiment environment for natural and artificial agents,” Swarm Fest, 2004.
- S. Kobayashi and T. Hashimoto, “Analysis of circuit breakers using artificial stock market,” in
*Proceedings of the 12th International Symposium on Artificial Life and Robotics (AROB '07)*, pp. 260–263, January 2007. View at Scopus - S. Ecca, M. Marchesi, and A. Setzu, “Modeling and simulation of an artificial stock option market,”
*Computational Economics*, vol. 32, no. 1-2, pp. 37–53, 2008. View at Publisher · View at Google Scholar · View at Scopus - F. H. Westerhoff, “The use of agent-based financial market models to test the effectiveness of regulatory policies,”
*Jahrbucher fur Nationalokonomie und Statistik*, vol. 228, no. 2-3, pp. 195–227, 2008. View at Google Scholar · View at Scopus - C. Chiarella, G. Iori, and J. Perelló, “The impact of heterogeneous trading rules on the limit order book and order flows,”
*Journal of Economic Dynamics and Control*, vol. 33, no. 3, pp. 525–537, 2009. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - M. D. Gould, M. A. Porter, S. Williams, M. McDonald, D. J. Fenn, and S. D. Howison, “Limit order books,”
*Quantitative Finance*, vol. 13, no. 11, pp. 1709–1742, 2013. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - M. Martens, “Measuring and forecasting S&P 500 index-futures volatility using high-frequency data,”
*Journal of Futures Markets*, vol. 22, no. 6, pp. 497–518, 2002. View at Publisher · View at Google Scholar · View at Scopus