Price Discovery in Agent-Based Computational Modeling of ... - aiecon

0 downloads 0 Views 288KB Size Report
This paper studies the behavior of price discovery within a context of an agent ... be a deterministic constant in all of our simulations, the artificial price series ...
Price Discovery in Agent-Based Computational Modeling of Artificial Stock Markets Shu-Heng Chen AI-ECON Research Group Department of Economics National Chengchi University Taipei, Taiwan 11623 E-mail: [email protected]

Chung-Chih Liao AI-ECON Research Group Graduate Institute of International Business National Taiwan University Taipei, Taiwan 106 [email protected] Abstract

This paper studies the behavior of price discovery within a context of an agent based stock market, in which the twin assumptions, namely, rational expectations and the representative agents normally made in mainstream economics, are removed. In this model, traders stochastically update their forecasts by searching the business school whose evolution is driven by genetic programming. Via these agent based simulations, it is found that, except for some extreme cases, the mean prices generated from these artificial markets deviate from the homogeneous rational expectation equilibrium (HREE) prices no more than by 20%. This figure provides us a rough idea on how different we can possibly be when the twin assumptions are not taken. Furthermore, while the HREE price should be a deterministic constant in all of our simulations, the artificial price series generated exhibit quite wild fluctuation, which may be coined as the well-known excessive volatility in finance.

Keywords: Price Discovery, Homogeneous Rational Expectation Equilibrium, Genetic Programming, Agent-Based Computational Finance, Excessive Volatility

1

Motivation and Introduction

It has been argued that standard asset pricing model based on the twin assumptions, the representative agent and rational expectations hypothesis, can only lead to uninteresting dynamics, which can be anything but the real world. For example, under very regular conditions, the market can end up with the wellknown zero-trade theorem (Tirole, 1982). While there are several possibilities to escape from this no-trade conundrum, recent studies based on agent-based computational finance (ABCF) indicate that we can have almost everything simply by giving up the twin assumptions1 . Nonetheless, an important issue generally left unexploited is: under what circumstances and on what aspects, can we still regard the standard asset pricing model with its homogeneous rational expectation equilibrium (HREE) as a reasonable approximation to the dynamics generated by the ABCF methodology. In this paper, we shall start the analysis from the aspect of price discovery. We are asking how well the HREE price can predict the movement of the price dynamics generated by an agent-based stock market. Basically, we start from a standard asset pricing model (Grossman and Stiglitz, 1980) and use the HREE price as the reference. We then build an agent-based computational version of the standard asset pricing model and generate the price dynamics from there. The price series generated will further be compared with the HREE price. 1 LeBaron (2000) has a selective survey on some early papers on this growing field. There is also a website on ABCF maintained by Prof. LeBaron: stanley.feldberg.brandeis.edu/ blebaron/acf/

1

2

Standard Asset Pricing Model

Assume that there are N traders in the stock market, and all of them share the same utility function. More specifically, this function is assumed to be a constant absolute risk aversion (CARA) utility function, U (Wi,t ) = −exp(−λWi,t )

(1)

where Wi,t is the wealth of trader i at time period t, and λ is the degree of relative risk aversion. Traders can accumulate their wealth by making investments. There are two assets available for traders to invest. One is the riskless interest-bearing asset called money, and the other is the risky asset known as the stock. In other words, at each point in time, each trader has two ways to keep her wealth, i.e., Wi,t = Mi,t + Pt hi,t

(2)

where Mi,t and hi,t denotes the money and shares of the stock held by trader i at time t. Given this portfolio (Mi,t ,hi,t ), a trader’s total wealth Wi,t+1 is thus Wi,t+1 = (1 + r)Mi,t + hi,t (Pt+1 + Dt+1 )

(3)

where Pt is the price of the stock at time period t, Dt is per-share cash dividends paid by the companies issuing the stocks and r is the riskless interest rate. Dt follows an exogenous stochastic process {Dt } as follows (4) Dt = d¯ + ρDt−1 + ξt , where ξt ∼ N (0, σξ2 ). Given this wealth dynamics, the goal of each trader is to myopically maximize the one-period expected utility function, Ei,t (U (Wi,t+1 )) = E(−exp(−λWi,t+1 ) | Ii,t )

