of Stock Markets
Shu-Heng Chen
AI-ECON Research Group
Departmentof Economics
National Chengchi University
Taipei, Taiwan11623
TEL: 886-2-27386874
FAX: 886-2-29361913
E-mail: chchen@nccu.edu.tw
Chia-Hsuan Yeh
AI-ECON Research Group
Departmentof Economics
NationalChengchi University
Taipei, Taiwan11623
TEL: 886-2-29387308
FAX: 886-2-29390344
E-mail: g3258501@grad.cc.nccu.edu.tw
Abstract
Inthis paper, wepropose anew architectureto studyarticialstock markets. This architecture
restsonamechanism called\school" whichis aprocedure to mapthephenotypeto thegenotypeor,
inplainEnglish, to uncoverthe secretofsuccess. We proposeanagent-based model of \school", and
considerschoolasanevolvingpopulationdrivenbysingle-populationGP(SGP).Thearchitecturealso
takesintoconsiderationtraders' searchbehavior. Bysimulated annealing,traders'searchdensity can
be connectedto psychological factors, suchas peer pressure oreconomic factors suchasthe standard
of living. Thismarketarchitecturewas thenimplementedinastandardarticial stock market. Our
econometricstudyoftheresultantarticialtimeseriesevidencesthatthereturnseriesisindependently
and identicallydistributed(iid), andhencesupportsthe eÆcientmarkethypothesis(EMH).Whatis
interesting thoughisthat thisiid serieswasgenerated bytraders, whodonotbelieveintheEMHat
all. Infact, ourstudyindicates thatmany ofourtraders wereable tond usefulsignalsquite often
frombusinessschool,eventhoughthesesignalswereshort-lived.
KeyWords: Agent-BasedComputationalEconomics,SocialLearning,GeneticProgramming,
BusinessSchool, ArticialStock Markets, SimulatedAnnealing, Peer Pressure.
1 Background and Motivation
Overthepastfewyears,geneticalgorithms(GAs)aswellasgeneticprogramminghavegraduallybecome
amajor tool in agent-based computational economics (ABCE). According to Holland and Miller (1991),
there aretwostyles ofGAs orGPin ABCE, namely, single-population GAs/GP (SGA/SGP) and
multi-populationGAs(GP)(MGA/MGP). SGA/SGPrepresentseachagentasachromosome oratree,andthe
wholepopulationofchromosomesandtreesaretreatedasasocietyofmarketparticipantsorgameplayers.
TheevolutionofthissocietycanthenbeimplementedbyrunningcanonicalGAs/GP.Arifovic(1995,1996),
Miller (1996), Vila (1997), Arifovic, Bullardand Duy (1997), Bullard and Duy (1998a,1998b, 1999),
Staudinger (1998)are examples of SGA, while Andrews and Prager (1994), Chen and Yeh (1996, 1997,
1998),andChen,YehandDuy(1996)areexamplesofSGP.MGA/MGP,incontrast,representseachagent
asasociety of minds (Minsky, 1987). Therefore,GAs orGPis actually runinside each agent. Since, in
ThepapertobepresentedattheSpecialSessionon\EvolutionaryComputationinEconomicsandFinance",TheFifth
International Conference of the Society for Computational Economics (CEF'99), BostonCollege campus, Chestnut Hill,
Massachusetts,U.S.A.June24-26,1999. ResearchsupportfromNSCgrantsNo.88-2415-H-004-008andNo. 87-I-2911-15is
should not be mistaken as the applications of parallel and distributed GAs/GP, where communications
among\islands"doexist. Examplesof MGAcanbefoundin Palmeret al. (1994),Tayler(1995),Arthur
etal. (1997),Price(1997),Heymann, PearzzoandSchuschny(1998).
WhilethesetwostylesofGAs/GPmaynotbemuchdierentinengineeringapplications,theydoanswer
dierentlyforthefundamental issue: \wholearns what fromwhom? " (Herreiner, 1998). First,agentsin
theSGA/GParchitectureusuallylearnfromotheragents'experiences,whereasagentsin theMGA/MGP
architectureonlylearnfromtheirownexperience. Second,agents'interactionsintheSGA/SGP
architec-turearedirectandthroughimitation,whileagents'interactionsintheMGA/MGParchitectureareindirect
andaremainlythroughmeditation. ItisduetothisdierencethatSGA/SGPisalsocalledsociallearning
and MGA/MGP individual learning (Vriend, 1998). At thecurrentstate, the SGA/SGP architecture is
much morepopularthantheMGA/MGParchitecturein ABCE.
In addition to its easy implementation, the reasonfor the dominanceof SGA/SGP in ABCEis that
economistswouldliketosee theirgeneticoperators(reproduction, crossover,andmutation)implemented
withinaframeworkofsociallearningsothatthepopulationdynamicsdeliveredbythesegeneticoperators
canbe directly interpretedasmarket dynamics. In particular, someinterestingprocesses, such as
imita-tion,\followingtheherd",rumorsdissemination,canbemoreeectivelyencapsulatedintotheSGA/SGP
architecture.
However, it has been recently questioned by many economists whether SGA/SGP can represent a
sensiblelearningprocessatall. OneofthemaincriticismsisgivenbyHarrald(1998),whopointedoutthe
traditionaldistinctionbetweenthephenotypeandgenotypeinbiologyanddoubtedwhethertheadaptation
can be directly operated on the genotype via the phenotype in social processes. Back to Herreiner's
issue,ifweassumethatagentsonlyimitate others'actions (phenotype) withoutadopting theirstrategies
(genotype), then SGA/SGP may beimmune from Harrald'scriticism. However,imitating other agents'
actions area very minor partof agents' interactions. In many situations, such asnancial markets and
prisoners'dilemmagames,itwouldbehopelesstoevolveanyinterestingagentsiftheyareassumedtobe
abletolearnonlyto\buyandhold"or\cooperate anddefect". Moreimportantly,whatconcernsusishow
theylearn the strategies behindthese actions. But,unless wealsoassumethatstrategiesareobservable,it
would bediÆcult toexpectthat theyareimitable. Unfortunately, inreality,strategiesare ingeneralnot
observable. For instance, it is verydiÆcult to know theforecasting models used bytraders in nancial
markets. Tosomeextent,theyaresecrets. Whatisobservableis,instead,onlyasequenceoftradingactions.
Therefore,Harrald'scriticismisineect challengingallseriousapplicationsofSGA/SGPin ABCE.
AlthoughHarrald'scriticismiswell-acknowledged,wehaveseennosolutionproposedtotacklethisissue
yet. Atthisstage,the onlyalternativeoeredis MGA/MGP. Infact,itis interestingto notethat many
applicationswhichheavilyrelyonevolutionoperatedonthegenotype(strategies)tendtouseMGA/MGP.
Modeling nancial agents is acasein point. What is ironicis that this typeof application is in essence
dealingwithhumaninteractionand thusrequires an explicitmodeling ofimitation, speculationand herd
behavior. Asaresult,MGA/MGPisnotreallyasatisfactoryresponsetoHarrald'scriticism.
Inthispaper,weplanto proposeanewarchitectureand henceasolutiontoHarrald'scriticism. This
architecture rests ona missing mechanism, which wethink is akeyto Harrald'scriticism. Themissing
mechanismis whatwecall \school". Why\school"? ToanswerHarrald'scriticism,onemustresolvethe
issue\howcanunobservablestrategiesbeactuallyimitable"? Thepointishow. Therefore,bythequestion,
whatismissinginSGA/SGPisafunction toshowhow,andthatfunctioniswhat wecall\school". Here,
\school"istreatedasaprocedure,aproceduretomapthephenotypeto thegenotype,orinplainEnglish,
touncoverthesecretof success. This notionof\school" goeswellwithwhat schoolusually meansin our
mind. However,itcoversmore. Itcan bemassmedia, nationallibrary,information suppliers,andso on.
WarrenBuettmaynotbegenerousenoughtosharehissecretsofacquiringwealth,buttherearehundreds
ofbooksandconsultantsthatwouldbemorethanhappytodothisforus. Allthesekindsofactivitiesare
called\schooling". Therefore,ifwesupplementSGA/GPwithafunction\school",thenHarrald'scriticism
can,in principle,besolved.
Nevertheless, to add \school" to an evolving population is not that obvious. Based on our earlier
description,\school"isexpectedtobeacollectionofmostupdatedstudiesabouttheevolvingpopulation
anevolvingpopulationdrivenbysingle-populationGP(SGP).Inotherwords,\school"mainlyconsistsof
faculty members(agents) whoare competing with each other to survive (gettenureor researchgrants),
andhencethesurvival-of-the-ttestprincipleisemployedtodrivetheevolutionoffacultythewayitdrives
theevolutionofmarketparticipants.
Tosurvivewell,afacultymembermustdoherbesttoanswerwhatisthekeytosuccessinthe evolving
market. Ofcourse, asthe market evolves,theansweralso needstoberevisedand updated. Thevalidity
oftheanswerisdeterminedbyhowwellmarketparticipantsaccepttheanswer.
Once \school"isconstructedwiththeagent-basedmarket,theSGPused toevolvethemarketis now
alsorun in thecontext ofschool. The advantageofthis setup isthat, while theSGP used to evolvethe
market suers fromHarrald'scriticism, theSGP usedto evolve\school" doesnot. The reasonissimple.
Tobeasuccessfulmember,onemustpublish asmuchassheknowsandcannotkeepanything secret. In
this case, observabilityand imitability (replicatability) is notan assumption but arule. In other words,
there isno distinctionbetweenthe genotypeand phenotypein \school". Hence, Harrald'scriticismdoes
notapplyand SGPcanbe\safely"usedtoevolve\school".
Now,whathappenstotheoriginalSGPusedtoevolvethemarket? Thisbringsupthesecondadvantage
ofourapproach. Sincethefunctionofschoolistokeeptrackofstrategies(genotypes)ofmarketparticipants
andtocontinuouslygeneratenewandpromisingones,anyagentwhohaspressuretoimitateotheragents'
strategiesorto lookforeven betterstrategiescannowjust consult\school"and seewhether shehasany
goodlucktohavearewardingsearch. So,theoriginaloperationofSGPinthemarketcannowbereplaced
by SGP in \school" and a search procedure driven by the survival pressure of agents. Agents can still
haveinteraction onthephenotype in themarket, but theirinteraction onthegenotype isnowindirectly
operatedin\school".
An interestingaspect ofthis approach isto explicitlymodelthe interactionbetween \school" andthe
marketbyintroducingaco-evolutionmodel. Tosurvive,schoolmustadapt tomarket dynamics. Onthe
otherhand,marketdynamicsgeneratestudentsfor\school"who,inturn,bringtheknowledgelearnedfrom
\school" back to themarket,and that knowledge may havefurther impact on market dynamics. While
agent-basedmodelingisabottom-upapproach,onemayuseasystemoftwononlineardierenceequations,
governingthedynamicsof\school"andthemarket,asatop-down\summary".
The dierence between our proposed architecture and SGA/SGP and MGA/MGP is also illustrated
in Figures1to 3. Figure 1depictsthemarket architecturerepresentedbySGA/SGP. Thetopof Figure
1 is the market as a single object, and the bottom is a population of directly interacting heterogeneous
agents. Thedirectinteraction ischaracterizedbythesymbol\$"amongthem. Bythisarchitecture,the
information(knowledge)aboutthemarketisopenlydistributedamongallagents. Nothingiskeptsecret. In
betweenisasymbol\="(equivalentto),whichmeansthatmarketdynamicsisequivalenttotheevolution
ofthispopulationofdirectlyinteractingagents.
Figure2givesthemarketarchitecturerepresentedbymulti-populationGP.Themarketremainsatthe
top,but there are twoessentialdierences asopposed to the previousgure. First, thesinglesymbol=
is replaced by a series of ()s. Under these ()s is a population of indirectly interacting agents. By
\indirectly",wemean thatthese agentsareinteractingonlythroughabulletinboard. Imaginethat each
agentsitsin heroÆce andwatchestheworldfrom theweb. Theyhavenodirectcontactwith oneother,
physically, and in some sense, mentallyas well. The information (knowledge) about the market is now
privatelydistributedamongagents. Eachagenthasherownworldandkeepsherownsecrets.
Thepointhereisthatotheragents'mindsarenotdirectlyobservable,andhencenotimitable. Within
each agent'smind, there isasocietyofminds. Theevolutionofthis societyisdrivenbyGP.Within this
architecture,agentsbasicallylearnfromherownexperience,andnotfromotheragents'experiences. Thus,
itisatypicalmodel ofindividual learning.
Figure 3representsthearchitectureof ourproposed modication. Again,the market isplacedat the
top. Atthebottomto theright,itissomethingbetweenFigure1andFigure2. Inthephenotype, agents'
interactionisdirectandidenticaltowhatFigure1shows,whereasinthegenotype,itlookssomethinglike
Figure2,wherethere isnodirect interaction. Theoriginalconnectionbetweenmarketsandagentsisnow
replacedbytheconnectionbetweenagentsandschoolshownatthebottomtotheleft. Insideschool,there
Market
Figure 1 : The Market Architecture
Represented by Single-Population
GAs/GP (SGA/SGP)
Market
Figure 2 : The Market Architecture Represented by
Multi-Population GAs/GP (MGA/MGP)
Market
School
Figure 3 : The Market Architecture Represented by
Single-Population GAs/GP with "School"
Thekeyelementsof ourproposed architecture entitled\MS-GP" (standingfor GPimplementedwith
\School"intheMarket)aretheprocedures\school"andthesearch. Weshallconcretizetheseprocedures
withan application to the articial stock market. The articialstock market is anewbut growingeld.
Somewondersandmissionsofthisresearchareahavebeenwell-documentedbyLeBaron(1998). Inhis
ar-ticle,LeBarondistinguishestherecentmodelsofcomplexheterogeneityfromthoseofsimpleheterogeneity.
Theuseofheterogeneousagentsis certainlynotnewtonance,and thereisalonghistoryto
building heterogeneous agent rational expectations models. What is attempted in this set of
computationalframeworksistoattacktheproblemofverycomplexheterogeneitywhichleaves
the boundary of what canbe handled analytically. Traders are made upfrom a verydiverse
setoftypesandbehaviors. Tomakethesituationmorecomplexthepopulationofagenttypes,
or the individual behaviors themselves, are allowed to change overtime in response to past
performance. (p.1)
Oneofthemissionsoftheseagent-basedcomputationalmodelsistoreplicatetimeseriesfeaturesofreal
markets. Whileitwillcontinuetobepursued,thefocusofthisnewprojectwillbemuchmorefundamental.
Ascalibrationtechniquesadvance,wemayexpectthatsoonerorlateragent-basednancialmodelswillbe
sopowerfulthatreplicatingtimeseriesfeaturesofrealmarketswillnotbethatdaunting. Infact,LeBaron
himselfhasmadethefollowingobservation:
Validation remains acritical issue if articial nancial markets are going to prove successful
in helping explain thedynamics of real markets. This remainsa veryweakareafor theclass
of models describedhere. Furthercalibration techniques and tighter test will be necessary....
However, there are somekeyissues which aect these markets in particular. First, theyare
loadedwithparameterswhichmightbeutilizedtotanyfeaturethatisdesiredinactualdata....
(Ibid,pp. 19-20,Italicsadded)
Judgingfromtheresultsofrecentprogressesintheliteratureofarticialstockmarket,thatmomentwill
comeinacoupleofyears. Whenthatmomentdoescome,onemaystarttoquestionhowthesecalibration
techniques can be justied, which leads to the foundation of this research: can we regard GAs/GP as
asuitable model of learning behavior within society?. Theanswercanhardly bepositiveorconvincingif
Harrald'scriticismhasnotbeenwelltaken. Wethereforeconsiderthisphaseofresearchmorefundamental.
Bysaying that,this research tendsto modify GPin amanner such that it hasa closerconnection with
humanlearningand adaptation.
MS-GP brings back search behavior, a subject which was once intensively studied in economics but
hasbeenlargelyignored in theconventional GAs/GPeconomicliterature. As weshallsee later,through
\school"enablesustoinvestigatetheroleof\school"orthevalueof\education"intheevolutionofavery
specic socialprocess. Thestatisticsgeneratedfromsimulations,suchasthetimeseriesof thenumberof
\students" registered,thenumber of\students"whoreceivesfutile orfruitful lessons at\school" canall
helpusunderstandhow\school",orinformationindustryin general,coevolveswithsociety.
In Section 2, weshall present the analyticalmodel on which our articial market is constructed. In
Section3,aconcreteapplicationoftheinstitutionalGPtothearticialstockmarketisdetailed. Section4
providestheexperimentaldesign. Experimentresultsandeconometricanalysesofthese designsaregiven
inSection 5followedbyconcludingremarksin Section6.
2 The Analytical Model
Thebasic framework of thearticial stock market consideredin this paper is thestandardasset pricing
model (GrosssmanandStiglitz,1980). Themarketdynamics canbe describedasaninteraction ofmany
heterogeneousagents,eachof them, basedonherforecastofthefuture,havingthegoalto maximizeher
expected utility. Technically, there are two major components of this market, namely, traders and their
interactions.
2.0.1 Model ofTraders
Thetrader partincludestraders' objectives andtheiradaptation. Weshallstartfromtraders' motivesby
introducingtheirutilityfunctions. Forsimplicity,weassumethatalltraderssharethesameutilityfunction.
Morespecically,thisfunctionisassumedtobeaconstantabsoluteriskaversion(CARA)utilityfunction,
U(W i;t )= exp( W i;t ) (1) whereW i;t
isthewealthoftraderiat timeperiodt,andisthedegreeofrelativeriskaversion. Traders
canaccumulate theirwealth bymaking investments. There are twoassetsavailablefor tradersto invest.
Oneistherisklessinterest-bearingassetcalledmoney, andtheotheristheriskyassetknownasthestock.
Inotherwords,at eachpointintime,eachtraderhastwowaystokeepherwealth,i.e.,
W i;t =M i;t +P t h i;t (2) where M i;t and h i;t
denotes the money and shares of the stock held by trader i at time t. Given this
portfolio(M
i;t ,h
i;t
),atrader'stotalwealthW
i;t+1 isthus W i;t+1 =(1+r)M i;t +h i;t (P t+1 +D t+1 ) (3) whereP t
isthepriceofthestockattimeperiodtandD
t
isper-sharecashdividendspaidbythecompanies
issuingthe stocks. D
t
canfollowastochastic processnotknownto traders. Given thiswealth dynamics,
thegoalofeachtraderistomyopically maximizetheone-periodexpectedutilityfunction,
E i;t (U(W i;t+1 ))=E( exp( W t+1 )jI i;t ) (4) subjectto W i;t+1 =(1+r)M i;t +h i;t (P t+1 +D t+1 ); (5) whereE i;t
(:)istraderi'sconditional expectationsofW
t+1
givenherinformationupto t(the information
setI
i;t
),andristherisklessinterestrate.
It is well known that under CAR A utility and Gaussian distribution for forecasts, trader i's desire
demand,h
i;t+1
forholdingsharesofriskyassetislinearin theexpectedexcessreturn:
h i;t = E i;t (P t+1 +D t+1 ) (1+r)P t 2 i;t ; (6) where 2 i;t
istheconditionalvarianceof(P
t+1 +D t+1 )givenI i;t .
Oneof theessentialelementsof agent-basedarticial stockmarkets istheformation ofE
i;t
(:), which
Givenh
i;t
,themarketmechanismisdescribedasfollows. Letb
i;t
bethenumberof sharestraderiwould
liketo submit abid to buy at period t,and let o
i;t
be the number traderi would liketo oer to sell at
periodt. It isclearthat
b i;t = h i;t h i;t 1 ; h i;t h i;t 1 ; 0; otherwise: (7) and o i;t = h i;t 1 h i;t ; h i;t <h i;t 1 ; 0; otherwise: (8) Furthermore,let B t = N X i=1 b i;t ; (9) and O t = N X i=1 o i;t (10)
be the totals of the bids and oers for the stock at time t. Following Palmer et al (1994), we use the
followingsimplerationingscheme:
h i;t = 8 < : h i;t 1 +b i;t o i;t ; if B t =O t ; h i;t 1 + O t Bt b i;t o i;t ; if B t >O t ; h i;t 1 +b i;t B t Ot o i;t ; if B t <O t : (11)
Allthese casescanbesubsumedinto
h i;t =h i;t 1 + V t B t b i;t V t O t o i;t (12) whereV t min(B t ;O T
)isthevolumeoftradeinthestock. BasedonPalmeretal'srationingscheme,we
canhaveaverysimplepriceadjustmentscheme, basedsolelyontheexcessdemandB
t O t : P t+1 =P t (1+(B t O t )) (13)
where isafunction ofthedierencebetweenB
t andO
t
. canbeinterpretedasspeedofadjustmentof
prices. Oneofthe functions weconsideris:
(B t O t )= tanh( 1 (B t O t )) ifB t O t ; tanh( 2 (B t O t )) ifB t <O t (14)
wheretanhisthehyperbolic tangentfunction:
tanh(x) e x e x e x +e x (15) Since P t
cannot be negative, weallow the speed of adjustment to beasymmetric to excessdemand and
excesssupply.
The priceadjustment processintroduced aboveimplicitlyassumesthat thetotalnumberof shares of
thestockcirculatedin themarketisxed,i.e.,
H t = X i h i;t =H: (16)
Inaddition,weassumethatdividendsandinterestsareallpaidbycash,so
M t+1 = X i M i;t+1 =M t r+H t D t : (17)
Inthissection,weshalladdresstheformationoftraders'expectations,E i;t (P t+1 +D t+1 )and 2 i;t . Motivated
bythemartingale hypothesis innance,weshallassumethefollowingfunction formforE
i;t (:). E i;t (P t+1 +D t+1 )=(P t +D t )(1+ 1 tanh( 2 f i;t )) (18)
The virtueof this function form is that,if f
i;t
=0,then the traderactually validates themartingale
hypothesis. Therefore, from the cardinality of set fi j f
i;t
= 0g, denoted by k
t
, wecan know how well
the eÆcientmarkethypothesisisacceptedamong traders. Thepopulationoffunctions f
i;t
(i=1;:::;N)is
determined by the geneticprogrammingprocedure Business Schooland Search in Business School
giveninthefollowingtwosubsections.
As to the subjective risk equation, originally we followed Arthur et al. (1997) to use the following
updatingscheme. 2 i;t =(1 3 ) 2 i;t 1 + 3 [(P t +D t E i;t 1 (P t +D t )) 2 ]: (19)
Withoutfurther restrictions,thisupdate makesthesubjectivemeasureriskrangebetween0andinnity.
Since h i;t = E i;t (P t+1 +D t+1 ) (1+r)P t 2 i;t ; (20) itisclearthat h i;t = 0; if 2 i;t =1; 1; if 2 i;t =0: (21)
As a consequence, all traders will tend to \leave" the market (h
i;t
= 0;8i) due to incredible large
subjective risks. For example, in onepilotsimulationof ourearlierstudy, the subjectiverisksof traders
aredistributed around 240(Gen. 50),750(Gen. 100),1200 (Gen. 150) and3900 (Gen. 500). However,
thephenomenon characterizedby
h i;t !0; and 2 i;t !1 (22)
is not self-fullling, because the increasing sequence of 2
i;t
impliesa decreasing sequence of P
t . If P
t is
continuously decreasing, there is not much volatility and uncertainty, and traders have no reason to be
subjecttoincreasingsubjectiverisks. Therefore,Equation(17)isnotdirectlyapplicabletoourmodel,and
wehavemodieditintothefollowingform,
2 i;t =(1 3 ) 2 t 1jn1 + 3 [(P t +D t E i;t 1 (P t +D t )) 2 ]: (23) where 2 tjn1 = P n1 1 j=0 [P t j P tjn1 ] 2 n 1 1 (24) and P n1 t = P n 1 1 j=0 P t j n 1 (25) Inotherwords, 2 t 1jn1
issimplythehistorical volatilitybasedonthepastn
1
observations.
2.3 Business School and Single-Population GP
Themajorcomponentofarticialstockmarketsistheadaptivetraders,whocanberegardedasanevolving
population. SinceArifovic(1994),geneticalgorithmhasbeenemployedtodrivetheevolvingpopulationof
agentsin economics. ChenandYeh(1996)generalizedthis approachbyusing geneticprogramming. The
styleof GPused in Chenand Yeh(1996) isknown assingle-population GPin agent-based computational
economics,whichisdierentfrommulti-populationGP.Insingle-populationGP,eachtreecanberegarded
asa forecasting model used by an agent; hence, the adaptation of agents(in terms of their forecasting
Ourmodiedversionischaracterizedtheanadditionofabusiness school tothearticialstockmarket.
Thebusinessschoolinourmodelfunctionsasusualbusinessschoolsintherealworld. Itmainlyconsists
offaculty,andtheirdierentkindsofmodels(schoolsofthoughts).LetFbethenumberoffacultymembers
(forecastingmodels). Thesemodelsarepropagatedviaacompetitionprocessdrivenbythefacultythrough
publications. In this academic world, ascholar canill aord to keepsomething serious to herself if she
wantstobewell-acknowledged. If weconsider business schoolacollectionof forecastingmodels,then we
maywellusesingle-populationGPtomodel itsadaptation.
Nonetheless, scholarsandtraders maycareaboutdierentthings. Therefore,in thisproject,dierent
tnessfunctions arechosento takecare ofsuchadistinction. Forscholars,thetness function ischosen
purelyfrom ascienticviewpoint, say, forecastingaccuracy. Forexample,onemaychoosemean absolute
percentage error (MAPE) as the tness function (Table 1). Single-population GP is then conducted in
astandard way. Each faculty member (forecasting model) is represented by atree. The faculty will be
evaluatedwithaprespeciedschedule,sayonceforeverym
1
tradingdays. Thereviewprocedureproceeds
asfollows.
At theevaluation date, say t,each forecastingmodel (facultymember) will bereviewed bya visitor.
Thevisitorisanothermodelwhichisgeneratedrandomlyfromthecollectionoftheexistingmodelsinthe
businessschoolatt 1,denotedbyGP
i;t 1
,byoneofthefollowingthreegeneticoperators,reproduction,
crossover and mutation, each with probability p
r , p
c , and p
m
(Table 1). In the case of reproduction or
mutation, werst randomlyselecttwoGP trees,say, gp
j;t 1
and gp
k ;t 1
. TheMAPE ofthese twotrees
overthelastm
2
days'forecastsarecalculated. Atournamentselection isthenapplied tothese twotrees.
TheonewithlowerMAPE, saygp
j;t 1
, is selected. Wethenapply Schwefel's1+1 strategy overthehost
gp
i;t 1
andthe visitorgp
j;t 1
(in thecaseof reproduction)orgp 0
j;t 1
(in thecase ofmutation) basedon
thecriterionMAPE,andgp
i;t
istheoutcomeof this1+1competition(Schwefel,1995).
Inthecaseofcrossover,werstrandomlyselecttwopairsoftrees,say(gp
j1;t 1 ;gp j2;t 1 )and(gp k1;t 1 ;gp k2;t 1 ).
Thetournamentselectionisappliedseparatelytoeachpair,andthewinnersarechosentobeparents. The
children, say (gp
1 ;gp
2
), are born. One of them is randomly selected to compete with gp
i;t 1
, and the
winnerisgp
i;t
. ThefollowingisapseudoprogramoftheprocedureBusinessSchool(AlsoseeFlowchart
1). Table1isanexampleofthespecicationofthecontrolparameterstoevolvethebusinessschool.
Procedure[Business School]
0. begin 1. CalculateMAPE(gp i;t ) 2. A=Random(R,C,M)with(p r ;p c ;p m ) 3. IfA=C,gotostep(11). 4. (gp 1 ;gp 2 )=(Random(GP t 1 ),Random(GP t 1 )) 5. CalculateMAPE(gp 1
)andMAPE(gp
2 ).
6. gp
new
=TournamentSelection(MAPE(gp
1 );MAPE(gp 2 )) 7. IfA=R,gotostep(17). 8. gp new Mutation(gp new ) 9. CalculateMAPE(gp new ) 10. Go tostep(17)
11. Randomly selecttwopairsoftreesfromGP
t 1
12. CalculateMAPEofthese twopairsofGPtrees
13. gp
1
=TournamentSelection(PAIR1)
14. gp
2
=TournamentSelection(PAIR2)
15. (gp 1 ;gp 2 ) Crossover(gp 1 ;gp 2 ) 16. gp new =Random(gp 1 ;gp 2 ) 17. gp i;t
=TournamentSelection(MAPE(gp
i;t 1
);MAPE(gp
new ))
Flowchart 1 : Evolution of the Business School
Yes
No
P
R
P
M
P
C
No
Yes
No Yes
T
M
: Tournament selection according to MAPE
S(T
M
,i) : Selection procedure according to tournament selection with the criterion
MAPE
based on i (genetic operator)
i : R, M, C represent reproduction, mutation and crossover respectively
m
2
: Evaluation cycle
F : Number of faculty member
Gen := Gen + 1
Gen mod m
2
= 1 ?
i = 1
Reproduction
S(T
M
,R)
Mutation
S(T
M
, M)
Crossover
S(T
M
,C)
Validating by MAPE
i := F ?
i := i + 1
Keep the original model(s)
2.4 Traders and Business School
Given the adaptive process of the business school, the adaptive process of traders can be described as
a sequence of twodecisions. First, should she go back to the business school to take classes? Second,
shouldshefollowthelessons learnedatschool? Intherealworld,therstdecisionsomehowcanbemore
psychologicalandhassomethingtodowithpeerpressure. Onewaytomodelthein uenceofpeerpressure
istosupposethateachtraderwillexaminehowwellshehasperformedoverthelastn
2
tradingdays,when
comparedwithothertraders. Supposethattradersarerankedbythenet changeofwealthoverthelastn
2
tradingdays. LetW n
2
i;t
bethisnetchange ofwealthoftraderiat timeperiodt,i.e.,
W n2 i;t W i;t W i;t n2 ; (26) and,letR i;t
beherrank. Then,theprobabilitythattraderiwillgotobusinessschoolattheendofperiod
tisassumedtobedeterminedby p i;t = R i;t N : (27)
Thechoiceofthefunctionp
i;t
isquiteintuitive. Itsimplymeansthat
p i;t <p j;t ;if R i;t <R j;t : (28)
Inwords,the traderswhocome outtopshallsuer lesspeerpressure,and hencehavelessmotivation to
gobacktoschoolthanthosewhoarerankedatthebottom.
Inadditiontopeerpressure,atradermayalsodecidetogobacktoschooloutofasenseofself-realization.
Letthegrowthrateofwealthoverthelastn
2 daysbe Æ n2 i;t = W i;t W i;t n 2 jW i;t n2 j ; (29)
i;t
day,thenitisassumedthat
q i;t = 1 1+exp Æ n 2 i;t : (30)
Thechoiceofthisdensityfunctionisalsostraightforward. Noticethat
lim Æ n 2 i;t !1 q i;t =0; (31) and lim Æ n 2 i;t ! 1 q i;t =1: (32)
Therefore,thetraderswhohavemadegreatprogresswillnaturallybemorecondentandhencehavelittle
needforschooling,whereasthosewhosuerdevastatingregressionwillhaveastrongdesireforschooling.
Insum,fortraderi,thedecisiontogotoschoolcanbeconsideredasaresultofatwo-stageindependent
Bernoulli experiments. The success probability ofthe rstexperiment is p
i;t
. If theoutcome ofthe rst
experiment is success, the trader will go to school. If, however, the outcome of the rst experiment is
failure,thetraderwillcontinuetocarryoutthesecondexperimentwiththesuccessprobabilityq
i;t . Ifthe
outcomeofthesecondexperimentissuccess,thenthetraderwillalso gotoschool. Otherwise,thetrader
willquitschool. Ifweletr
i;t
betheprobabilitythattraderidecidestogotoschool,then
r i;t = p i;t +(1 p i;t )q i;t = R i;t N + N R i;t N 1 1+exp Æ k i;t (33)
Onceatraderdecidestogotoschool,shehastomakeadecisiononwhatkindsofclassestotake. Since
weassume that business school, at period t,consists of 500faculty members (forecastingmodels),let us
denotethembygp
j;t
(j=1;2;:::;F.) Theclass-takingbehavioroftradersisassumedtofollowthefollowing
sequentialsearchprocess. Thetraderwillrandomlyselectoneforecastingmodel gp
j;t
(j=1;:::;F)witha
uniformdistribution. Shewillthenvalidatethismodelbyusingittotthestockpriceanddividendsover
thelastn
3
tradingdays,andcomparetheresult(MAPE)withheroriginalmodel. Ifitoutperformstheold
model,shewilldiscardtheoldmodel,andputthenewoneintopractice. Otherwise,shewillstartanother
randomselection,anddoitagainandagainuntileithershehasasuccessfulsearchorshecontinuouslyfail
I
times. Thefollowingis apseudoprogramof theprocedure Visiting the Business School(Alsosee
Flowchart2).
Procedure[VistingBusiness School]
0. begin 1. CalculateMAPE(f i;t ) 2. I 1 3. Randomlyselectagp j;t (U[1;500]) 4. CalculateMAPE(gp j;t ) 5. IfMAPE(gp j;t )<MAPE(f i;t ),goto Step(10) 6. I I +1 7. IfI <I ,goto step(3) 8. f i;t+1 =f i;t 9. Goto Step(11) 10. f i;t+1 =gp j;t 11. end
Equation (33) and the procedure Visting Business School give the distinguishing feature of our
adaptive traders. As wementioned earlier, there is no direct interaction among traders in terms of the
Flowchart 2 : Traders' Search Process in the Business School
Yes
Yes
No Yes
No No
Yes No
No Yes
i = Individual ?
N : Number of traders
Gen := Gen + 1
Computing wealth (W
i,t
) for each
individual and ranking them (R
i,t
)
Probability of visiting
business school for trader i,
due to peer pressure,
p
i,t
= R
i,t
/ Individual
Probability of visiting business
school for trader i, due to a
sense of self-realization,
q
i,t
= 1 / (1 + e
ìi,t
) , where
ì
i,t
= (W
i,t
- W
i,t-1
) / |W
i,t-1
|
Keep the original model
i = N ?
Randomly select a new model
from business school with a
uniform distribution
Validating by MAPE
I = 1
I := I + 1
i := i + 1
I := I* ?
i := 1
applicablehere. Inotherwords,ourtradersarenotGP(GA)-based. Instead,theiradaptationbehavioris
modeled by anexplicit search process. Thesearch process startswith a decision to search or not. This
decisionisstochastic,i,e.,thetraderatanypointintimecannotbesurewhethersheshouldstartsearching,
andtheuncertaintyofthisdecisionisfurthermodeledviaatechniqueknownassimulatedannealing(SA).
Insum,itisasocietycomposing ofSA-basedtradersandSGP-basedfaculty,whocoevlovewithdierent
tnessfunctions(objectivefunctions).
3 Experimental Designs
Oneoftheformidabletasksforagent-basedcomputationaleconomicsisthedesign oftraders. AsLeBaron
(1998)pointedout: \Thecomputationalrealmhastheadvantagesanddisadvantagesofawideopenspace
inwhichtodesigntraders,andnewresearchersshouldbeawareofthedauntingdesignquestionsthatthey
will face. Most of these questions still remain relatively unexploited at this time. (p.18)" Nevertheless,
oneshould noticethat thisissueisnotconnedtoABCE,andiswidelysharedbyallresearchinbounded
rationality. Forexample,Sargent(1993)stated\Thisareaiswildernessbecausetheresearchfacessomany
choicesafterhedecidestoforgothedisciplineprovidedbyequilibriumtheorizing. (p.2)"
LeBaron's and Sargent's descriptionof this wildernesscan be further exemplied by Table 1. Facing
The Stock Market
Sharesofthestock(H) 100
InitialMoneysupply(M
1 ) 100 Interestrate(r) 0.1[0.0001] StochasticProcess(D t ) U(5:01;14:99)[U(0:0051;0:0149)]
Priceadjustmentfunction tanh
Priceadjustment( 1 ) 10 5 Priceadjustment( 2 ) 0.210 5 BusinessSchool
Numberoffacultymembers(F) 500
Numberoftreescreatedbythefullmethod 50
Numberoftreescreatedbythegrowmethod 50
Functionset f+; ;Sin;Cos;Exp;R log;Abs;Sqrtg
Terminalset fP t ;P t 1 ;;P t 10 ; P t 1 +D t 1 ;;P t 10 +D t 10 g
Selectionscheme Tournamentselection
Tournamentsize 2
Probabilityofcreatingatreebyreproduction 0.10
Probabilityofcreatingatreebycrossover 0.70
Probabilityofcreatingatreebymutation 0.20
Probabilityofmutation 0.0033
Probabilityofleafselectionunder crossover 0.5
Mutationscheme TreeMutation
Replacementscheme (1+1)Strategy
Maximumdepthoftree 17
Numberofgenerations 20,000
MaximumnumberinthedomainofExp 1700
Criterionof tness(Facultymembers) MAPE
Evaluationcycle(m
1
) 20(10,40)
SampleSize(MAPE)(m
2
) 10
Traders
NumberofTraders(N) 500
DegreeofRRA() 0.5
Criterionof tness(Traders) Incrementsin wealth (Income)
Samplesizeof 2 tjn1 (n 1 ) 10 Evaluationcycle(n 2 ) 1 Samplesize(n 3 ) 10 Searchintensity(I ) 5(1, 10) 1 0.5 2 10 5 3 0.0133
ThenumberoftreescreatedbythefullmethodorgrowmethodisthenumberoftreesinitializedinGeneration0
AggregateVariables
Stockprice P
t
Tradingvolumes V
t
Totalsofthebids B
t
Totalsoftheoers O
t
#of martingalebelievers N
1;t
#of tradersregisteredtoBusinessSchool N
2;t
#of traderswithsuccessfulsearchinBusinessSchool N
3;t
The Wealth Share ofDierent Classes
1stlowest20percentile S 0:2;t 2ndlowest20percentile S 0:4;t 3rdlowest 20percentile S 0:6;t 4thlowest20percentile S 0:8;t 5thlowest20percentile S 1;t IndividualTrader Forecasts f i;t Subjectiverisks i;t Bidtobuy b i;t Oertosell o i;t Wealth W i;t Income W 1 i;t
Rankofprot-earningperformance R
i;t Complexity(depthoff i;t ) k i;t Complexity(#ofnodesoff i;t ) i;t
resultsmaynotberobusttoalldesigns. Hence,in additiontorun manyruns inasingledesign,itisalso
crucialtotestmanydierentdesigns,i.e.,totestmanytableslikeTable1,whilewithdierentparameters.
This paper, however,has a very limitedscope, i.e., to illustrate therich dynamics our MS-GP articial
stockmarket can possibly oer, and thequestions it caneectively deal with asingle pilot experiment.
Therefore,whilewedone-tunesomeofourparameterslistedinTable1,wedonotintentionallycalibrate
ourparametersforthepurposeof replicatingthestylizedfactsofnancialtimeseries. 1
Thesimulationresultsofourarticialstockmarketaremainlyaseriesoftimeseriesvariablesoftraders
(microstructure)andthemarket. TheyaresummarizedinTable2.
4 Simulation Results
Basedontheexperimentaldesigngivenabove(Table1),asinglerunwith14,000generationswasconducted.
Noticethatthenumberofgenerationsisalsothetimescaleofsimulation,i.e.,GEN =t. Inotherwords,
wearesimultaneouslyevolvingthepopulationoftraderswhilederivingthepriceP
t
. Inthefollowing,we
shallpresentourresultsinanordertoansweraseriesof questionsraisedin Pagan(1996). 2
1. Arepricesandreturnsnormallydistributed?
2. Doespricesfollowarandomwalk?
1
AccordingtoLeBaron(1998),oneofthemissionsofthe agent-based modelingofnancial marketsistoreplicatetime
seriesfeaturesofrealmarkets.Lux(1995,1998),LuxandMarchesi(1998),Chen,LuxandMarchesi(1999)haveshowedhow
thesestylizedfactscanbereplicatedinaspecicstyleofagent-basedmodels.
2
Periods P Skewness Kurtosis Jarqu-Bera p-value 1-2000 84.07 4.82 0.34 3.07 40.62 0.00 2001-4000 76.43 5.84 0.65 2.60 153.49 0.00 4001-6000 67.28 1.84 0.94 5.07 654.75 0.00 6001-8000 65.17 3.27 0.67 3.85 212.46 0.00 8001-10000 64.46 2.49 1.16 5.28 887.91 0.00 10001-12000 68.44 5.09 2.24 11.46 7660.11 0.00 12001-14000 74.57 5.48 1.00 3.71 381.93 0.00
Table4: BasicStatisticsoftheArticialStockReturnSeries
Periods P Skewness Kurtosis Jarqu-Bera p-value
1-2000 -0.000074 0.015 3.53 23.64 39676.46 0.00 2001-4000 -0.000057 0.010 3.26 18.83 24461.55 0.00 4001-6000 -0.000018 0.007 3.72 25.94 48486.08 0.00 6001-8000 -0.000024 0.007 3.70 25.79 47869.55 0.00 8001-10000 0.000032 0.007 3.69 26.97 52452.04 0.00 10001-12000 0.000169 0.010 6.91 86.56 597871.50 0.00 12001-14000 -0.000154 0.009 4.18 32.80 79867.54 0.00
3. Arereturnsindependentlyandidenticallydistributed?
Inadditiontothe\up"part,agent-basedcomputationalmodelsprovideuswithrichopportunitytostudy
themicrostructure,i.e.,thebehavioralaspectoftraders. Inourarticialstockmarket,atrader'sbehavior
canbewellkepttrackofbyalistofvariablesgivenin Table2. This listofvariablesenableustoaddress
alot ofinterestingissuesinbehavioralnance.
1. Whatdoesthetradersactuallybelieve? Doesshebelievein theeÆcientmarkethypothesis?
2. Whatexactlyistheforecastingmodel(orthetradingstrategy)employedbythetrader?
3. Howsophisticatedisthetrader? Willshegetmoreandmoresophisticatedastimegoeson?
Inthefollowing,weshallillustratehowthese issuescanbeapproachedbyouragent-basedarticialstock
market.
First, are price and returnsnormally distributed? Thetime series plotof the stockprice isdrawnin
Figure 4. Overthis long horizon, P
t
uctuates between 55 and 105. The basic statistics of this series,
fP
t g
14000
t=1
,issummarizedin Table3. Giventhepriceseries,thereturnseriesis derivedasusual,
r t =ln(P t ) ln(P t 1 ): (34)
Figure5is atimeseriesof stockreturn,and Table4givesthebasicstatisticsof thisreturnseries. From
thesetwotables, neitherthestockpriceseries fP
t
gnorreturnseries fr
t
gisnormal. Thenullhypothesis
thatthese seriesare normalarerejectedby theJarqu-Berastatisticsinall periods. Thefat-tail property
isespeciallystrikinginthereturnseries. Thisresultisconsistentwithoneofstylizedfacts documentedin
Periods DFofP t (p,q) 1-2000 -0.285 (0,0) 2001-4000 -0.288 (0,0) 4001-6000 -0.150 (0,0) 6001-8000 -0.180 (0,0) 8001-10000 0.173 (0,0) 10001-12000 0.680 (0,0) 12001-14000 -0.753 (0,0)
TheMacKinnoncriticalvaluesforrejectionofhypothesisofaunitrootat99%(95%)signicancelevelis-2.5668(-1.9395).
Table6: BDS Test
Periods DIM=2 DIM=3 DIM=4 DIM=5 Reject
1-2000 -0.36 -0.20 -0.14 -0.18 No 2001-4000 -0.16 0.13 0.40 0.57 No 4001-6000 1.34 1.35 1.22 1.24 No 6001-8000 0.89 0.99 1.18 1.35 No 8001-10000 1.93 2.38 2.64 2.69 Yes 10001-12000 0.85 0.92 0.96 0.87 No 12001-14000 0.29 0.21 0.37 0.66 No
Theteststatisticisasymptoticallynormalwithmean0andstandarddeviation1. Thesignicancelevelofthetestissetat
0.95.
Second,doespricesfollow arandom walk? Or,moretechnically,doesthepriceserieshaveaunit root?
Thestandardtoolto testforthepresenceofaunitrootis thecelebratedDickey-Fuller(DF)test(Dickey
andFuller,1981). TheDFtestconsistsofrunningaregressionoftherstdierenceofthelogpricesseries
againsttheserieslaggedonce.
ln(P t )=ln(P t ) ln(P t 1 )= 1 ln(P t 1 ) (35)
The nullhypothesis is that
1
is zero, i.e., ln(P
t
) containsa unit root. If
1
is signicantly dierent
fromzerothenthenullhypothesisisrejected. AscanbeseenfromthesecondcolumnofTable5,fromthe
totalnumberof7periodsnoneleadstoarejectionofthepresenceofaunitroot. All ofthis doessuggest
that P
t
does follow a random walk. This resultalso agree with oneof the stylized facts documentedin
Pagan(1996).
Third, are returnsindependentlyand identicallydistributed? Here,wefollowedtheprocedure ofChen,
Lux and Marchesi (1999). This procedure is composed of two steps, namely, the PSC ltering and the
BDS testing. We rstapplied the Rissanen'spredictivestochastic complexity (PSC) to lter thelinear
process. The third column ofTable5givesus theAR MA(p;q) processextracted from thereturn series.
Interestinglyenough,allthesesevenperiodsarelinearlyindependent(p=0;q=0). Thisresultcorresponds
totheclassicalversionofthe eÆcientmarkethypothesis. 3
Oncethelinearsignalsareltered,anysignalsleftintheresidualseriesmustbenonlinear. Therefore,
oneof the most frequentlyused statistic, the BDS test, is applied to the residuals from the PSC lter.
Since noneof the seven returnseries have linearsignals, theBDS test isdirectly applied to the original
returnseries. TherearetwoparametersrequiredtoconducttheBDStest. Oneisthedistanceparameter(
3
ChenandKuo(1999)simulatedacobwebmodelwithGP-basedproducersandspeculators. In38outoftheir40cases,
theorderpandqidentiedbytheirPSClterissimply(0;0). OnewonderthatwhetherornotGP-basedagentscannormally
interactinsuchaneÆcientwaythatlinearpredictabilityoftheiraggregatebehaviorisalmostimpossible. Thisiscertainly
to therst choice, and hence,weonlyreport the resultwith =1. As to theembedding dimension, we
triedDIM=2;3;4;;5,andtheresultisgivenin Table6. SincetheBDStestisasymptoticallynormal,it
isquiteeasyto haveaneyeballcheckontheresults.
WhatisalittlesurprisingisthatthenullhypothesisofIID(identicallyandindependentlydistributed)
is rejected in 6out of 7periods. The only period whose returnseries hasnonlinear signalsis Period 5.
Putting theresult of PSC ltering and BDS testing together, our returnseries is eÆcient to the degree
that,85%ofthetime,itcanberegardedasaiidseries. But,iftheseriesisindeedindependent(nosignals
at all), what is the incentive for traders to search? Clearly, here, wehavecome to the issues raised by
GrossmanandStiglitz20yearsago(GrossmanandStiglitz,1981).
Oneoftheadvantagesagent-basedcomputationaleconomics(thebottom-upapproach)isthatitallows
ustoobservewhattraders areactuallythinkinganddoing. Aretheymartingale believers? Thatis,dothey
believethat E t (P t+1 +D t+1 )=P t +D t ? (36)
If theydonot believein the martingalehypothesis, do theysearchintensively? In other words, dothey
go to schooland can still learn somethinguseful in such an iid-seriesenvironment? To answerthe rst
question,thetimeseries ofN
1;t
in Table2isdrawn in Figure6. Thegureisdrawnonlyupto therst
1000 tradingdays, because after that the groupof believers goes extinct. Hence, while econometricians
mayclaimthatthereturnseriesisiid,traderssimplydonotbuyit.
Thisnaturallybringsupthesecondquestion: if theydo notbelieve inthe martingale hypothesis, what
dothey actually do? Figure7isthetime seriesplotofthenumberoftraderswithsuccessfulsearch,N
3;t .
Dueto thedensityoftheplotandthewiderangeof uctuation,this gureis somewhatcomplicatedand
diÆculttoread. We,therefore,reporttheaverageofN
3;t
overdierentperiodsoftradingdaysinTable7.
FromTable7,itcan beseenthat thenumberoftraderswith successfulsearch,ontheaverage, uctuates
about200. Ataroughestimate,40%ofthetradersbenetfrom businessschoolpertradingday. Clearly,
searchinbusiness schoolisnotfutile.
It isinterestingto knowwhat kindof usefullessons traderslearnfrombusiness school. Is ittheBDS
test,eÆcientmarkethypothesis orthemartingalemodel? Theanswerisnoneoftheabove. Basedonour
designgivenin Section 3, what business schooloersis acollectionof forecastingmodels fgp
i;t
g, which
canwellcapturetherecentmovementofthestockpriceanddividends. Therefore,whileinthelong-runthe
returnseriesisiid,tradersunder survivalpressuresdonotcaremuchaboutthislong-runproperty. What
motivatesthem to search and helps them to surviveis in eect brief signals. A similar observation was
madebyPeters(1991):
The evidence calls into question the EÆcient Market Hypothesis, which underlies the linear
mathematicsusedinmostcapitalmarkettheory. Italsolendsvaliditytoanumberofinvestment
strategiesthatshouldnotworkifmarketsareeÆcient,.... Thisndingisofparticularimportance
for practitioners, because experience hasshown that these strategies do work when properly
applied,eventhoughtheorytellsustheyshouldnotworkinarandom-walkenvironment. (Italics
added.)
Anotherwaytosee whattradersmaylearnfrombusiness schoolis toexaminetheforecastingmodels
they employ. However, this is a very large database, and is diÆcult to deal with directly. But, since
allforecastingmodelsare in theformat ofLISP trees, wecanat least askhow complex these forecasting
models are. Todoso,wegivetwodenitions ofthecomplexityof aGP-tree. Therstdenition isbased
onthenumber ofnodesappearingin thetree,whilethesecondisbasedonthedepthofthetree. Oneach
tradingday,wehaveaproleoftheevolvedGP-treesfor500traders,ff
i;t
g. Thecomplexityofeachtreeis
computed. Letk
i;t
bethe numberof nodesofthemodelf
i;t and i;t bethedepthoff i;t . Wethenaverage asfollows. k t = P 500 i k i;t 500 ; and t = P 500 i i;t 500 : (37)
Figures 8 and 9 are the time series plots of k
t and
t
. One interestinghypothesis one maymake is
Figure 4 : Time Series Plot of the Stock Price
45
55
65
75
85
95
105
1
1001
2001
3001
4001
5001
6001
7001
8001
9001
10001
11001
12001
13001
Trading Day
Stock Price
Figure 5 : Time Series Plot of Stock Returns
-0.05
0
0.05
0.1
0.15
0.2
1
1001
2001
3001
4001
5001
6001
7001
8001
9001
10001
11001
12001
13001
Trading Day
Stock Returns
Figure 6 : The Number of Traders with Martingale Strategies on Each Trading Day
0
10
20
30
40
50
60
1
1001
2001
Trading Day
Number of Traders
Strategies Periods N 3 k 1-2000 209.13 17.85 8.14 2001-4000 189.03 28.14 9.66 4001-6000 218.53 54.34 13.29 6001-8000 215.91 59.51 14.13 8001-10000 220.78 76.60 14.74 10001-12000 206.80 69.22 13.97 12001-14000 185.40 50.58 12.94
N3 istheaverageofN3;ttakenovereachperiod.kandaretheaverageofkt andttakenovereachperiod.
Table8: AverageoftheNumberofTraderswithSuccessfulSearchonthehdayafterBusinessSchoolHas
UpdatedtheInformation
h N 3;h h N 3;h h N 3;h h N 3;h 1 308.52 6 208.88 11 189.87 16 183.49 2 270.24 7 200.80 12 188.04 17 184.49 3 246.39 8 196.56 13 187.81 18 186.54 4 230.82 9 193.27 14 187.94 19 193.39 5 218.86 10 191.47 15 184.61 20 185.39
words, traders will evolveto be more and moresophisticated astime goes on. However, this is not the
casehere. Bothguresevidencethat,whiletraderscanevolvetowardahigherdegreeofsophistication,at
somepointin time,theycan besimpleaswell(Alsosee Table7). Despitetherejectionof themonotone
hypothesis, weseenoevidence thattraders'behaviorwillconvergeto thesimplemartingalemodel.
Figures 7,8and9together leaveus animpression that tradersin ourarticialstockmarket arevery
adaptive. Aboutthisphenomenon,Arthur(1992)conducted asurvivaltestonit.
Wendnoevidencethat marketbehavioreversettlesdown;thepopulationofpredictors
con-tinuallyco-evolves.Onewaytotestthisistotakeagentsoutofthesystemandinjectthemin
againlater on. If market behavior isstationary theyshould be able todo as well inthe future
as they are doing today. But we nd that when we \freeze" a successful agent's predictors
earlyonand injecttheagentintothesystemmuchlater, theformerlysuccessfulagentisnow
adinosaur. Hispredictionsareunadaptedandperformpoorly. Thesystemhas changed. (p.24,
IalicsAdded)
Authur's interestingexperimentcanbeconsideredasameasureof thespeedofchangein asystem. If
asystemchanges inaveryfastmanner,then knowledgeaboutthesystemhastobeupdatedin asimilar
pace; otherwise, theknowledgeacquired shall soon become obsolete. To seehowfast ourarticial stock
market changes, we made an experimentsimilar to Arthur's survivaltest. Since in our articial market
businessschoolisupdateevery20periods(m
1
=20,Table1),wecanmeasurethehowfasttheknowledge
becomeobsoletebycalculatingthenumberoftraderswithsuccessfulsearchonthehthdayafterbusiness
Figure 7 : The Number of Traders with Successful Search on Each Trading Day
20
70
120
170
220
270
320
370
420
470
1
1001
2001
3001
4001
5001
6001
7001
8001
9001
10001
11001
12001
13001
Trading Day
Number of Traders
Figure 8 : Traders' Complexity : The Average of the Number of Nodes of GP-Trees
0
10
20
30
40
50
60
70
80
90
100
110
120
1
1001
2001
3001
4001
5001
6001
7001
8001
9001
10001
11001
12001
13001
TradingDay
Average Number of Nodes
Figure 9 : Traders' Complexity : The Average of Depth of GP-Trees
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
1
1001
2001
3001
4001
5001
6001
7001
8001
9001
10001
11001
12001
13001
Trading Day
Average Depth
helpfulforthesearchingtraders. Therefore,thenumberoftraderswithsuccessfulsearchshouldbestrikingly
highonthatday,andthefartheritisfromtheupdating,thelessthechanceofhavingasuccessfulsearch.
Moreprecisely,denote N
3;t byN
3;h
i
,wheret=(i)20+h,andlet
N 3;h = P 14000=20 i=1 N 3;hi 14000=20 ; (38)
thenArthur's survivaltestcan bereformulatedasfollows. N
3;h
isamonotonic decreasing function of h.
Tosee whether this propertywill apply to oursystem, Table8reportsthestatistics N
3;h
. This series of
numbersstartswithapeakat308,andquicklygoesdownbelow300andthendropsfurther below200as
hincreases. This result simplysays that when moreandmore people knowsthesecret, there canbeno
longeranysecret.
Thelastresultalsoshowstheco-evolvingcomplexdynamicsbetweenbusinessschoolandthemarket. To
survive,schoolmustadapttomarketdynamics. Ontheotherhand,marketdynamicsgeneratestudentsfor
\school"who,inturn,bringtheknowledgelearnedfrom\school"backtothemarket,andthat knowledge
mayhavefurther impactonmarketdynamics. Thepatterns discoveredbybusiness schoolareeventually
annihilated by the traders who learn and make a living on these patterns. However, on the process of
annihilatingthesepatterns,newpatternsarefurthergeneratedforschooltodiscover,andthisprocessgoes
onandon. Onemaycallthis processaself-destruction-and-organizationprocess.
5 Concluding Remarks
Thesinglepilot experimenthas demonstratedthe rich dynamics that ourMS-GP articial stockmarket
cangenerate. We alsoshowthe relevance of this rich dynamics to nancial econometrics andbehavioral
nance. Forthelatter, weaddressPeters' criticismontheeÆcientmarkethypothesisaswellasArthur's
survivaltestwithourdynamicsofmicrostructure. Itisinterestingtonotethat, whileeconometricianson
thetop may claim that ourarticial market is eÆcient, our traderson the bottom donot act asif they
believe in the eÆcientmarket hypothesis. This result seemsto be consistent withour experience of the
realworld,andisoneoftheinterestingfeaturesonematexpect fromthebottom-upapproach.
References
[1] Andrews, M. and R. Prager (1994), \Genetic Programmingfor the Acquisition of Double Auction
Market Strategies," in K.E. Kinnear(1994)(eds.), Advances in Genetic Programming, Vol. 1,MIT
Press.pp.355-368.
[2] Arifovic,J. (1994),\GeneticAlgorithmLearningandtheCobwebModel,"Journalof Economic
Dy-namics andControl,Vol.18,No.1,pp.3-28.
[3] Arifovic,J.(1995),\GeneticAlgorithmsandIn ationaryEconomies,"JournalofMonetaryEconomics,
36, pp.219-243.
[4] Arifovic,J.(1996),\TheBehavioroftheExchangeRateintheGeneticAlgorithmandExperimental
Economies,"in JournalofPolitical Economy,Vol.104,No.3,pp.510-541.
[5] Arifovic,J.,J.BullardandJ.Duy(1997),\TheTransitionFromStagnationtoGrowth: AnAdaptive
LearningApproach."JournalofEconomicGrowth 2,pp.185-209.
[6] Arthur, W. B., J. Holland, B. LeBaron, R. Palmerand P. Tayler(1997), \Asset Pricing under
En-dogenousExpectationsin anArticialStockMarket,"in W.B.Arthur,S.Durlauf&D.Lane(eds.),
The Economy asanEvolving ComplexSystemII,,Addison-Wesley,pp.15-44.
[7] Axelrod,R.(1997),\AdvancingtheArtofSimulationintheSocialSciences,"inR.Conte,R.
Agents,"Journalof EconomicDynamics andControl,22,pp.179-207.
[9] Bullard, J.and J.Duy (1998b),\Learning andthe Stability ofCycles,"Macroeconomic Dynamics,
2,pp.22-48.
[10] Bullard,J.andJ.Duy(1999),\UsingGeneticAlgorithmstoModeltheEvolutionofHeterogeneous
Beliefs," ComputationalEconomics, forthcoming.
[11] Chen,S.-H.andC.-H.Yeh(1996),\GeneticProgrammingLearningandtheCobwebModel,"Advances
in GeneticProgramming,Vol.2,Chap.22,MITPress,Cambridge,MA.1996.pp.443-466.
[12] Chen,S-H.andC.-H.Yeh(1997),\ModelingSpeculatorswithGeneticProgramming,"inP.Angeline,
R. G.Reynolds, J. R. McDonnell, and R. Eberhart (eds.), Evolutionary Programming VI, Lecture
Notes in ComputerScience,Vol.1213,Berlin:Springer-Verlag.pp.137-147.
[13] Chen,S-H.andC.-H.Yeh(1998),\GeneticProgrammingintheOverlappingGenerationsModel: An
Illustration withDynamicsof theIn ationRate,"in V. W.Porto,N. Saravanan,D. WaagenandA.
E. Eiben(eds.),Evolutionary ProgrammingVII,Lecture Notesin Computer Science,Vol.1447,
Berlin:Springer-Verlag.pp.829-838.
[14] Chen,S.-H.andT.-W.Kuo(1999),\TowardsanAgent-BasedFoundationofFinancialEconometrics:
An ApproachBasedonGenetic-ProgrammingArticialMarkets,"mimeo, DepartmentofEconomics,
NationalChengchi University.
[15] Chen, S.-H., J.Duy andC.-H. Yeh(1996),\Genetic Programminginthe Coordination Game with
a ChaoticBest-Response Function", in P. Angeline, T.Back, andD. Fogel (eds.)Evolutionary
Pro-grammingV,MITPress,Cambridge,MA,1996.pp.277-286.
[16] Chen, S.-H., T. Lux and M. Marchesi (1999), \Testing for Non-Linear Structure in an Articial
Financial Market,"mimeo, DepartmentofEconomics,UniversityofBonn.
[17] Dickey, D. A. and W. A. Fuller (1981), \Likelihood Ratio Statistics for AutoregressiveTime Series
withaUnitRoot,"Econometrica49,pp.1057-1072.
[18] Grossman, S. J.andJ.Stiglitz (1980),\OntheImpossibilityofInformationallyEÆciencyMarkets,"
American Economic Review,70,pp.393-408.
[19] Harrald, P. (1998), \Economicsand Evolution," the panel paper givenat theSeventh International
Conference onEvolutionary Programming,March25-27,SanDiego,U.S.A.
[20] Herreiner,D.(1998),\WhoLearnsfromWhatfromWhom?" paperpresentedatthe4thInternational
Conference ofthe Society for ComputationalEconomics,June30-July2,Cambridge,U.K.
[21] Heymann, D.,R. P. J.,PearzzoandA. Schuschny(1998),\Learning andContagionEectsin T
ran-sitions BetweenRegimes: SomeSchematic Multi-AgentsModels,"Journal of Management and
Eco-nomics,Vol.2,No.6.
[22] Holland, J.H., and J.H.Miller(1991),\Articial AdaptiveAgentsin EconomicTheory,"American
EconomicReview,Vol.81,No.2,PapersandProceedings,pp.365-370.
[23] LeBaron,B.(1998),\Agent-BasedComputationalFinance: SuggestedReadingsandEarlyResearch,"
the paperpresentedat theFirstWorkshop on Agent-Based Modeling of Financial Markets,Nov. 17,
Washington D.C.Also,forthcomingin JournalofEconomic DynamicsandControl.
[24] Lux,T.(1995),\HerdBehavior,BubblesandCrashes,"Economic Journal105,pp.881-896.
[25] Lux, T.(1998), \The Socio-EconomicDynamics ofSpeculativeMarkets: Interacting Agents, Chaos,
and theFat Tails of Return Distribution," Journal of Economic Behavior and Organization 33, pp.
Financial Market,forthcomingin Nature.
[27] Miller,J.H.(1996),\TheCoevolutionofAutomataintheRepeatedPrisoner'sDilemma,"Journalof
EconomicBehavior andOrganization,Vol.29,pp.87-112.
[28] Minsky,M.L.(1986),The Society ofMind, NewYork: SimonandSchuster
[29] Pagan, A. (1996), \The Econometricsof Financial Markets," Journal of Empirical Finance, 3, pp.
15-102.
[30] Palmer,R. G.,W. B.Arthur, J.H. Holland,B.LeBaron,andP. Tayler(1994),\Articial Economic
Life: ASimpleModelofaStockmarket,"Physica D,75,pp.264-274.
[31] Peters,E.E.(1991),\AChaoticAttractorfortheS&P500,"FinancialAnalystsJournal,March/April.
[32] Price,T.C.(1997),\UsingCo-EvolutionaryProgrammingtoSimulateStrategicBehaviorinMarkets,"
Journal ofEvolutionary Economics,Vol.7,pp.219-254.
[33] Sargent,T.J.(1993),BoundedRationality inMacroeconomics, Oxford.
[34] Schwefel,H.-P.(1995),\EvolutionandOptimumSeeking,"Wiely.
[35] Staudinger, S. (1998), \Money asMedium of Exchange: An Analysis with Genetic Algorithms,"in
Proceedings of Conferenceon Computationin Economics,Finance, andEngineering,June29-July1,
UniversityofCambridge.
[36] Tayler,P.(1995),\ModelingArticialStocksMarketsUsingGeneticAlgorithms,"in S.Goonatilake
andP. Treleaven(eds.),Intelligent Systemsfor FinanceandBusiness,pp.271-288.
[37] Vila,X.(1997),\AdaptiveArticialAgentsPlayaFinitelyRepeatedDiscretePrincipal-AgentGame,"
in R. Conte,R.Hegselmann,andP. Terna (eds.),Simulating Social Phenomena,Lecture Notesin
Economicsand MathematicalSystems,Springer.pp.437-456.
[38] Vriend, N. (1998),\An Illustrationof theEssentialDierence betweenIndividual and Social
Learn-ing,and ItsConsequenceforComputationalAnalysis,"TechnicalReport, QueenMaryandWesteld