Sunteți pe pagina 1din 11

PHYSICAD

EL!!EVlER Physica D 7.5 (1994) 264-274

Artificial economic life: a simple model of a stockmarket


R.G. Palmer ate,W. Brian Arthur b,e,John H. Holland c,e,Blake LeBaron dye,
Paul Tayler f
a Department of Physics, Duke University, Durham, NC 27708-0305, USA
b Food Research Institute, Stanford University, Stanford, CA 94305-6084, USA
c Division of Computer Science & Engineering, University of Michigan, Ann Arbor, MI 48103, USA
d Department of Economics, University of Wisconsin, Madison, WI 53706, USA
e Santa Fe Institute, 1660 Old Pecos Trail, Suite A, Santa Fe, NM 87.501, USA
i Coopers & Lybrand Deloitte MCS, Hillgate House, 26 Old Bailey, London EC4M 7PL. UK

Abstract
We describe a model of a stockmarket in which independent adaptive agents can buy and sell stock on a
central market. The overall market behavior, such as the stock price time series, is an emergent property of the
agents’ behavior. This approach to modelling a market is contrasted with conventional rational expectations
approaches. Our model does not necessarily converge to an equilibrium, and can show bubbles, crashes, and
continued high trading volume.

1. Approaches to economic theory We emphasize the background and general


