On experimental investigation of the web-based stock-exchange model

In this paper, the updated model USEGM simulating the stock exchange is investigated. The updated model includes the transaction costs to reflect the reality better. To represent users that prefer linear utility functions, USEGM adds the new models which minimize absolute prediction errors to the traditional ones minimizing square deviations. However, the main objective of USEGM is not forecasting, but simulation of financial time series that are affected by predictions of the participants. The model has been compared with actual financial time series.


Introduction
The purpose of USEGM is to explore the relationship between the real data and the Nash equilibrium and to investigate what other results can be obtained using this simple model. For example, a dynamic control of buying-selling margins and bank rate haircuts provides a possibility to simulate the market and fund illiquidity as the cause of financial crisis. The interactive mode of buying-selling levels allows a manipulation of virtual financial markets.
The scientific objective of this approach is to test the hypothesis that some important stock exchange features can be approximately described as a game of players using rational strategies.
It is supposed that stock prices are primarily the result of the game of several major stockholders with some random deviations that represent large numbers of small investors. Investment decisions depend on stockholders' predictions of the future stock prices and expected dividends. The expected risk defines margins of stockholders and haircuts of banks.
The model is used to investigate what could be learned about the basics of market theory using the simple game-theoretical stock exchange model. USEGM assumes that each player predicts stock prices by the autoregressive models AR(p) [1] or AR-ABS (p) of order p. Scale parameters a of the model AR(p) are estimated using the standard least squares algorithm for different p. The scale parameters a of the AR-ABS (p) model which represents linear utility function are defined by the linear programming [8].
Actual stockholders use their own ways of predicting. We regard the AR(p) and AR-ABS (p) models as the simplest initial approximations of the prediction processes.
The more advanced autoregressive moving-average models are for stockholders which use the corrections based on previous prediction errors.
Simulations using AR(p) models with various p at fixed buying-selling levels indicate that the prediction errors do not deviate significantly from the simplest Random Walk (RW) models with p = a 1 = 1 representing the basic assumptions of the efficient market theory. However, the profits simulated by USEGM depend on p significantly and can be improved by deviation from the RW model. This represents a new argument regarding this model.
In the following sections, we shall describe, in short, the basics of USEGM which are needed for understanding, some new features of the model and experimental results. The detailed formal descriptions of the older versions of the model are in [6,7].

Buying and selling strategies
We start a formal description by considering a simple case of I major players i = 1, . . . , I and a single joint-stock company. The following notation is used: is the relative stock price change at time t as predicted by the player i (1) Expected profitability 3 (relative profit) p(t, i) of an investment at time t depends on the predicted change of stock prices β(t, i), dividends δ(t), the bank rate α(t), and haircut h(t) The aim is profit, thus a customer i will buy some number n b (t, i) of stocks, if profitability is greater comparing with the relative transaction cost τ (t); will sell a number n s (t, i) of stocks, if the relative loss (negative profitability −p(t, i)) is greater as compared with the transaction cost τ (t), and will do nothing, if −τ (t) p(t, i) τ (t).

Investors' profit
The product N (0, i), Z(0, i) is the initial investment to buy N (0, i) shares by the investors' own capital at initial price Z(0, i). The initial funds to invest are C 0 (0, i) and the initial credit limit is L(0, i).
L(t, i), t = 1, . . . , T is the credit available for a customer i at time t . The investors' own funds C 0 (t, i) to invest at time t are Here the product (N (t, i) − N (t − 1, i))Z(t) defines the money involved in buyingselling stocks. Stocks are obtained using both investors own money C 0 (t, i) and the funds b(t, i) borrowed at moment t. The borrowed sum of the stockholder i accumulated at time t is The symbol b(t, i) shows what the user i borrows at moment t.
In the opinion of some professional brokers we have interviewed, one needs at least three buying profitability levels p b (t, i, l), l = 1, 2, 3 to explain the behavior of major stockholders. The level l = 1 means to buy-sell just one stock. The level l = 3 means to buy-sell as much stocks as possible, and the level l = 2 is in the middle.

Bank profit
If a stockholder i gets insolvent at time t * i , the bank losses are The total bank losses accumulated at time t max i t * i are The bank income The bank profit

Prediction by actual data
In USEGM, both the AR(p) and AR-ABS (p) models [8] are meant for stock exchange simulation, assuming that stock-holders predict the next-day stock prices using these models. However, to test these models using actual data the modification separating the learning and testing procedures has been made. In the learning stage, the parameters a k , k = 1, . . . , p are estimated using the first part of observations 1 t 0 < t. Usually t 0 is about t/2. During the testing stage a sequence of predictions is performed using the remaining observations t 0 < s t without updating the parameters.

Historical data
Historical data is obtained automatically using the Yahoo data base. Fig. 1 shows a sample of daily profits of eight customers buying-selling the Nike stocks. The maximal profit 222 was obtained by the AR-ABS (9) model. The profit 110 was achieved by the AR(6) model which was best among AR models. In contrast, the minimal MAE was provided by the different model AR (1). This illustrates that the profit simulation by some stock-exchange model can be regarded as useful tool in addition to traditional time series models [1]. Table 1 illustrates the differences between the optimal expected profits calculated by USEGM using different prediction models and the corresponding predictions which minimize MAE [8].

Comparison of MAE, MSE, and profits simulated by USEGM
The following nine stocks were used: Microsoft (MSFT), Apple (AAPL), Google (GOOG), Applied Materials (AMAT), Nokia (NDK), Toyota (TM), Bank-of-America (BAC), Boeing (BA), and Nike (NKE). The unexpected result is the observed differences between maximal USEGM profits and minimal prediction errors of statistical predictions using the same historical data.

Software of the USEGM model
The USEGM model is a part of the general on-line system for graduate studies and scientific collaboration [5,4].  The main web site (last modified December, 2010) is at: http://mockus.org/ optimum. Examples are in the form of Java applets and can be started by any browser with Java support (assuming that both Java and JavaScript are enabled).
The common feature of examples is that all of them are solved using optimization techniques.

Concluding remarks
The Game Theory is a suitable framework to model financial markets because the future market price of financial assets depends on predictions (and subsequent actions) of the market participants with conflicting interests.
The model USEGM is designed as a tool for simulating the market processes in response to different changes of market parameters. Convenient user interactions are provided by implementing the model as a Java applet and publishing it in open web-sites [2,3].
In this paper, the software implementation and experimental investigation of an updated model USEGM is regarded. USEGM includes the transaction costs, what helps to reflect the reality better. To represent users preferring linear utility functions, USEGM adds the AR-ABS (p) autoregressive model minimizing the absolute values. The traditional AR(p) model minimizing least square deviations reflects risk aversion.
While USEGM may be too simplistic for practical forecasting, it can serve as a useful tool for studies of market behavior by presenting an easy way of simulating different scenarios of stockholder strategies.