A New Approach to Economics: Agent Based Models of Human Traders.

A Cocoa Program of the Santa Fe Artificial Stock Market
We have started work on the project already. You can download development versions here.
| 3rd June 2007 | Saves data when agent matrix plotting is activated. Conditional variance based on mean accuracy. Max trade per round = 5. | Click here |
| 29th May 2007 | Peter Lewis contributes interaction exploitation graph idea, allowing visualization of who exploits whom. This gives us a dynamic directed exploitation graph. We would like to identify attractors or clusters in exploitation graph space to see how exploitation 'niches' change over time. Do they oscillate for example? To do this we will need to use some unsupervised pattern recognition algorithm. | Click here |
| 28th May 2007 | Speed increased. Agent interaction matrix visualization added (blue (i gains from j), red (j gains from i), green (both i and j gain). | Click here |
| 27th May 2007 | Rule copying method corrected. Agent mutation and selection added, giving two levels of selection. | Click here |
| 26th May 2007 | Ranges added to mutation, accuracy etc... Mutation rate decreased, initial accuracy = 0.001, stabilizes after an initial transient of apx 1000 timesteps. Further visualization of behaviour is now required. | Click here |
| 25th May 2007 | Conditional variance calculation corrected, agent and rule visualization windows added. | Click here |
| 24th May 2007 | Early version, parameters not properly set, only price and dividend is visualized. All parts coded. | Click here |
What can we begin to study using the above model?
1. So far, selection takes place only 'within the brain' of individual agents, by discarding the least accurate 20% of predictors and mutating the top 20% of predictors. Various clever directed mutation operators can be implemented e.g. slow reversion to idea generality (adding #'s). Selection can also punish having too few #'s, i.e. rewarding predictors that are maximally general, yet predictive. There is currently NO selection between agents in the stock market. This is because in the current model, agents themselves do not multiply, are not selected for. Should agents multiply, their current rule sets could be inherited. How do the properties of the market change if agents are allowed to multiply? Selection would act at two levels, between rules and between agents. The substrates of the rule level selection are the predictive ability of individual rules. The substrate of the agent level selection is the wealth of the agents. Is it the case that rules in the brains of agents always benefit the agent? Is it the case that a rule with maximum predictive ability for price will maximally increase the fitness of the agent? How does this depend on how the fitness of the agent is defined?
2. What happens if rules can be horizontally transferred between agents, i.e. if a rule with high predictive value is able to infect other agents? Would this result in the system becoming more stable? If the capacity for a rule to spread was not proportional to its predictive accuracy then what would happen?
3. What happens if the learning rate (K) of agents is made an evolvable parameter? Do more rapidly learning agents take over the market? Is there an optimum learning rate K?
4. What is the structure of the exploitation graph, i.e. who exploits whom? How do exploiters rules work to get money from the exploited agents? Are they technical or fundmental exploiters? Look at the exploitation graph of the richest agent. What does it look like? What is the richest agents stratergy?
Properties of Real Markets and Time-Series Prediction Properties (Techniques).
1. Clustered volatility (Mandlebrot, 1963, 1997).
2. Fat tails in the distribution of log returns.
3. Correlated volume and volatility.
4. Temporal oscillation in difference between prices and values.
4. Negative Autocorrelation in prices (due to value-investing). (D. Farmer, 2002). Positive short-term autocorrelations (due to trend-following stratergies. (D. Farmer, 2002). Combination of the two types of investor results in low autocorrelations, and the above properties. (1,2,3,4 )
5. Co-integration. (Engle and Granger, 1987). Two random processes can be random walks, even though on average they tend to move together. I.e. y and z (two random processes) are cointegrated if there is a linear combination u = ay + bz that is stationary, e.g. price and value are co-integrated if p-v has a well defined mean and standard deviation. (Farmer, 2002).
Glossary
Market Maker
Rational Expectations Equilibrium
MSc Summer Project April 2007: The Evolution of Cooperation in Artificial Stock Markets
Multi-Level Selection, The Evolution of Cooperation and Information Spread in Artificial Stock Markets
Economics is really boring because economists have been using mathematical methods that are outdated and make completely unrealistic assumptions about how humans behave. But, because of computers, this is all changing.
Here I invite an enthusiastic and focused MSc student who is also an excellent programmer to work together with me on what will be an extremely intense but exciting and rewarding summer project. We will develop a computer simulation to investigate the evolution of cooperation and the propagation of information in artificial stock markets. Our goal would be to submit our work as a conference paper at a workshop I am organizing in Lisbon on extending the Darwinian framework (ECAL, 2007, see here for details), and then to revise and extend the research for a journal publication.
The recent book by Eric D. Beinhocker inspired the work, see "The Origin of Wealth: Evolution, Complexity and the Radical Remaking of Economics" (2006). In the book, Beinhocker describes a seminal meeting in the Santa Fe institute that resulted in B. Arthur er al's paper "Asset Pricing Under Endogenous Expectations in an Artificial Stock Market". 1996. Download here. The authors modelled 'inductively rational' rule learning agents buying and selling a stock. Many realistic stock market behaviours were observed such as characteristic patterns of fluctuation and distribution of trader quality. I propose we re-implement the Sante Fe Artificial Stock market, taking into account more recent work, and ask the following questions.
Can the simulation help us understand which kinds of trading strategy are "better" in various contexts? Do more successful agents have in some sense more 'information' about the rule sets or behaviours of other agents? How does information propagate between agents?
What happens when cooperation is introduced between trading agents, i.e. a communication step prior to a trading step? Do the agents lie to each other about what they will do, or do they establish reputations and trading cliques?
How can the market be made less volatile?
Ultimately I would like to see our program available online in a simple GUI format which allows anyone to contribute agents that can interact with existing software traders, perhaps even for real money!
I am a theoretical biologist working on all sorts of interesting problems in evolutionary and adaptive systems, from the origin of life to learning in buckets of water, see more here. If you think you are up for the challenge, contact me on c.t.fernando@cs.bham.ac.uk to arrange a meeting at the Systems Biology Centre this week.
Examples of Models
Spatial Markets of Trading Agents
1. SugarScape. A model of trading agents on a 2D grid, moving around to obtain resources and trading. What can be learned from such a model?
Artificial Stock Markets of Trading Agents
1. B. Arthur er al. "Asset Pricing Under Endogenous Expectations in an Artificial Stock Market". 1996. Download here. The authors modeled 'inductively rational' rule learning agents buying and selling a stock. Behaviours similar to real stock markets were apparently observed. But can simulation say which kinds of trading stratergy were "better"? What happens when cooperation is introduced between trading agents, i.e. communication step prior to a trading step. Do the agents lie to each other about what they will do, do they establish reputations?
Business Cycles and Propogation Mechanisms
The annual price index oscillates in an interesting manner (p162) which is neither random nor regular. There is a sense in which the economy acts as a propogation mechanism. Ragnar Frisch's propogation mechanism model, and Fynn Kydland and Edward Prescott's model of business cycles (1980s) consider the economy as a kind of jelly. Do economic networks posess liquid state properties? Can one observe a vector of stock prices and use them to classify input patterns?
Recommended Books
Notes and thoughts on Eric. D. Beinhocker's book "The Origin of Wealth: Evolution, Complexity, and the Radical Remaking of Economics.". Beinhocker reviews agent based, cognitive science, dynamical systems, non-equailibrium system, and evolutionary approaches to economics, giving excellent footnotes and references to simulations of economic systems to seek to produce theories with more predictive value than traditional economics.