Vous êtes sur la page 1sur 14

Heterogeneous information-based

artificial stock market

Silvano Cincotti§* and Stefano Pastore¥

§
DIBE-CINEF, Università di Genova, Via Opera Pia 11a, 16145 Genova, Italia
¥
DEEI, Università di Trieste, Via A. Valerio 10I, 34127 Trieste, Italia

Abstract
In this paper, an information-based artificial stock market is considered. The market is
populated by heterogeneous agents that are seen as nodes of a sparsely connected graph.
Agents trade a risky asset in exchange for cash. Beside the amount of cash and of asset
owned the the trader, each agent is characterized by a sentiment. Moreover, agents share their
sentiments by means of interactions that are identified by the graph. Interactions are
unidirectional and are supplied with different weights, depending on the class of the source
agent. Agent’s trading decision is based on sentiment and, consequently, the stock price
process depends on the propagation of information among the interacting agents, on budget
constraints, and on market feedbacks. A central market maker (clearing house mechanism)
determines the price process at the intersection of the demand and the supply curves.
Both closed- and open-market conditions are considered. Results point out validity of the
proposed model of information exchange among agents and yield helpful understanding of
the role of information in real markets. Under closed market condition, the interaction among
agents’ sentiments yields a price process that reproduces main stylized facts of real markets,
i.e., fat tails of returns distributions and clustering of volatility. Within open-market
conditions, i.e., with an external cash inflow that results in asset price inflation, also the
unitary root stylised fact is reproduced by the artificial stock market. Finally, the effects of
model parameters on the properties of the artificial stock market are also addressed.

*
Corresponding author. Email cincotti@dibe.unige.it

1
Introduction
The increasing interest towards complex systems characterized by a large number of simple
interacting units has carried to the birth of co-operations between the fields of economics,
physics, mathematics and engineering. The large availability of financial data has allowed to
improve the knowledge about the price process and many so-called stylized facts have been
discovered, e.g., the fat tails of the returns distribution, the absence of autocorrelation of
returns, the autocorrelation of the volatility, the distribution of trading volumes and of
intervals of trading [1-5].
Since the early ‘90, artificial financial markets based on interacting agents have been
developed. The first artificial market has been built at the Santa Fe Institute [6-8]. It is
characterized by heterogeneous agents with limited rationality, which are endowed with
optimization and learning algorithms, but are able to know the price process only partially.
Generally speaking, the objective of artificial markets is to reproduce the statistical features
of the price process with minimal hypotheses about the intelligence of agents [9]. Several
artificial markets populated with simple agents have been developed and have been able to
reproduce some stylized facts, e.g., fat tails of returns and volatility autocorrelation [10-15].
Stochastic models alternative to artificial markets have also been proposed, e.g., diffusive
models, ARCH-GARCH models, stochastic volatility models, models based on fractional
processes, models based on subordinate processes [16-22]. In particular, studies on stock
markets vulnerability by collective behavior of large group of agents have been proposed.
This leaded to consider collective behavior that could reflect herding phenomenon [16,24,25].
More recently, the role of heterogeneity, agents’ interactions and trade frictions on stylized
facts of stock market returns have also been considered [26].
In this paper, an information-based artificial stock market is proposed. Heterogeneous agents
trade a risky asset in exchange for cash depending on the interactions among agents. Indeed,
a directed random graph propagates information through the agents and trading decision is
based on agent’s sentiment whose time evolution depend on the interaction among agents and
on market feedbacks. Interactions are unidirectional, i.e., agent i-th influences agent k-th but
not necessarily vice versa. Moreover, a central market maker determines the price process at
the intersection of the demand and the supply curves. Both closed and open market
conditions are considered.

2
The Market Microstructure
We build an agent-based artificial stock market. Three basic elements characterize the
market, i.e., trading agents, clearing mechanism and information graph. These features will
be addressed in the following.

Trading Agents
Let N be the number of traders. Each agent is characterized by some properties. We denote
with Si (h) the sentiment, with Ci (h) the amount of cash, with Ai (h) the amount of assets
owned by the i-th trader at time h.
We denote with p(h) the price of the stock at time h. At each simulation step, each trader
issues an order with probability equal to 0.05. Trade is either a buy or a sell order depending
on sentiment Si (h) . In particular, Si (h) ∈ (−1, +1) and if Si (h) is positive, agent i-th issues a

buy order, whereas a sell order is pursued if Si (h) is negative. Suppose that i-th trader issues

a order to sell ais (h + 1) shares of stock at time h+1. We assume ais (h + 1) is a fraction | Si (h) |
of the quantity of stock owned at time h by the i-th trader. A limit price
pis (h + 1) = p (h) [1 + Si (h) ] N (1, σ i ) (1)