structure of our model, only indicating results
In recent years the prevailing rational expecta- in general terms. Related papers [ 1,2] provide
tions approach to economic theory has been chal- further details. The paper is written for physical
lenged from several quarters, and increasing in- scientists, without assuming any background in
terest has been shown in an alternative evolution- economics.
ary economics viewpoint. In this paper we de-
scribe and contrast these paradigms, and discuss 1.1. Rational expectations theory
our artificial stockmarket model as an example
of the evolutionary approach. Our approach is In conventional economic theory the standard
fundamentally based on the inductive theory of approach to most problems is fundamentally
learning described in Arthur ( 1992 ) [ 11. This based on Rational Expectations (RE) theory.
stockmarket model may also be seen as a case- According to RE theory, agents deduce their
study in artificial life; from a random soup of optimum behavior by logical processes from the
simple rules an intelligent system spontaneously circumstances of any situation, assuming that
organizes, and develops more and more sophis- other agents do likewise. Here an agent might be
ticated behavior as time goes on, rather like life an individual, a firm, a state, etc. This seemingly
emerging from a prebiotic soup. reasonable approach in fact involves several

0167-2789/94/$07.00 @ 1994 Elsevier Science B.V. All rights reserved


SSDIO167-2789(94)00078-S
R.G. Palmer et al. I Physica D 75 (1994) 264-274 265

strong (and unreasonable) assumptions, and of the above assumptions, and partly because of
has a number of undesired consequences. Nev- other factors not included in our simple model.
ertheless it has long been the regnant paradigm, However it still serves to illustrate both the as-
perhaps in part because it leads to very appeal- sumptions and the flavor of an RE argument,
ing mathematics. although in most applications the mathematical
Among the assumptions normally made in RE optimization problem is far more complicated.
theory are: In complex problems, RE theory runs into a
(i) Complete Information. All agents are as- number of difficulties, especially because the
sumed to have full knowledge of the prob- three assumptions listed above are typically not
lem. satisfied.
(ii) Perfect Rationality. All agents are assumed (i) Lack of Complete Information. Agents may
to be perfectly able to deduce their opti- have to learn about the context or about
mum behavior, no matter how complex the the other agents while the “game” is being
computational problem. played out. Problem contexts may them-
(iii) Common Expectations. All agents are as- selves not be fully defined initially, only be-
sumed to know that all others are work- coming explicit through the choices of the
ing with the same information on the same agents.
“perfectly rational” basis. And they know (ii) Lack of Perfect Rationality. Real persons
that the others know this too, and that the and firms often aren’t clever enough - or
others know that they know they know, and don’t have enough computational power -
so on ad infinitum. to compute a true optimum. And even if
As a simple example, imagine 20 computer they have the power, they may not use it,
companies who are independently considering preferring instead rules of thumb that have
the adoption of a new standard 2 for a graph- worked elsewhere.
ical user interface. A marketing analysis might (iii) Lack of Common Expectations. Different
show that all would benefit if at least 15 adopted agents may well have different information
Z, but that the adopters would experience a net about a situation, and may well use differ-
loss if fewer than 15 adopted it. RE theory pre- ent approaches. They cannot rely on others
dicts that all companies will adopt Z immedi- to duplicate their own reasoning.
ately, because they will all reason as follows. If I These difficulties lead in turn to predictions
were the 15th-20th company to consider adop- that do not always fit observed outcomes. And
tion, it would obviously be in my interest to do even when final outcomes are correctly predicted
so. If I were the 14th, I would adopt because then by RE theory, the theory is silent about the dy-
it would be advantageous for the 15th-20th to namical process (typically involving trial and er-
do so. If I were the 13th, I would do so because ror, and learning) that agents actually take to
then the 14th would do so, by the preceding ar- reach that solution.
gument. As so on, all the way down to the first
adopter. Since all will perform this reasoning, all 1.2. Evolutionary economics
will be ready to be first, and all will jump in im-
mediately (and will expect the others to do so In part because of the difficulties with the stan-
too). Note that the agents figure out the solution dard RE theory, in recent years many researchers
initially (“at time O”), and that there is no sub- have investigated alternative approaches. Some
sequent dynamics, learning, or evolution. have attempted to perturb away from the perfect
Of course this outcome is not what would be rationality ideal with a variety of bounded ratio-
expected in practice, partly because of the failure nality theories. These theories impose an inten-
266 R.G. Palmer et al. I Physica D 75 (1994) Z-274

tional limitation on some aspect of an agent’s lar evolutionary models. A narrowing of options
task, such as the available knowledge, the com- and more rigorous results can be expected in the
putational time or complexity, the memory ca- future.
pacity, the forecasting repertoire, etc. One diffi-
culty is that there are many dimensions in which
to bound rationality, and no clear guiding prin- 2. An artificial stockmarket
ciple for how to set the direction and distance
from the zenith of perfect rationality. 2.1. General framework
Another approach, into which the current
work falls, is to start from the opposite end of Turning specifically to financial markets, we
the scale with agents who initially have little first construct the framework of a simple kind
rationality or specialized knowledge. The agents of stockmarket, and then consider different ap-
are then allowed to adapt, or learn, or evolve, proaches (RE and evolutionary) to the agents’
eventually becoming reasonably expert in their decision problem. Our market will have S kinds
own domains. There are a number of advantages of stocks labelled by Q = 1, 2, . . ., S, and N
to this approach, including agents labelled by i = 1, 2, . . ., N. The agents
- None of the three assumptions discussed are not necessarily homogeneous; they may have
above for RE theory is required. quite different operating principles. For simplic-
- Even the modeler does not need to have the ity we make time t discrete, so t = 0, 1, 2, . . .,
knowledge or computational power to derive and refer to the interval from t - 1 to t as the tth
an optimum solution for each agent. period. There is no predelined time horizon; in
- The evolutionary approach is generally induc- principle the market continues for ever.
tive, not deductive; the agents typically gen- At each time t, each agent i has some num-
eralize patterns observed in the past to guide ber of shares (or holding) hq (t ) of each stock CL
their behavior in the future. This inductive ap- There are no complex instruments such as op-
proach is much closer to normal human be- tions, and no direct interaction between pairs of
havior than the deductive one of deriving par- agents. The agent’s essential problem is to choose
ticular choices from general principles [ 1,8 1. hy (t) at each time t, given various constraints
- The general approach is applicable even in such as a finite net wealth. The goal might be
situations where conventional RE theory pro- to maximize expected (mean) profit, or might
duces no answers, e.g., due to lack of a single involve a more complicated “utility function”
well-defined equilibrium solution. which takes risk into account. The price pa (t)
- The approach can predict and interpret dy- per share of each stock depends mainly on the
namical behavior, not just final outcomes. overall buying and selling behavior of the agents.
- Agents can continue to adapt in a changing or The companies issuing the stocks may also pay
ill-defined world (perhaps of their own mak- cash dividends d” (t) per share to each stock-
ing) whose characteristics cannot - or are not holder, in an amount depending on company
- known in advance. success and policies. Agents can thus make profit
The biggest disadvantages of the evolutionary in two ways, through the dividend stream and
approach are the general lack of analytic meth- through speculation, relying on price changes of
ods - most work is largely computational - and their shares.
the plethora of possible algorithms for learning In addition to stock holdings we need to take
and adaptation. The field is presently in an ex- into account other assets of each agent, so that
ploratory phase, determining by explicit simu- not all wealth needs to be invested in stock. For
lation the potentials and limitations of particu- simplicity we regard all other assets collectively
R.G. Palmer et al. I Physica D 75 (1994) 264-274 267

as cash, or money A4i(t ) . An agent’s total wealth x/q(t) = H” Vt.


wi (t) at any time t is thus given by

wi(t) = Mi(t) + Chy(t)pa(t). (1) There are a number of ways to implement mar-
a ket clearing conditions, but here we only describe
During the tth period, the price per share of stock the simplest in detail. For each stock, each agent
cr changes from pa (t - 1) to pa (t ) and a div- can submit either a bid to buy by (t ) shares, or
idend d”(t) is declared. We also assume that an offer to sell 05 (t ) shares - in both cases at
the agent’s cash is invested in a fixed-rate fund the current price pa (t ) - or neither. We define
such as a savings account, which pays an inter- b; (t ) = 0 and/or 0; (t ) = 0 for the remaining
est rate r per period so that Mi (t - 1) becomes cases. Bids and offers need not be integers; the
( 1 + r )Mi (t - 1). Accounting for these changes,
stock is infinitely divisible. Then
the agent’s wealth at the end of a period is given
by Ba(t) = cby(t),
i=l
Wi(t) = (1 + r)Mi(t - 1)

+ ~h:(t- O[p”(t) + d*(t)], (2) w(t) = $op(t) (6)


a I=1
which is a net change of are the totals of the bids and offers for stock (Y
at time t. If B” (t) = 0” (t), then all bids and all
Awi(t) c w,(t) -wi(t - 1) = rMi(t - 1)
offers are fully satisfied, giving
+ xhp(t - U[p”tt) + d”(t) -p”(t - I)]
a h?(t) = h:(t - 1) + b;(t) -o?(t) (7)
(3)
(where either bq (t ) or og (t ) is zero for each
from the beginning of that period.
a). If, however, B”(t) > 001(t), then all offers
Before the next period begins the agents have
are fully satisfied, and a fraction o* ( t )/B* ( t ) of
an opportunity to change their holdings, choos-
each bid is filled, giving
ing hp (t) and Mi (t) subject to the constraints:
(i) Fixed total wealth: Eq. (1) must apply at
every t. Given the new wealth Wi (t ) from
h:(t) = h:(t - 1) + sb:‘(t) -o;(t). (8)
Eq. (2), this budget constraint is just a lin-
ear condition on Mi (t) and the hp (t )‘s. Similarly if B” (t ) < 0” ( t ) , then all bids are fully
(ii) Positivity: Mi (t) 2 0, and h?(t) 2 0 for all satisfied, and a fraction B” ( t ) /o(l ( t ) of each of-
cy.Actually these constraints can be relaxed fer is filled, giving
to allow borrowing (possibly with a larger B”(t)
value of r when Mi (t ) is negative) or sell- h?(t) = hp(t - 1) + b;(t) - O,Ct)op(t). (9)
ing short (negative holdings), but we still
need lower bounds on A4i( t ) and hy ( t ) for All these cases can be subsumed into
stability. va(t)
(iii) Market clearing conditions: Individual h;(t) = hq(t- 1) + -Ba(t)b?(t)
agents may not be able to achieve the stock
VO(t)
-- ,(,)“?(t)>
holdings they desire, because for every (10)
seller there must be a buyer, and vice-
versa; the total number of shares of each where P(t) c min(B”(t),O*(t)) is the num-
stock is fixed: ber of trades (or volume) in stock a.
268 R.G. Palmer et al. I Physica Ll 7S (1994) 264-274

This rationing scheme is far from satisfactory parameters such that ai + bi = 1. It is easy to
in general, both because of lack of realism, and show that log d” (t ) /da has mean 0, variance r~,‘,
because it can lead to violations of the positivity and an exponentially decaying autocorrelation
constraints. For example, an agent could plan to function with correlation time r, = l/ log a,.
sell a large amount of stock A to raise the funds The prices p” (t ) must depend on the bids and
to buy B, but end up with M, (t) < 0 because offers of the agents. The price of a stock should
the sale of A was rationed while the purchase of rise if the demand for it exceeds the supply
B was not. A better scheme is to relax the con- (more agents wanting to buy than to sell), and
straint (4), allowing temporary imbalances be- fall if the supply exceeds the demand. Choice
tween stock purchases and sales to be made up by of a detailed mechanism is interrelated to the
changes in the stock inventory of a market spe- way bids and offers are matched; an iterative
cialist. The specialist - an actual person in many auction process, for example, would inherently
real markets - has to control the price so that his determine prices itself. For the rationing scheme
or her inventory stays within acceptable bounds. chosen here we use a very simple price adjust-
Another more elaborate possibility is to have the ment scheme, based solely on the excess demand
agents engage in an iterative auction-like process P(t) -On(t):
to buy or sell stock, adjusting the price until sup-
ply 0” (t ) and demand B” (t ) are equal. We will
report on these and other options elsewhere [ 21; p’“(t + 1) = p”(t). (1 + q[B”(t) - O”(t)l).
here we use only the simple rationing scheme,
(12)
and will ultimately avoid the positivity problem
by limiting ourselves to a single stock. The parameter q is a crucial determinant of the
To complete our specification of the market, ultimate behavior; small q leads to very slow ad-
we need to detail how the dividends d” (t ) and justment of prices, while large q gives large os-
prices pa(t) are fixed. For the dividends we cillations. In most cases we have instituted an
choose a purely stochastic process, entirely in- adaptive mechanism for q itself, based on feed-
dependent of the agents’ actions. In a sense the back from the number of recent reversals in di-
dividend stream is a noise source, somewhat like rection of the price trend, and aiming to keep
a physical temperature, that drives the market. the response near to critical damping. But here
We have explored a number of different random we will keep q fixed, and small enough so that
processes for d” (t) including: simple random q[B”(t) - Oa(t)] < 1.
number generators without any t + t + 1 corre- This completes our specification of the mar-
lation; regular ramps and square waves (to see if ket itself. All that is undetermined is the way in
our agents can learn simple periodicities); and which individual agents choose their bids by ( t )
various Markov processes in which d* (1) de- or offers op (t), based on the information avail-
pends on d* ( t - 1). The simplest case having any able to them. We assume that that information
claim to realism is a discrete colored noise pro- consists of the entire past history of the market,
cess (or, equivalently, an Ornstein-Uhlenbeck including prices p” (t’ ) and dividends d* (t’ ) for
process, or an AR ( 1) process) for the logarithm t’ <_ t, and total bids B* (t’ ) and offers O* (t’ )
of d”(t)/P (where da simply sets the scale): for t’ < t. We also sometimes introduce a purely
random sunspot variable y (t ). Although I,Y(t ) is
d”(t) = a logd”(t- l) + bar”(t).
log -&- (11) not causally connected to the market, the prices
d-u
(I

can nevertheless become correlated with ly (t ) if


Here <* (t ) is a Gaussian noise source with mean agents “believe” that it has predictive power and
0 and variance c$, and a, and b, are positive coordinate their actions around its fluctuations.
R.G. Palmer et al. I Physica D 7.5 (1994) 264-274 269

2.2. Rational expectations approach ored noise process such as Eq. ( 11) does not sat-
isfy this constant expected value assumption,
A simple (“risk free”) RE approach to the More sophisticated RE approaches are possi-
market just described would be based on a be- ble. In particular we could allow for risk aver-
havioral equation of the form [ 1,111 sion in the agents. Typically this would lower
the price pa(t) from that given by Eq. ( 13) or
p”(t) = PE[f(t + 1) + d”(t + l)lZ(t)l, (13) Eq. ( 15) by an amount proportional to the vari-
ance of the prediction for p” (t + 1) + d” (t + 1);
where p = l/(1 + r), and E[.lZ(t)] means an
riskier returns are worth less. But the essential
expected value (prediction) given all the infor-
flavor of the approach is not changed by such
mation Z(t) available at the current time t. We
improvements.
assume the efjcient market hypothesis that the
The RE approach implicitly assumes that all
price reflects (i.e., values appropriately) all ac-
agents compute the same expectation values
cessible information about the future. Eq. (13)
E[p”(t + 1) + d”(t + l)lZ(t)] for each stock;
says that the current price p” (t) per share of
otherwise the arbitrage argument fails. This
stock a: should reflect the best estimate of its
assumes not only that they all have the same
valuep”(t+ 1) +d”(t+ 1) attheendofthepe-
information Z(t), but also that they form ex-
riod, discounted by the factor /3 to allow for the
pectations in the same way, and indeed know
increase in the value of money implied by the
that others will do so too. In practice these as-
interest rate r. The reasoning behind Eq. ( 13) is
sumptions will fail; no two agents are likely to
that any other value for p” (t ) would represent
have exactly the same information, and agree
an opportunity to make a profit, which rational
that there is a unique objective way to compute
agents would take (if they care nothing about
the required expectation value, and know what
risk). If, for example, the actual price of a stock
that unique method is. Moreover, individual
were lower than given by Eq. ( 13), then many
agents cannot form their expectations in a fully
agents would attempt to invest in it, thus driving
rational way unless they know how others form
the price up until Eq. ( 13) was satisfied. This is
theirs, so all are reduced to subjective beliefs
called arbitrage.
about each other’s behavior. In Keynes’ words
If we iterate Eq. ( 13), using the law of it-
[ 91, they must “devote [their] intelligences to
erated expectations E[E[xlZ(t + l)]lZ(t)] =
anticipating what average opinion expects the
E[xlZ(t)], we obtain
average opinion to be.”
These fundamental difficulties of the RE ap-
p”(t) = f+[d”(t + n)lZ(t)], (14) proach lead in turn to predictions that do not
PI=1 correspond to the empirical behavior of real
so that the price today should just depend markets [4]. In particular the RE theory pre-
on an appropriately discounted series of ex- dicts low trading volume; there is no reason for
pected future dividends. If the dividend se- agent A to sell shares to agent B if they both
ries had a constant expected value, so that have the same information and expectations.
E[d”(t + n)lZ(t)] = da Vn, this would reduce Further, there is no room for market bubbles
to or crashes, or any sort of market psychology
or moods. Finally, it should not be possible to
p*(t) = @jr, (15) make any profit by technical trading - attempt-
ing to predict future stock prices by recognizing
which gives the fundamental value of stock Q in and exploiting patterns in past prices - since
this approximation. Note, however, that a col- any such opportunities should be removed by
270 R.G. Palmer et al. I Physica D 7S (1994) 264-274

arbitrage; this is a direct consequence of the own successes and failures, learning to modify
efficient market hypothesis. or abandon unsuccessful mental models, and to
In real markets there is much higher trading rely more strongly on successful ones.
volume than RE predicts, there are bubbles, Our present approach is computational. We
crashes, and moods, and many traders seem define a framework for the agents’ behavior in
to live by technical trading. These and other which learning and adaptation is possible, and
anomalies can be reconciled with the RE ap- then we run simulations of a whole market to
proach only by extending or modifying it, for see how both the agents and the market behave.
instance by introducing heterogeneous expec- Some analysis and interpretation is certainly
tations [ 61, or by allowing Bayesian learning possible, but no detailed analytic theory is yet
of parameters [ 3 1. However none of these ap- to hand. There are some rigorous results for
proaches is entirely satisfactory, and none pro- simpler systems of adaptive economic agents
vides a truly dynamical picture of the market. [ 10,121, and of course there is much work on
learning systems in general, but none of this
2.3. Evolutionary approach is directly applicable to entire markets. Thus
an exploratory computational approach seems
Instead of the RE approach, we propose an in- appropriate.
ductive model in which we start with agents who
have little knowledge or reasoning ability. The 2.4. Condition-action agents
agents trade on the basis of internal models or
rules that are initially very poor. By observing To implement an inductive approach we must
the success or failure of these internal models the specify in detail how agents choose their bids
agents can improve them, select among alterna- or offers. We have been experimenting with a
tives, and even generate totally new rules. Thus number of approaches, including agents who ex-
over time their behavior becomes more sophis- plicitly forecast the future and perform a risk-
ticated, and they become able to recognize and aversion computation to choose their optimum
exploit many patterns in the market. The stock holdings [ 21. But here we describe only a sim-
prices p” (t ) themselves reflect the aggregate be- pler class of agents, based on a classifier system
havior of the agents; phenomena like bubbles, and a genetic algorithm [ 5,7].
crashes, and market moods can emerge as collec- Before proceeding, we specialize to a single
tive phenomena. Because they both create and stock, and drop the Q superscripts. Most phe-
exploit the prices series, the agents are essentially nomena of interest are already present with a
coevolving, even though they do not interact di- single stock, and the restriction removes the dif-
rectly with one another. ficulty with the positivity condition. We now re-
The inductive approach provides a dynamical duce the bid/offer decision to a simple ternary
picture of a market and avoids most of the pre- choice:
viously discussed problems of RE theory. It is (i) Bid to buy one share: hi(t) = 1, oi(t) = 0.
also inherently closer to the way humans typi- (ii)Offertoselloneshare:oi(t) = l,bi(t) = 0.
cally make decisions in complex situations [ 8 1. (iii) Neither: hi(t) = oi(t) = 0.
They start by making mental models or hypothe- Provided one period (from t to t + 1) repre-
ses, based on past experience and training. These sents a short interval in terms of the dividend
models may directly imply a course of action, or autocorrelation time T and the price adjustment
they may let them anticipate the outcome of var- timescale (set by q ), the restriction of demand to
ious possible actions, on which basis a choice can & 1 is not serious; larger changes can be achieved
be made. In any case, humans also observe their by a sequence of smaller ones.
R.G. Palmer et al. I Physica D 75 (1994) 264-274 211

In the spirit of a classifier system, each agent the rule is poor it will sink to negative strength
has many condition-action rules. We typically use and never be selected. If it is good it will gain
R = 60 rules per agent, labelling rules by k = strength and may come to be used as a basis for
1, 2, . . .) R. Each agent i has its own set of rules, a decision. For example, there could well be two
independent of all other agents, so there are NR rules with identical conditions but opposite ac-
rules in all, labelled by ( i, k ) . Each of these rules tions, but only one would come to have positive
has three components: strength.
(i) A condition part, that governs when (un- The condition part of each rule consists of a
der what market conditions) the rule is ac- string of symbols such as ***l*O***ll**, drawn
tivated. We discuss this further in a mo- from the ternary alphabet {0, 1, *}. These strings
ment. are matched against a single binary string (with
(ii) An action aik = f 1, representing either 0 and 1 symbols only) that represents the current
buy ( + 1, bid one share) or sell (- 1, offer state of the market. O'sand l'sin the condition
one share). string only match O'Sand I’s respectively in the
(iii) A strength Sik (t), representing how suc- market string, whereas *‘s are don’t care symbols
cessful the rule has been at suggesting that match either o or 1. Thus, for example, the
wealth-increasing actions in the past. above condition string matches a market state of
Each time that the agent has to make a deci- 0101001101101but not 1001011100101.
sion it first lists those of its rules that are acti- The number and meaning of the bits in the
vated and have Sik (t) > 0. Next it selects one market state string can be adjusted to give the
of these randomly, with probability proportional agents more or less information. We typically
to strength. The action of this selected rule then use strings of length 70-80 symbols, providing
gives the agent’s decision: buy or sell. If the list a mixture of short-term and long-term informa-
is empty, then the agent makes neither a bid nor tion, such as:
an offer. - The price is above 1.2 times fundamental
The strengths of all activated rules (not just value (as given by Eq. 15 ) .
selected ones) are updated at the end of the pe- - The dividend went up two periods ago.
riod according to: - The loo-period moving average of price went
up (compared to the previous 100 periods).
Sik(t) = (1 -c)Sik(t- 1) + - The 20-period moving average of price is
caikb(t) - (1 + r)p(t- 1) + d(t)]. (16) above the loo-period moving average.
In each case the appropriate bit is 1 if the cor-
The term in square brackets represents the net responding statement is true, o if it is false.
profit made by investing in one share of stock for The structure described so far is a simple
the past period, rather than leaving the money in classifier system; the rules classify the states
the bank; compare Eq. (3). c is a small param- of the environment (market state) into many
eter (e.g., 0.01) so that Sjk (t) accumulates over categories, depending on which are activated,
a long period an exponentially-weighted moving and then provide probabilities for each possible
average of the net profit potential of the rule’s action to be taken in each category. By itself it
action under circumstances in which it is acti- simply assigns strengths to a pre-defined set of
vated. To avoid occasional problems we restrict rules. But this is easily extended by adding a
strengths to Smin 5 Sjk (t) 5 Smax. genetic algorithm which generates new rules, so
Note that any rule can be injected into the that the population of rules can evolve towards
population (with initial strength 0, say) with- ever better ones. Our genetic algorithm is ap-
out negatively affecting the agent’s behavior. If plied at random times (in a Poisson process) to
272 R.G. Palmer et al. I Physica D 7S (1994) 264-274

each agent, and has the effect of replacing lo- would be expected from RE theory and
20% of its rules by new ones. It selects some of the efficient market hypothesis.
the weakest rules for replacement, and initially (ii) On the other hand, in a richer environ-
makes copies (clones) of some of the strongest ment, there is no evidence of equilibrium.
rules to replace them, selecting candidates with Instead we obtain what we call economic
probability proportional to their strength. The life; as described in the following observa-
clones may then be modified by random mu- tions, there is rich evolving behavior that
tation and crossover. Mutation means that a becomes more complex over time.
few symbols are randomly changed, with prob- (iii) Although the price frequently stays close to
abilities adjusted so that the average number fundamental value, it also displays major
of don’t care symbols stays constant. Crossover upward and downward deviations which
means that a pair of “parent” strings is selected may be called bubbles and crashes. Of-
(from among the clones) and used to generate ten these have no simple explanation; the
two “offspring” strings, each of which gets its effect is collective, and cannot always be
symbols partly from one parent and partly from traced to a simple rule or instability. It is
the other; the idea is to combine good building reasonable to think of them as correspond-
blocks (substrings) present in the two parents ing to moods of the market. But one mech-
151. anism is clear; a set of condition-action
We also apply two further operations to the rules can be collectively self-fulfilling and
whole new population. Firstly, rules that are par- hence give positive feedback that amplifies
ticularly weak (negative strength) have their ac- any small fluctuatation from equilibrium.
tions reversed; if buying was bad, then selling For example, a trend-following rule that
should be good. Secondly, rules that have not simply suggests buying stock when the
been activated in a long time are generalized, price is rising will, once triggered, create
changing some of their specific O/I symbols to demand that drives the price up further.
*‘s. (iv) The agents become quite heterogeneous,
using very different rules.
(v) Trading volume varies greatly, and is
3. Results and conclusions sometimes quite high. This reflects the het-
erogeneity of the agents - a set of identical
As stated initially, this paper describes mainly agents would never want to buy from one
our rationale and overall design. Quantitative another. There tend to be long periods of
results will be presented elsewhere [ 21. Qualita- relative calm, interspersed with episodes
tively our main observations are as follows. of high-volume activity. These episodes do
(i) In sufficiently simple cases - with few not always coincide with the bubbles and
agents, or few rules per agent, or a low- crashes.
variance dividend stream - the agents (vi) Over time, the complexity of the agents in-
converge to an equilibrium in which price creases steadily, even though the market-
tracks fundamental value (Eq. 15), vol- level phenomena appear relatively station-
ume stays low, and there are no apprecia- ary. One measure of agent complexity is
ble anomalies such as bubbles or crashes. the average number of non-* symbols in
The agents become relatively homoge- their rules. A steady increase in this mea-
neous, relying mainly on simple rules such sure is fairly common in classifier systems,
as buy when the price is below fundamental and might just reflect a random increase
value. The overall behavior is just what in the use of redundant bits, or the details
R.G. Palmer et al. I Physica D 75 (1994) 266274 273

of the genetic algorithm. But more likely it tailed statistics, to be discussed elsewhere [ 21)
reflects the discovery of addenda and ex- of real markets, including dynamical and non-
ceptions to gross responses uncovered early equilibrium phenomena. It does not require -
on, leading to a default hierarchy of rules and indeed rejects - the restrictive assumptions
[81. of rational expectations theory. Its relative dis-
(vii) If a trained agent is extracted from the mar- advantage is that it is largely a computational
ket and then reinserted much later, it tends model, without immediate prospects for rigor-
to do rather poorly. The rules needed for ous mathematical results, whereas rational ex-
success change in time -there is no station- pectations theory leads to rich mathematical for-
ary optimum strategy. malism.
(viii) The ecology of agents can adapt to new sit- We see our stockmarket model, and others of
uations such as a changed dividend stream. its class, as a fertile testbed for exploring mar-
They never get locked into a particular ap- kets, adaptive agents, and a class (distinguished
proach, but automatically choose a balance especially by the lack of direct agent-agent in-
between exploration of new rules and ex- teractions) of artificial life. For example, we
ploitation of old successful ones. can explore the effect of changing the market
(ix) An initially uniform wealth distribution mechanism, for instance by adding a special-
evolves into a wide distribution, with ist with inventory, or by imposing transaction
some agents becoming much more wealthy costs or price controls, and see how the market
than others over long periods. This re- efficiency is affected. We can investigate what
flects agent heterogeneity and “luck”; the mechanisms would be effective for stopping or
chance discovery of good rules can make limiting bubbles and crashes. We can analyze
certain agents very rich for a while. How- various computerized trading schemes and eval-
ever over very long periods the identity of uate their effect on the stability of the market.
the winners and losers changes, although We can explore the difference between homo-
the statistical distribution remains approx- geneous and heterogeneous traders, and see the
imately constant. effect of adding naive “noise” traders who are
It is worth noting explicitly the artiJicia1 life not principally motivated by profit (and can
aspects of our model. We find the self-formation therefore be exploited by others).
of an autonomous economy that bootstraps it- We can also investigate many variations at
self up from randomized “stupid” behavior to the agent level, including different learning
organized mutually-adapted behavior. From a techniques and different goals (including risk
random soup of simple rules, an “intelligent” aversion). We can inquire into the effect of giv-
system spontaneously organizes. Thus we have ing certain agents inside information. We can
modelled the origins of economic life among in- try limiting the computational ability of some
teracting agents in the same sense that others agents. We can set up a framework in which
model the origin of biological life among organic agents can go bankrupt and be replaced by clones
molecules. What distinguishes this from stan- of better agents, so that the whole population of
dard equation-based equilibrium economics is agents evolves.
the ability of the agents to learn, and of the sys- Some of these projects are already under way;
tem to bootstrap itself to a high order of mutual others are on the distant horizon. We also expect
behavior, rather than merely to implement some to make public our software (which includes dy-
simple optimizing rule at an equilibrium. namical displays of market and agent behavior)
In all, our models of a stockmarket can re- within the next year, so that others can share in
produce the major features (as well as some de- the endeavor.
274 R.G. Palmer et al. I Physica D 75 (1994) 264-274

Acknowledgement
Pricing and market structure, Financial Markets,
Institutions and Instruments 1, No. 3 (1992).
This reasearch was supported in part by grants [5] David E. Goldberg, Genetic Algorithms in Search,
to the Santa Fe Institute, including core funding Optimization and Machine Learning (Addison-
from the John D. and Catherine T. MacArthur Wesley, Reading, MA, 1989).
161 S.J. Grossman, On the efficiency of competitive stock
Foundation, the National Science Foundation markets where traders have diverse information, J.
(PHY-87 149 18 ), The Alex Walker Educational Finance 31 (1976) 573-585.
and Charitable Foundation, and the U.S. De- [7] J.H. Holland, Adaptation in Natural and Artificial
Systems (MIT Press, Cambridge, MA, 1992).
partment of Energy (ER-FG05-88ER25054).
[ 81 J.H. Holland, K.J. Holyoak, R.E. Nisbett and P.R.
Thagard, Induction (MIT Press, Cambridge, MA,
1986).
References [9] J.M. Keynes, The General Theory of Employment,
Interest and Money (Macmillan, London, 1936 ).
t11 W. Brian Arthur, On learning and adaptation in the [lo] M. Lettau and H. Uhlig, How Well Do Artificially
economy, Sante Fe Institute Working Paper 92-07- Intelligent Agents Eat Cake?, Princeton University
038 (1992). manuscript ( 1993).
VI W. Brian Arthur, John H. Holland, Blake LeBaron, [ 1 l] R.E. Lucas, Asset prices in an exchange economy,
R.G. Palmer and Paul Tayler, An evolutionary model Econometrica 46 (1978) 1429-1445.
of a stockmarket (1994), in preparation. [ 121 R. Marimon, E. McGrattan and T.J. Sargent, Money
131L. Blume and D. Easley, Evolution and market as a medium of exchange in an economy with
behavior, J. Econ. Theory 58 (1992) 9-40. artificially intelligent agents, J. Econ. Dynamics &
[41M.E. Blume and J.J. Siegel, The theory of security Control 14 (1990) 329-373.

S-ar putea să vă placă și