• 沒有找到結果。

Price Discovery in Agent-Based Computational Modeling of Artificial Stock Markets: What Make it Work and What Don't?

N/A
N/A
Protected

Academic year: 2021

Share "Price Discovery in Agent-Based Computational Modeling of Artificial Stock Markets: What Make it Work and What Don't?"

Copied!
8
0
0

加載中.... (立即查看全文)

全文

(1)

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: chchen@nccu.edu.tw

Chung-Chih Liao

AI-ECON Research Group

Graduate Institute of International Business

National Taiwan University

Taipei, Taiwan 106

bug@liao.com

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 Pro-gramming, 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 well-known 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.

1LeBaron (2000) has a selective survey on some early papers on this growing field. There is also a website onABCF

maintained by Prof. LeBaron:

(2)

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,tis 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+ Pthi,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 Ptis the price of the stock at time period t, Dtis per-share cash dividends paid by the companies issuing the stocks and r is the riskless interest rate. Dtfollows an exogenous stochastic process {Dt} as follows

Dt= ¯d + ρDt−1+ ξt, (4)

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) subject to

Wi,t+1= (1 + r)Mi,t+ hi,t(Pt+1+ Dt+1), (6) where Ei,t(.) is trader i’s conditional expectations of Wt+1given 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

λσi,t2 , (7)

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

N  i=1 h∗i,t(Pt) = N  i=1 Ei,t(Pt+1+ Dt+1− (1 + r)Pt) λσ2i,t = H (8)

Under full information and the homogeneous expectation, it can be shown that the HREE price is

Pt= f Dt+ g (9)

where f = 1+r−ρρ and g = 1r(1 + f )[ ¯d− λ(1 + f)σ2ξ(HN¯)].

3

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).

(3)

Table 1: HREE Price under Different Parameter Settings CASE CODE r d¯ λ σ2 ¯h P∗ Baseline 0.1 100 0.5 4 1 80 Dividends ( ¯d) D 1001 0.1 200 0.5 4 1 180 Interest Rates (r) R-1 0505 0.2 100 0.5 4 1 40 R-2 0504 0.075 100 0.5 4 1 106.67 R-3 0503 0.05 100 0.5 4 1 160 R-4 0502 0.025 100 0.5 4 1 320 R-5 0501 0.01 100 0.5 4 1 800

Degree of Risk Aversion (λ)

L-1 0602 0.1 100 0.75 4 1 70

L-2 0603 0.1 100 0.25 4 1 90

L-3 0601 0.1 100 0.10 4 1 96

Shares Per Capita (h)

H-1 0303 0.1 100 0.5 4 0.75 85 H-2 0302 0.1 100 0.5 4 0.5 90 H-3 0301 0.1 100 0.5 4 0.25 95

4

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 Dtfollows an iid process; therefore, ρ is taken as 0. With this specification, the HREE price can be simplified as Equation 10.

Pt= 1

r[ ¯d− λσ 2

ξ(HN)] = 1r[ ¯d− λσξ2h] (10) In all the experiments to be conducted below, we take the set of parameters used by Chen and Yeh (2000) as the baseline, namely, ( ¯d, r, λ, h) = (10, 0.1, 0.5, 1), and then change only one of them at a time.

Table 1 is a summary of these scenarios. By the parameters interesting us, the table is organized into four blocks, namely, dividend ( ¯d), interest rate (r), degree of risk aversion (λ), and shares per capita (h(= HN)). For each design, the HREE price is calculated as a reference and is given in the last column, P .

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}1000t=1, and then the subsample by after deleting the first 200 observations,{Pt}1000t=201. We denote these two means by ¯P1 and

¯

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

(4)

8 0 1 0 0 1 2 0 1 4 0 1 6 0 1 8 0 2 0 0 2 0 0 4 0 0 6 0 0 8 0 0 1 0 0 0 S 1 0 0 1 3 0 4 0 5 0 6 0 7 0 8 0 9 0 1 0 0 2 0 0 4 0 0 6 0 0 8 0 0 10 0 0 S 050 5 9 0 1 0 0 1 1 0 1 2 0 1 3 0 2 0 0 4 0 0 6 0 0 8 0 0 1 0 0 0 S 0 5 0 4 8 0 1 0 0 1 2 0 1 4 0 1 6 0 1 8 0 2 0 0 4 0 0 6 0 0 8 0 0 1 0 0 0 S 0 5 0 3 50 100 150 200 250 300 200 400 600 800 1000 S 0502 0 1 0 0 2 0 0 3 0 0 4 0 0 5 0 0 6 0 0 2 0 0 4 0 0 6 0 0 8 0 0 10 0 0 S 0 5 0 1

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