(5)

Wi,t+1 = (1 + r)Mi,t + hi,t (Pt+1 + Dt+1 ),

(6)

subject to where Ei,t (.) is trader i’s conditional expectations of Wt+1 given her information up to t (the information set Ii,t ). It is well known that under CARA utility and Gaussian distribution for forecasts, trader i’s desire demand for holding shares of risky asset, h∗i,t , is linear in the expected excess return: h∗i,t =

Ei,t (Pt+1 + Dt+1 ) − (1 + r)Pt , 2 λσi,t

(7)

2 is the conditional variance of (Pt+1 + Dt+1 ) given Ii,t . Market clearing price can be find by where σi,t setting aggregate demand to aggregate supply, N  i=1

h∗i,t (Pt ) =

N  Ei,t (Pt+1 + Dt+1 − (1 + r)Pt ) 2 λσi,t

i=1

=H

(8)

Under full information and the homogeneous expectation, it can be shown that the HREE price is Pt = f Dt + g where f =

3

ρ 1+r−ρ

(9)

¯

H and g = 1r (1 + f )[d¯ − λ(1 + f )σξ2 ( N )].

Agent-Based Modeling of Artificial Stock Markets

All simulations to be conducted below are based on AIE-ASM, Version 2, which is a computer program for agent-based simulation of artificial stock markets. Due to the space limit, we are not able to give the detail of the program. The interested reader is referred to Chen and Yeh (2000). 2

Table 1: HREE Price under Different Parameter Settings CASE Baseline D R-1 R-2 R-3 R-4 R-5 L-1 L-2 L-3 H-1 H-2 H-3

4

r λ σ2 d¯ 0.1 100 0.5 4 ¯ Dividends (d) 1001 0.1 200 0.5 4 Interest Rates (r) 0505 0.2 100 0.5 4 0504 0.075 100 0.5 4 0503 0.05 100 0.5 4 0502 0.025 100 0.5 4 0501 0.01 100 0.5 4 Degree of Risk Aversion (λ) 0602 0.1 100 0.75 4 0603 0.1 100 0.25 4 0601 0.1 100 0.10 4 Shares Per Capita (h) 0303 0.1 100 0.5 4 0302 0.1 100 0.5 4 0301 0.1 100 0.5 4

¯ h 1

P∗ 80

1

180

1 1 1 1 1

40 106.67 160 320 800

1 1 1

70 90 96

0.75 0.5 0.25

85 90 95

CODE

Experimental Designs