accompanies the sell order, where N (1, σ i ) is a random draw from a Gaussian distribution

with average 1 and standard deviation σ i .The value of σ i is proportional to the historical

volatility σ (Ti ) of the asset price [14,15]. It is worth noting that in this case Si (h) ∈ (−1, 0( ,

so that in average pis (h + 1) < p(h) .


Buy orders are counterpart of the sell orders. If i-th trader issues a buy order at time h+1, the
amount of cash employed cib (h + 1) is a fraction Si (h) of available cash at time h. A limit
price
pib (h + 1) = p (h) [1 + Si (h) ] N (1, σ i ) (2)

is associated with the buy order, where N (1, σ i ) is a random draw from a Gaussian

distribution with average 1 and standard deviation σ i . It is worth noting that for buy agents

Si (h) ∈)0, +1) , so that in average pib (h + 1) > p (h) .

A time window Ti is assigned to trader i-th at the beginning of the simulation through a
random draw from a uniform distribution of integers in the range from 10 to 100.

3
Clearing Mechanism
The price process is determined by a central mechanism at the intersection of the demand and
the supply curves. We compute the two curves at the time step h+1 as follows. Suppose that
at time h+1 traders have issued U buy orders and V sell orders. Let the pair ( aub , pub ) with

u=1,..,U and ( avs , pvs ) with v=1,..,V the quantity of stock and the associated limit price for
buy and sell orders. Let us define the total amount of stocks that would be bought (demand
curve) and sold (supply curve) at price p as:
d p (h + 1) = ∑ aub
u | pub > p
(3)
s p (h + 1) = ∑ avs
v| pvs < p

The clearing price is the price p* at which the demand and supply curves cross, i.e,
d p* (h + 1) = s p* (h + 1) . We define the new market price at time step h+1 as p(h+1) = p*. Buy

and sell orders with limit prices compatible with p* are executed. Following transactions,
traders’ cash and portfolio are updated. Orders that do not match the clearing price are
discarded.

Information graph
The N traders of the market are organized according to a directed random graph, where the
agents are the nodes and the branches represent the interactions among agents. The graph is
responsible of the changes in agent’s sentiment. The graph is directed, that is interactions are
assumed unidirectional (i.e., agent k-th influences agent i-th but not necessarily vice versa)
and characterized by a strength g ki , assumed a positive real number. Due to the presence of a
directed graph, both an output node degree kiout, related to the output branches of a given
node, and an input node degree kiin, related to the input branches, should be defined. The
output degree distribution Pout(kout) over the nodes is set to a power law. The input degree
distribution Pin(kin) results a power law too.
Let us denote with ℑi the set of agents that influence the behavior of trader i-th. At each time
step h, information is propagated through the market and sentiment of agent i-th is updated by

(
Si (h + 1) = F α i Si (h) + βi Sˆi (h) + δ i r (h) ) (4)

where

4
∑g ki S k ( h)
Sˆi (h) =
k∈ℑi
(5)
∑| g
k∈ℑi
ki |

represents the influence of interacting agents, and log-return r (h) = log [ p (h) ] − log [ p (h − 1) ]

takes into account a market feedback. It is worth noting that non-linear function F(..) in
Eq.(4), i.e.,
F ( x) = max ( min( x, +1), −1) (6)

is used to limit sentiment in the range (–1,+1). Finally, a constraint on graph interaction is
considered
βi = Γ ⋅ ( 0.6 − α i ) (7)

i.e., self-interaction is a counterpart of graph interactions with a news amplification factor Γ.

Market initialization
At the beginning of the simulation (i.e, h=0), the price p(0) is set at € 10.00. The number of
agents is 1,128 and the traders are ranked according to a Zipf law, i.e., the importance of each
agent is approximately inversely proportional to its rank.
All the parameters of the agents are calculated according to such a ranking. In particular,
trader i-th is endowed with an amount of cash Ci (0) and an amount of stocks Ai (0) inversely

proportional to his rank. The overall amount of cash and stock are ∑ C (0) =470, 000 € and
i
i

∑ A (0) =46,519 , respectively. Moreover, i-th agent is randomly connected to a set of other
i
i

agents whose number and strength gik are inversely proportional to the rank of agent i-th.
Consequently, richer agents influences a larger number of agents with a higher strength.
Moreover, absolute strength of market feedback | δ i | is proportional to his rank, i.e., richer

agents take into lesser account the market behavior. Finally, self- strength α i is positive and
randomly assigned with distribution inversely proportional to the rank of i-th agent, i.e.,
richer agents aims to conserve their opinion, whereas signs of strength β i , and δ i are either
positive or negative with probability 0.5.