6 0 7 0 8 0 9 0 1 0 0 2 0 0 4 0 0 6 0 0 8 0 0 10 0 0 S 060 2 8 0 9 0 1 0 0 1 1 0 1 2 0 1 3 0 2 0 0 4 0 0 6 0 0 8 0 0 1 0 0 0 S 0 6 0 3 8 0 8 5 9 0 9 5 1 0 0 1 0 5 1 1 0 1 1 5 2 0 0 4 0 0 6 0 0 8 0 0 10 0 0 S 060 1 7 5 8 0 8 5 9 0 9 5 1 00 2 00 4 00 6 00 8 00 100 0 S 030 3 9 0 9 5 1 0 0 1 0 5 1 1 0 2 0 0 4 0 0 6 0 0 8 0 0 10 0 0 S 030 2 9 0 9 5 1 0 0 1 0 5 1 1 0 1 1 5 1 2 0 2 0 0 4 0 0 6 0 0 8 0 0 1 0 0 0 S 0 3 0 1

(5)

Table 2: HREE Price and ASM Prices Code HREE P¯1 P¯2 M AP E1 M AP E2 M P E2 σM2 Dividends ( ¯d) 1001 180 167.67 171.73 7% 4% -4% 43.62 Interest Rates (r) 0505 40 45.16 43.15 270% 8% 7% 4.60 0504 106.67 109.05 109.39 4% 4% 2% 18.84 0503 160 146.39 149.94 9% 6% -6% 57.63 0502 320 221.45 235.56 30% 26% -26% 185.30 0501 800 341.82 382.73 57% 52% -52% 7308.19

Degree of Risk Aversion (λ)

0602 70 74.40 73.77 7% 7% 5% 12.97

0603 90 104.89 104.59 16% 16% 16% 14.89

0601 96 95.90 95.56 3% 3% 0% 30.04

Shares Per Capita (h)

0303 85 90.68 90.42 7% 7% 6% 9.96

0302 90 98.60 98.53 9% 9% 9% 8.39