To examine the relation between the HREE price and the prices observed in an agent based stock market, in particular, whether the HREE price can function as a useful reference, a sequence of experimental designs are conducted. The scenarios considered by us cover all the parameters determining the HREE price except ρ. Here, We assume that dividend Dt follows an iid process; therefore, ρ is taken as 0. With this specification, the HREE price can be simplified as Equation 10. 1 1 ¯ H [d − λσξ2 ( )] = [d¯ − λσξ2 h] (10) r N r In all the experiments to be conducted below, we take the set of parameters used by Chen and Yeh ¯ r, λ, h) = (10, 0.1, 0.5, 1), and then change only one of them at a time. (2000) as the baseline, namely, (d, Table 1 is a summary of these scenarios. By the parameters interesting us, the table is organized into four ¯ interest rate (r), degree of risk aversion (λ), and shares per capita (h(= H )). blocks, namely, dividend (d), N For each design, the HREE price is calculated as a reference and is given in the last column, P ∗ . Pt =

5

Experiment Results

For each case indicated in Table 1, a single run with 1000 trading periods is conducted. The time series plot of the stock price observed in these 12 experiments are given in Figures 1 and 2. From these time series, we calculate the mean price of each series by first using the whole sample {Pt }1000 t=1 , and then the . We denote these two means by P¯1 and subsample by after deleting the first 200 observations, {Pt }1000 t=201 ¯ P2 . The reason to report both of these statistics is mainly due to the possible adjustment process, given that traders have to learn everything from scratch. To make each case comparable, we also calculate the percentage error (PE) and the absolute percentage error (APE), defined as P Et =

Pt − P ∗ , AP Et =| P Et | . P∗

3

(11)

20 0

18 0

18 0

16 0

16 0 14 0 14 0 12 0 12 0 10 0

10 0 80

80 20 0

40 0

60 0

80 0

100 0

20 0

40 0

60 0

S 1001

80 0

100 0

S 0503

100

300

90 250 80 200

70 60

150

50 100 40 30

50 200

400

600

800

10 0 0

200

400

S 050 5

600

800

1000

S 0502

130

600 500

120 400 110

300 200

100 100 90

0 200

400

600

800

10 0 0

200

400

S 050 4

600

800

10 0 0

S 0501

Figure 1: Time Series Plot of Stock Price Generated from Agent Based Stock Markets: CASE D and Rs

100

1 00

95

90

90 80

85 70

80 60 200

400

600

800

10 0 0

75 2 00

4 00

6 00

8 00

100 0

S 060 2

S 030 3

13 0

110

12 0

105 11 0

100 10 0

95

90

80 20 0

40 0

60 0

80 0

90

100 0

200

400

S 0603

600

800

10 0 0

S 030 2

115

120

110

115

105

110

100 105 95 100

90

95

85 80

90 200

400

600

800

10 0 0

200

S 060 1

400

600

800

1000

S 0301

Figure 2: Time Series Plot of Stock Price Generated from Agent Based Stock Markets: CASE Ls and Hs

4

Table 2: HREE Price and ASM Prices Code

HREE

1001

180

0505 0504 0503 0502 0501

40 106.67 160 320 800

0602 0603 0601

70 90 96

0303 0302 0301

85 90 95

P¯1

P¯2 M AP E1 M AP E2 ¯ Dividends (d) 167.67 171.73 7% 4% Interest Rates (r) 45.16 43.15 270% 8% 109.05 109.39 4% 4% 146.39 149.94 9% 6% 221.45 235.56 30% 26% 341.82 382.73 57% 52% Degree of Risk Aversion (λ) 74.40 73.77 7% 7% 104.89 104.59 16% 16% 95.90 95.56 3% 3% Shares Per Capita (h) 90.68 90.42 7% 7% 98.60 98.53 9% 9% 106.10 105.88 11% 11%

M P E2

2 σM

-4%

43.62

7% 2% -6% -26% -52%

4.60 18.84 57.63 185.30 7308.19

5% 16% 0%

12.97 14.89 30.04

6% 9% 11%

9.96 8.39 8.20

The time series behaviour of the {P Et } is displayed in Figure 3, whereas the histogram of the {P Et } is displayed in Figure 4. Table 2 summarizes the mean statistic of the series {Pt }, {AP Et }, and {P Et }. Here, we report the mean for the whole sample (P¯1 , M AP E1 ) and the mean for the subsample by deleting the first 200 observations (P¯2 , M AP E2 , M P E2 ). Finally, the last column gives volatility of the stock price for each market, i.e., the sample variance of {Pt }, V ar(Pt ).

6

Analysis and Discussion

What lessons do we learn from these statistics? First of all, roughly speaking, we can say that HREE price does indicate the direction to which the price will move. This can be seen from Figure 3. All price series moves toward a niche of the HREE price, and then jumps around there. The only difference is how fast and how closely they move and how wide they fluctuate. The best case we ever had is the one coded “0601” (λ = 0.1). In this case, the M P E2 (the mean percentage error in the second sample) is almost nil. If we look at Figure 4, the distribution of errors is very close to the normal distribution (while a Jarque-Bera test rejects the hypothesis that it is normal). In addition to “0601”, “0504” (r = 0.075) is another textbook case. Therefore, there are chances that the distribution of the market price can be unbiased and follows closely to a normal distribution. Nonetheless, there are also possible to have some cases which is a little far away from the textbook situation. “0603” (λ = 0.25) is one example, and “0301” (h = 0.25) is another one. In both cases, the asset is overvalued persistently, and the market force does not drive the price down to P ∗ as the standard textbook would predict. Maybe the worst cases are “0502” and “0501”. These two cases shares two essential characteristics. First, the HREE price is set too high as opposed to the initial values of the price, which are randomly set around 100. Second, it is so high that traders cannot afford the stock at its intrinsic value. While in both cases we start with a rising market, the endogenous disturbance may frustrate the market and make the price difficult and quite time-consuming to get back to its reasonable level.2 2 This open the issue on the significance of cash holding. While the HREE price is not dependent on cash holding; however, since buying on margin (margin trading is prohibited in the current simulations, the assumption of perfect capital market is obviously violated. We are conducting a series of examination on how this market imperfection can affect the

5

0.1

0.4

0.0

0.3

- 0.1

0.2

- 0.2 0.1 - 0.3 0.0

- 0.4

- 0.1

- 0.5 - 0.6

- 0.2 200

400

600

800

1000

200

400

600

E 1001

800

1000

800

1000

800

1000

800

1000

E 0602

60 0.5

50 40

0.4

30

0.3

20

0.2

10

0.1

0

0.0

-10 200

400

600

800

- 0.1

1000

200

400

600

E 0505

E 0603

0.15 0.2 0.10 0.05

0.1

0.00 0.0

-0.05 -0.10

- 0.1

-0.15 200

400

600

800

1000 - 0.2 200

E 0504

400

600 E 0601

0.1

0.20

0.0 - 0.1

0.15

- 0.2

0.10

- 0.3

0.05

- 0.4

0.00

- 0.5 200

400

600

800

-0.05

1000

E 0503

-0.10 200

400

600 E 0303

- 0.1 0.20

- 0.2 - 0.3

0.15 - 0.4 - 0.5

0.10

- 0.6 - 0.7

0.05

- 0.8 200

400

600

800

1000 0.00 200

E 0502

400

600

800

1000

E 0302

0.25

- 0.2

0.20

- 0.4 0.15 0.10

- 0.6

0.05

- 0.8

0.00 -0.05

- 1.0

200

200

400

600

800

400

600

800

1000

1000 E 0301

E0501

Figure 3: Time Series Plot of the Absolute Percentage Error by Using P ∗ to Forecast Pt

6

120

80 Series: E1001 Sample 201 1000 Observations 800

100

Series: E0602 Sample 201 1000 Observations 800

60 Mean Median Maximum Minimum Std. Dev. Skewness Kurtosis

80 60 40 20

-0.045920 -0.046439 0.054171 -0.152061 0.033984 -0.087647 3.345314

Jarque-Bera Probability

Mean Median Maximum Minimum Std. Dev. Skewness Kurtosis

40

20

4.998985 0.082127

Jarque-Bera Probability

0

0.053905 0.062467 0.179671 -0.122324 0.064040 -0.581306 2.930407 45.21698 0.000000

0 -0.15

-0.10

-0.05

0.00

0.05

-0.10

-0.05

0.00

0.05

0.10

0.15

140

80 Series: E0505 Sample 201 1000 Observations 800 Mean Median Maximum Minimum Std. Dev. Skewness Kurtosis

40

20

Jarque-Bera Probability

0 -0.10 -0.05

Series: E0603 Sample 201 1000 Observations 800

120

60

100

0.078891 0.084137 0.230414 -0.095147 0.063850 -0.478832 2.974810

80 60 40 20

30.59183 0.000000

Mean Median Maximum Minimum Std. Dev. Skewness Kurtosis

0.162212 0.164270 0.409371 -0.000675 0.063497 0.323658 3.655206

Jarque-Bera Probability

28.27709 0.000001

0 0.00

0.05

0.10

0.15

0.0

0.20

100

0.1

0.2

0.3

0.4

80 Series: E0504 Sample 201 1000 Observations 800

80

Series: E0601 Sample 201 1000 Observations 800

60 Mean Median Maximum Minimum Std. Dev. Skewness Kurtosis

60

40

0.025514 0.028047 0.140658 -0.097813 0.045983 -0.421766 3.114649

20

20 Jarque-Bera Probability

0 -0.10

-0.05

0.00

0.05

0.10

Mean Median Maximum Minimum Std. Dev. Skewness Kurtosis

40

24.15635 0.000006

Jarque-Bera Probability

0 -0.15

0.15

100

-0.10

-0.05

0.00

0.05

-0.004542 0.001470 0.125106 -0.148311 0.051036 -0.451207 2.970701 27.17369 0.000001

0.10

100 Series: E0503 Sample 201 1000 Observations 800

80

Mean Median Maximum Minimum Std. Dev. Skewness Kurtosis

60

40

Series: E0303 Sample 201 1000 Observations 800

80

-0.062823 -0.067602 0.079306 -0.201989 0.053275 0.015545 2.979622

60

40

20

Mean Median Maximum Minimum Std. Dev. Skewness Kurtosis

0.063806 0.074549 0.170575 -0.064163 0.047393 -0.603341 2.977488

Jarque-Bera Probability

48.55295 0.000000

20 Jarque-Bera Probability

0.046060 0.977233

0

0 -0.20

-0.15

-0.10

-0.05

0.00

0.05

-0.05

80

0.00

0.05

0.10

0.15

60 Series: E0502 Sample 201 1000 Observations 800

50

Series: E0302 Sample 201 1000 Observations 800

60 Mean Median Maximum Minimum Std. Dev. Skewness Kurtosis

40

20

Jarque-Bera Probability

-0.263863 -0.259067 -0.162237 -0.367643 0.048100 -0.128475 2.074792

40 30 20 10

30.73444 0.000000

0 -0.35

-0.30

-0.25

Mean Median Maximum Minimum Std. Dev. Skewness Kurtosis

0.094809 0.096030 0.197277 0.004161 0.037535 0.078544 2.648845

Jarque-Bera Probability

4.932871 0.084887

0 0.000 0.025 0.050 0.075 0.100 0.125 0.150 0.175 0.200

-0.20

120

60 Series: E0501 Sample 201 1000 Observations 800

100

Mean Median Maximum Minimum Std. Dev. Skewness Kurtosis

80 60 40 20

Jarque-Bera Probability

50

-0.521577 -0.546086 -0.270859 -0.673724 0.111432 0.429709 1.888871

40

65.77352 0.000000

10

30 20

0 -0.6

-0.5

-0.4

Series: E0301 Sample 201 1000 Observations 800 Mean Median Maximum Minimum Std. Dev. Skewness Kurtosis Jarque-Bera Probability

0.114564 0.122429 0.211040 0.025389 0.041113 -0.285761 2.183516 33.10945 0.000000

0 0.025 0.050 0.075 0.100 0.125 0.150 0.175 0.200

-0.3

Figure 4: Histogram of the Percentage Error by Using P ∗ to Forecast Pt

7

Maybe the more striking feature of these simulation is overwhelmingly excessive volatility. Notice that the HREE price determined by Equation 10 is a constant and is deterministic. There are no news exogenously injected into the market. As a result, all the fluctuation around the constant sample mean are inconsistent with the rational expectation equilibrium and maybe regarded as excessive volatility.

7

Concluding Remarks

There is little surprise that the price dynamics can be different when the twin assumptions are discarded. But, the question how different it can be remains unanswered. This paper use Chen and Yeh (2000) as a starting point to tackle this issue from the aspect of price discovery. It is found that HREE can still be useful if one is only interesting in knowing the long-term (average) price behaviour approximately, say allowing for a percentage error up to 20%. The possibility that HREE can be useful in the long-run analysis is also not surprising, but there is no proof for that, and our findings can be used to lend support for that possibility. One possible limitation of the current simulations is that the number of generation, i.e., 1000 periods, may be too short. While, based on our experience on other studies, it is not likely that the price would converge in the limit to anywhere, ditto the study with a longer evolution and evaluate its potential influence on percentage error is a direction for the further study.

References [1] Chen, S.-H. and C.-H. Yeh (2000), “Evolving Traders and the Business School with Genetic Programming: A New Architecture of the Agent-Based Artificial Stock Market,” Journal of Economic Dynamics and Control, forthcoming. [2] Grossman, S. J. and J. Stiglitz (1980), “On the Impossibility of Informationally Efficiency Markets,” American Economic Review, 70, pp. 393-408. [3] LeBaron, B. (2000), “Agent-Based Computational Finance: Suggested Readings and Early Research,” Journal of Economic Dynamics and Control, (24)5-7 (2000) pp. 679-702. [4] Tirole J. (1982), “On the Possibility of Speculation under Rational Expectations,” Econometrica, Vol. 50, pp. 1163–1181.

intrinsic value of the asset.

8