5
Result and Discussion
Two different market conditions have been considered: absence of external inflow of cash
and presence of an external geometric inflow of cash. In both conditions, simulations of
10,000 time steps have been performed. Moreover, the simulations consider Γ=3.7,
max( α i )=0.3, max(| δ i | )=6, and max( gik )=5. Such parameters have been heuristically
calibrated so as to ensure proper behavior of the artificial stock market. In particular,
parameter Γ assures the stability of the dynamical market described by Eq. (4). If Γ is too
small, e.g., close to zero, market evolves towards an equilibrium point, whereas if Γ is too
high, market results unstable and sentiments saturate at the extreme values ±1.
Figure 1 shows the price process and the returns in closed market condition. As clearly stated,
large returns and cluster volatility are pointed out which suggest the presence of two stylized
facts, i..e., fat tails and heteroscedasticity. These properties are further confirmed by Fig. 2
that points out distribution of returns and correlation. Leptokurtosis is demonstrated by an
asymptotic power law decay P>(|r|)≅|r|─(1+μ), with μ=─2.93, see Fig. 2a. The presence of
correlation in absolute returns together with its absence in raw returns confirm the
heteroscedasticity stylized fact. Note that the memory in the absolute returns can be
controlled by parameter δ i of the model, the strength of market feedbacks. In particular,

decreasing the value of max(| δ i | ) leads to larger memory effect in the absolute returns (see
Fig. 2b). Furthermore, Fig. 3 shows the wealth distribution of the agents in three different
moment, i.e., at the beginning, after 5,000 time steps and at the end. It is worth noting that the
Zipf distribution appears quite stable. Finally, the artificial market exhibits large price
fluctuations in the presence of small order flows, i.e., a well-known stylized fact. Indeed, the
correlation coefficient between absolute value of returns and volumes is ─0.078, with a
significance level of 0.02.
Beside the condition of closed market, simulations in the case of an external geometric inflow
of cash have been considered. In particular, an equivalent inflow of 3% per year has been
assigned to each agent every 20 step (i.e., about 1 financial month) proportionally to his
current cash. This directly results in an inflation mechanism. Figure 4 shows the price process
and the returns in open market condition. As clearly stated, time evolution suggests the
presence of three stylized facts, i.e., with respect to closed market condition it includes also
the possibility of an I(1) price process. This properties has been verified through the ADF test
with a 10% critical value. Moreover, Fig. 5 points out leptokurtosis (i.e., an asymptotic

6
powerlaw with μ=─3.57) and heteroscedasticity in the distribution of returns. Furthermore,
Fig. 6 shows the wealth distribution of the agents in three different moment, i.e., at the
beginning, after 5,000 time steps and at the end. It is worth noting that, stated inflation in the
marker, the Zipf distribution appears quite stable also in the case of inflation market. Finally,
the correlation coefficient between absolute value of returns and volumes is ─0.084, thus
confirming also this stylised fact in open market conditions.

Conclusions
In this paper, an information-based artificial stock market has been presented, where
heterogeneous agents trade a risky asset in exchange for cash. Beside the amount of cash and
the amount of assets owned by each agent, they are characterized by a sentiment. The agents,
seen as nodes of a sparsely connected graph, share their sentiment with the other interacting
agents. The trading decisions are based on the value of the sentiment, whereas the price of the
asset at each trading day is fixed by a clearing house mechanism. The interaction among the
agent sentiments, during the simulation, yields a price process that reproduces many stylized
facts of real markets, as unitary root of the price process in open market conditions, clustering
of volatility, fat tails of returns distributions. Results pointed out validity of the proposed
model of information exchange among agents. Moreover, the presence of a directed random
graph resulted helpful in order to understand the role of information in real markets.

Acknowledgments
This work has been partially supported by the University of Genoa and by the Italian
Ministry of Education, University and Research (MIUR) under grants FIRB 2001 and
COFIN2004.

References
1. Mandelbrot, B., The variation of certain speculative prices, Journal of Business, 36 (1963) 392-417.
2. Mandelbrot, B., Fractals and Scaling in Finance, Berlin: Springer (1997).
3. U.A. Mueller, M. Dacorogna, R.B. Olsen, O.V. Pictet, M. Schwarz, C. Morgenegg, Statistical Study of
Foreign Exchange Rates, Empirical Journal of Banking and Finance",vol. 14, 1990.
4. R.N. Mantegna, H.E. Stanley, Scaling behaviour of an economic index, Nature 376 (1995) pp. 46-49.
5. P. Gopikrishnan; V. Plerou, X. Gabaix, H.E. Stanley, Statistical properties of share volume traded in
financial markets, Phys Rev E 62 (2000) pp. 4493-4496.
6. R.G. Palmer, W.B. Arthur, J.H. Holland, B.D. LeBaron, P. Tayler, Artificial economic life: a simple model
of a stock market, Physica D 75 (1994) pp. 264-274.