0301 95 106.10 105.88 11% 11% 11% 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 ( ¯P1, M AP E1) and the mean for the subsample by deleting the first 200 observations ( ¯P2, 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

2This 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

(6)

- 0.6 - 0.5 - 0.4 - 0.3 - 0.2 - 0.1 0.0 0.1 200 400 600 800 1000 E 1001 - 1 0 0 10 20 30 40 50 60 200 400 600 800 1000 E 0505 -0.15 -0.10 -0.05 0.00 0.05 0.10 0.15 200 400 600 800 1000 E 0504 - 0.5 - 0.4 - 0.3 - 0.2 - 0.1 0.0 0.1 200 400 600 800 1000 E 0503 - 0.8 - 0.7 - 0.6 - 0.5 - 0.4 - 0.3 - 0.2 - 0.1 200 400 600 800 1000 E 0502 - 1.0 - 0.8 - 0.6 - 0.4 - 0.2 200 400 600 800 1000 E0501 - 0.2 - 0.1 0.0 0.1 0.2 0.3 0.4 200 400 600 800 1000 E 0602 - 0.1 0.0 0.1 0.2 0.3 0.4 0.5 200 400 600 800 1000 E 0603 - 0.2 - 0.1 0.0 0.1 0.2 200 400 600 800 1000 E 0601 -0.10 -0.05 0.00 0.05 0.10 0.15 0.20 200 400 600 800 1000 E 0303 0.00 0.05 0.10 0.15 0.20 200 400 600 800 1000 E 0302 -0.05 0.00 0.05 0.10 0.15 0.20 0.25 200 400 600 800 1000 E 0301

(7)

0 20 40 60 80 -0.10-0.050.000.05 0.100.15 0.20 Series: E0505 Sample 201 1000 Observations 800 Mean 0.078891 Median 0.084137 Maximum 0.230414 Minimum -0.095147 Std. Dev. 0.063850 Skewness -0.478832 Kurtosis 2.974810 Jarque-Bera 30.59183 Probability 0.000000 0 20 40 60 80 100 120 -0.15 -0.10 -0.05 0.00 0.05 Series: E1001 Sample 201 1000 Observations 800 Mean -0.045920 Median -0.046439 Maximum 0.054171 Minimum -0.152061 Std. Dev. 0.033984 Skewness -0.087647 Kurtosis 3.345314 Jarque-Bera 4.998985 Probability 0.082127 0 20 40 60 80 100 -0.10 -0.05 0.00 0.05 0.10 0.15 Series: E0504 Sample 201 1000 Observations 800 Mean 0.025514 Median 0.028047 Maximum 0.140658 Minimum -0.097813 Std. Dev. 0.045983 Skewness -0.421766 Kurtosis 3.114649 Jarque-Bera 24.15635 Probability 0.000006 0 20 40 60 80 100 -0.20 -0.15 -0.10 -0.05 0.00 0.05 Series: E0503 Sample 201 1000 Observations 800 Mean -0.062823 Median -0.067602 Maximum 0.079306 Minimum -0.201989 Std. Dev. 0.053275 Skewness 0.015545 Kurtosis 2.979622 Jarque-Bera 0.046060 Probability 0.977233 0 20 40 60 80 -0.35 -0.30 -0.25 -0.20 Series: E0502 Sample 201 1000 Observations 800 Mean -0.263863 Median -0.259067 Maximum -0.162237 Minimum -0.367643 Std. Dev. 0.048100 Skewness -0.128475 Kurtosis 2.074792 Jarque-Bera 30.73444 Probability 0.000000 0 20 40 60 80 100 120 -0.6 -0.5 -0.4 -0.3 Series: E0501 Sample 201 1000 Observations 800 Mean -0.521577 Median -0.546086 Maximum -0.270859 Minimum -0.673724 Std. Dev. 0.111432 Skewness 0.429709 Kurtosis 1.888871 Jarque-Bera 65.77352 Probability 0.000000 0 20 40 60 80 -0.10-0.05 0.00 0.05 0.10 0.15 Series: E0602 Sample 201 1000 Observations 800 Mean 0.053905 Median 0.062467 Maximum 0.179671 Minimum -0.122324 Std. Dev. 0.064040 Skewness -0.581306 Kurtosis 2.930407 Jarque-Bera 45.21698 Probability 0.000000 0 20 40 60 80 100 120 140 0.0 0.1 0.2 0.3 0.4 Series: E0603 Sample 201 1000 Observations 800 Mean 0.162212 Median 0.164270 Maximum 0.409371 Minimum -0.000675 Std. Dev. 0.063497 Skewness 0.323658 Kurtosis 3.655206 Jarque-Bera 28.27709 Probability 0.000001 0 20 40 60 80 -0.15 -0.10 -0.05 0.00 0.05 0.10 Series: E0601 Sample 201 1000 Observations 800 Mean -0.004542 Median 0.001470 Maximum 0.125106 Minimum -0.148311 Std. Dev. 0.051036 Skewness -0.451207 Kurtosis 2.970701 Jarque-Bera 27.17369 Probability 0.000001 0 20 40 60 80 100 -0.05 0.00 0.05 0.10 0.15 Series: E0303 Sample 201 1000 Observations 800 Mean 0.063806 Median 0.074549 Maximum 0.170575 Minimum -0.064163 Std. Dev. 0.047393 Skewness -0.603341 Kurtosis 2.977488 Jarque-Bera 48.55295 Probability 0.000000 0 10 20 30 40 50 60 0.000 0.025 0.050 0.075 0.100 0.125 0.150 0.175 0.200 Series: E0302 Sample 201 1000 Observations 800 Mean 0.094809 Median 0.096030 Maximum 0.197277 Minimum 0.004161 Std. Dev. 0.037535 Skewness 0.078544 Kurtosis 2.648845 Jarque-Bera 4.932871 Probability 0.084887 0 10 20 30 40 50 60 0.025 0.050 0.075 0.100 0.125 0.150 0.175 0.200 Series: E0301 Sample 201 1000 Observations 800 Mean 0.114564 Median 0.122429 Maximum 0.211040 Minimum 0.025389 Std. Dev. 0.041113 Skewness -0.285761 Kurtosis 2.183516 Jarque-Bera 33.10945 Probability 0.000000

(8)

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 Pro-gramming: 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 Re-search,” 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.

數據

Table 1: HREE Price under Different Parameter Settings CASE CODE r d ¯ λ σ 2 ¯ h P ∗ Baseline 0.1 100 0.5 4 1 80 Dividends ( ¯ d) D 1001 0.1 200 0.5 4 1 180 Interest Rates (r) R-1 0505 0.2 100 0.5 4 1 40 R-2 0504 0.075 100 0.5 4 1 106.67 R-3 0503 0.05 100 0
Figure 2: Time Series Plot of Stock Price Generated from Agent Based Stock Markets: CASE Ls and Hs
Table 2: HREE Price and ASM Prices Code HREE P ¯ 1 P¯ 2 M AP E 1 M AP E 2 M P E 2 σ M2 Dividends ( ¯ d) 1001 180 167.67 171.73 7% 4% -4% 43.62 Interest Rates (r) 0505 40 45.16 43.15 270% 8% 7% 4.60 0504 106.67 109.05 109.39 4% 4% 2% 18.84 0503 160 146.39 1
Figure 3: Time Series Plot of the Absolute Percentage Error by Using P ∗ to Forecast P t
+2

參考文獻

相關文件

 With new ICE trains crossi ng Europe at speeds of up to 300 km/h, sound and vib ration levels in the trains ar e an important issue.  Hilliges/Mehrmann/Mehl(2 004) first

Courtesy: Ned Wright’s Cosmology Page Burles, Nolette & Turner, 1999?. Total Mass Density

There are three major types of personal finance products: mortgages, personal loans and credit cards. Mortgage is a long-term loan that is used for buying a

what is the most sophisticated machine learning model for (my precious big) data. • myth: my big data work best with most

Q: How do human inventions work like animal body parts?. Q: What small invention is important to people

Reuse, Reduction and Recycle of Construction and Demolition Waste Construction and Demolition Waste... What is Construction Waste What is

A set of kernel interfaces and APIs QEMU frontend.. EACH VM IS

• Nokia has been using Socialtext wiki software for a year and a half to facilitate information exchange within its Insight &