7
7. W.B. Arthur, J.H. Holland, B.D. LeBaron, R.G. Palmer, P. Tayler, Asset pricing under endogeneous
expectations in an artificial stock market, The Economy as an Evolving Complex System II, ed. W. B.
Arthur and S. N. Durlauf and D. A. Lane, Addison Wesley Longman, 1997.
8. B.D. LeBaron, B.W. Arthur, R. Palmer, Time series properties of an artificial stock market, J. Econ Dyn
Control 23 (1999) 1487-1516.
9. M. Levy, H. Levy, S. Solomon, Microscopic Simulation of Financial Markets, Academic Press, 2000.
10. B.D. LeBaron, Agent-based computational finance: Suggested readings and early research, J Econ Dyn
Control 24 (2000) 679-702.
11. M. Raberto, S. Cincotti, S. Focardi, M. Marchesi, “Agent-based Simulation of a Financial Market”, Physica
A, vol. 299, n. 1-2, pp. 319-327, October 2001.
12. L. Matassini, F. Franci, On financial market trading, Physica A 289 (2001) pp. 526-542.
13. C. Chiarella and G. Iori A Simulation Analysis of the Microstructure of Double Auction Markets ,
Quantitative Finance, Vol. 2,no. 5, 346-353 (2002).
14. M. Raberto, S. Cincotti, S. Focardi, M. Marchesi, “Traders' Long-Run Wealth in an Artificial Financial
Market”, Computational Economics, vol. 22, n. 2-3, pp. 255-272, Kluwer Academic Press, Dordrecht, The
Netherlands, October-December 2003
15. S. Cincotti, S. Focardi, M. Marchesi, M. Raberto, “Who Wins? Study of Long-Run Trader Survival in an
Artificial Stock Market”, Phisyca A: Statistical Mechanics and its Applications, vol. 324, n. 1-2, pp. 227-
233, June 2003.
16. R. Cont, J.-P. Bouchaud, Herd behavior and aggregate fluctuations in financial markets, Macroecon Dyn 4
(2000) pp. 170-196.
17. D. Chowdhury, D. Stauffer, A Generalized Spin Model of Financial Markets, Eur Phys J B 8 (1999) pp.
477-482.
18. W. Hardle, A. Kirman, Nonclassical demand - A model-free examination of price-quantity relations in the
Marseilles fish market, J. Econometrics, 67 (1995) pp. 227-257.
19. M. Levy, H. Levy, S. Solomon, Microscopic Simulation of the Stock Market: the effect of microscopic
diversity, J. Phys. I France 5 (1995) pp. 1087-1107.
20. T. Lux, M. Marchesi, "Scaling and criticality in a stochastic multi-agent model of financial market", Nature
397, 498-500, 1999.
21. D. Stauffer, D. Sornette, Self-Organized Percolation Model for Stock Market Fluctuations, Physica A 271
(1999) pp. 496-506.
22. M. Youssefmir, B. Huberman, Clustered volatility in multi-agent dynamics, J Econ Behav Organ, 32 (1997)
101-118.
23. S. Focardi, S. Cincotti, M. Marchesi, “Self-organized Criticality and Market Crashes”, Journal of Economic
Behavior and Organization, vol. 49, n. 2, pp. 241-267, October 2002
24. Bannerjee, A, A simple model of herd behavior. Quarterly Journal of Economics 107 (1992) 797-818.
25. Bannerjee, A, Bikhchandani, S.D., The economics of rumours. Review of Economic Studies 60 (1993)
309-327.
26. G. Iori A microsimulation of traders activity in the stock market: the role of heterogeneity, agents'
interactions and trade frictions. , Journal of Economic Behaviour and Organization, Vol. 49, no. 1, 269-285,
(2002).

8
(a) (b)

Figure 1. Time behavior of the artificial stock market under closed market condition: (a) price process; (b) returns.

9
(a) (b)

Figure 2. Properties of returns under closed market condition. (a) Probability distribution of returns: dots represent distribution returns, the solid
line represents the corresponding normal distribution (b) Autocorrelation of returns. Noise levels are computed as ±3 where M is the length
M
of the time series (M =10; 000).

10
Figure 3. The wealth distribution of the agents under closed market condition.

11
(a) (b)

Figure 4. Time behavior of the artificial stock market under inflation market condition. (a) price process; (b) returns.

12
(a) (b)

Figure 5. Properties of returns under inflation market condition. (a) Probability distribution of returns: dots represent distribution returns, the
solid line represents the corresponding normal distribution (b) Autocorrelation of returns.

13
Figure 6. The wealth distribution of the agents under inflation market condition.

14

Vous aimerez peut-être aussi