[MUD-Dev] Game Economies

Ling K.L.Lo-94 at student.lboro.ac.uk
Thu Jun 17 13:30:14 CEST 1999


On Sun, 13 Jun 1999, Ling wrote:
> > 
> The following link may prove enlightening (or not):
> 
> <URL:http://www.newscientist.com/nsplus/insight/ai/forecast.html>
> 
> Skip the first ten odd paragraphs to get straight to the stock market
> simulator using moderately complex agents.  It's even in simple English.
> 
> Considering the simulation was conducted in 1987, I doubt the method
> described above is beyond most muds these days.

With much caution, a copy of the text in that link is attached below.  I
suspect the John Holland mentioned below is the same Holland who wrote
quite an influential paper on genetic algorithms way back.

Unfortunately, pretty diagrams will have to be obtained from the original
webpage itself. 

---<cut>---

Firm forecast

Managing the vagaries of everyday life has always been a nightmare for
chiefs of disaster insurance companies and senior stock brokers. Now, a
generation of virtual humans could put the prediction business on a sound
footing, says John Casti

WHEN HURRICANE ANDREW scythed through Florida and Louisiana in 1992, it
left behind a cruel trail of destruction. But people living along the
storm track were not the only ones to take a beating. The financial waves
triggered by this most costly hurricane ever spread around the world,
battering many insurance companies and sinking others.

Now, given that seers, soothsayers and scientists have all failed to find
a reliable way to forecast truly devastating storms, a prudent insurance
company chief might at least hope for some idea of how to offset the
firm's risk against such disasters. And a company with a more aggressive
style might even want to know what impact another costly storm would have
on its rivals, and be ready to exploit any business opportunities that
might arise.

Today, such business decisions are based largely on rules of thumb gained
from long experience. But company chiefs long to do better. They hunger
for some way to replace hunches and experience with a systematic approach
to making decisions. They want to be able to develop theories about how
their business works which they can put to the test in rigorous,
repeatable experiments. In short, they want business to become a science.

As recently as the early 1980s, the idea of subjecting social and
behavioural systems to scientific study was shunned because humans were
thought to be "too complex" and "unpredictable". But, in reality, these
have never been the main barriers. The real problem has been the lack of
laboratories in which to conduct experiments.

Today, we have these laboratories. They come in the form of powerful
computers running simulations of real-life behaviour. And, while these
simulations are still in their infancy, their promise is hard to miss.
Already, people from such diverse fields as stock market trading,
supermarket design and the insurance business are starting to explore
their money-making possibilities.

In the autumn of 1987, W. Brian Arthur, an economist from Stanford
University, California, and John Holland, a computer scientist from the
University of Michigan, shared a house while they visited the Santa Fe
Institute in New Mexico. During hours of evening conversations over
numerous beers, Arthur and Holland hit upon the idea of creating a virtual
stock market inside a computer-one that could be used to answer questions
that people in finance have pondered for decades.

Economists, for example, refer to a quantity called the fundamental value
of a share. This is simply the sum of all the dividends that a person can
expect to receive by holding on to the share indefinitely-but adjusted, or
"discounted", to take account of factors such as inflation which make a
dollar today worth more than a dollar in future. Arthur and Holland wanted
to know if the average price of a share settles down to its fundamental
value. This conjecture forms the basis of one of the most cherished tenets
of finance theory, which academics use to understand market behaviour.

Another common question is whether a market eventually settles into a
fixed pattern of buying and selling, or whether a rich "ecology" of
trading rules emerges instead. But how should Arthur and Holland go about
creating a model exchange capable of giving answers that are relevant to
real life?

Finance theory was one option open to them. Its virtue is that it provides
a set of rules on which deductions can be based. Take the prediction of
the price of a share. Conventional wisdom has it that tomorrow's share
price is simply the discounted expectation of today's price plus a factor
taking into account one day's worth of the share's dividend.

This calculation assumes that other factors, such as how fast the share is
trading and economic indicators such as the interest rate remain the same.
But in real life, of course, they don't. So there may actually be many
perfectly reasonable ways to predict tomorrow's price, based on different
ways of combining all or some of these variables. For example, we could
say that tomorrow's price will equal today's price. Or we might predict
that the new price will be today's price divided by the dividend rate. And
so on. Finance theory really doesn't give any help in choosing which to
use.

The simple observation that there is no single, best way to process
information sets deductive logic on a slippery slope. In the real world, a
trader has not only to decide which forecasting method to use, but must
also make assumptions about how other investors are going to make the same
decision. Ultimately the reasoning chases its own tail. If I am a trader,
I have to base my decisions partly on what I think other traders will do,
knowing that they are basing their decisions on what they think I will do.

All this led Arthur and Holland to the not very surprising conclusion that
deductive methods based on grand laws are, at best, an oversimplified
academic fiction. Instead, they decided to build their model stock market
from the bottom up, starting with individual traders. Their model includes
60 software "agents" representing the traders. Each one is assumed to
summarise recent market activity by a collection of descriptors (labelled
A, B, C and so on), which are statements about the state of the market,
such as "the price has gone up every day for the past week," or "the price
is higher than the fundamental value", or "the trading volume is high".

The traders then decide whether to buy or sell by invoking rules of the
form: "If the market fulfils conditions A, B, and C, then buy, but if
conditions D, G, S, and K are fulfilled, then hold." Each trader has a
collection of such rules, but uses only one of them at a time. This rule
is the one the trader views as its current, most accurate rule.

As buying and selling proceeds, traders can re-evaluate their rules and
bring another into play if it has proved profitable in the past. Suppose
I'm an agent using one rule, but I know that another is useful when the
inflation rate rises. When inflation does goes up, I will abandon the
existing rule in favour of the other.

Traders can also recombine successful rules to form new ones that they can
then test in the market. This is carried out using what is called a
genetic algorithm, an invention of Holland's that mimics the way the genes
of two parents are mixed in a fertilised egg. The genetic algorithm
generates new rules by combining elements from two "parent" rules.

This simulated market, which trades just one company's shares, runs on a
desktop computer. Before trading begins, the traders are fed a particular
history of stock prices, interest rates and dividends, and are assigned a
set of rules. The traders then randomly choose one of their rules and use
it to start buying and selling.

Adapting to the market

After the first round of trading, each agent assesses how good its current
rule is by comparing it with the way all its other rules would have
performed. It then generates a new rule, and chooses the best rule for the
next round of trading. And so the process goes, period after period,
buying, selling, placing money in bonds, modifying and generating rules,
estimating how good the rules are, and, in general, acting in the same way
that traders act in real financial markets.

Diagram: On the virtual exchange, share price moves just as in the real
market. Black areas are where investors are willing to pay more for a
share than its fundamental value (see text). Pink areas are where the
market crashes.

A frozen moment in this artificial market is displayed in the Diagram. It
shows the time history of the share price and the fundamental value of the
stock, where the price of the share is the white line and the top of the
red region is the fundamental value. The black region, where the white
line is higher than the top of the red region, represents a speculative
bubble in which investors are willing to pay more for the share than it is
truly worth (as measured by the fundamental value). In the pink region,
where the white line sinks far below the top of the red, the market has
crashed.

So did this simulated market answer any of Arthur and Holland's questions?
After many periods of trading and modification of trading rules, what
emerges is a kind of ecology of predictors, with different traders
employing different rules to make their decisions. Furthermore, the price
of the share always settles down to a random fluctuation about its
fundamental value. However, within these fluctuations a very rich
behaviour is seen: market moods, overreactions to price movements and all
the other things associated with real speculative markets.

Indeed, the model appears to be very realistic. The bubbles and crashes
resemble closely those seen in real life. And variants of the model are
now being tested by both investment houses and finance theorists to study
the dynamics of price movements, and to look at how traders move from one
rule to another in the face of what their colleagues are doing.

Arthur and Holland's agent-based approach can be used for simulating more
than just the stock market. If you picture the agents on the virtual
trading floor sporting sharp clothes and cell phones, the agents in
another simulation, called SimStore, would have shopping trolleys and wire
baskets. SimStore is a model of a real British supermarket-the Sainsbury's
store at South Ruislip in West London. It is the result of a collaboration
between Ugur Bilge of SimWorld, which is based in London, Mark Venables of
Sainsbury's and me.

The agents in SimStore are software shoppers, armed with shopping lists.
They make their way round the silicon store, picking goods off the shelves
according to rules such as the nearest neighbour principle: "Wherever you
are now, go to the location of the nearest item on your shopping list."
Using these rules, SimStore generates the paths taken by customers, from
which it can calculate customer densities at each location. The diagram
shows customer densities around the store with blue as the highest density
and white the lowest.

Diagram: By modelling people's shopping habits, SimStore can predict which
parts of a supermarket will be most popular.

It is also possible to link all points visited by, say, at least 30 per
cent of customers to form a most popular path. A genetic algorithm can
then change where in the supermarket different goods are stacked and so
minimise, or maximise, the length of the average shopping path. Shoppers,
of course, don't want to waste time, so they want the shortest path. But
the store manager would like to have them pass by almost every shelf, to
encourage impulse buying. So there is a dynamic tension between the
minimal and maximal shopping paths that needs further exploration. Among
other uses, this model is aimed at helping Sainsbury's to redesign its
stores so as to generate greater customer throughput, reduce inventories
and shorten the time that products are on the shelves.

In both stock market and supermarket, the agents represent individual
people. A quite different type of business simulation emerges when the
agents are companies and the model is one of an entire industry-which
brings us back to insurance. Over the past couple of years, I and
colleagues at the Santa Fe Institute and Complexica, also in Santa Fe,
have designed an agent-based model of the world's catastrophe insurance
industry.

As a crude first cut, the insurance industry can be regarded as an
interplay between three components: firms which offer insurance, clients
who buy it, and events which determine the outcomes of the "bets" placed
between the insurers and their clients. In "Insurance World", the agents
are primary insurers and reinsurers, the firms that insure the insurers,
so to speak. This world can be perturbed by natural events, such as
hurricanes and earthquakes, as well as factors such as changes in
government regulations, which alter the ground rules of the insurance
game, and global capital markets, which govern the availability of funds.

So what is Insurance World good for? Insurers and reinsurers talk
incessantly about getting a better handle on uncertainty, so they can
assess their risk more accurately and price their products more
profitably. Yet it's self-evident that if everyone had perfect
foreknowledge of natural hazards, this would spell the end of the
insurance industry. On the other hand, complete ignorance of hazards is
also pretty bad news, since it means there is no way to weight the bets
the firms make and price their product. This suggests that there is some
optimal level of uncertainty at which the insurance companies (though
perhaps not their clients) can operate in the most profitable and
efficient fashion. With Insurance World, we hope to be able to find this
optimal level, and whether it varies between firms. Does it, for example,
vary between reinsurers, primary insurers and/or customers?

Another question to ask is which of the standard metaphors used to
characterise organisations-a machine, a brain or an organism, for
example-most accurately represents the insurance industry. And how is this
picture of the organisation shaped by the "rules" used in the boardrooms
of the companies that make up the industry? Understanding which metaphor
works best should help to uncover good rules for operating those firms.

The simulator calls for the decision makers of each firm to set a variety
of parameters, such as their desired market share in certain geographical
and/or commercial sectors and the level of risk they want to take on. They
also have to estimate economic parameters such as future interest and
inflation rates, and assess the likelihood of hurricanes and earthquakes.
The simulation then runs for 10 years in steps of three months, at which
time a variety of outputs can be examined.

Diagram: Five virtual insurance companies with not quite equal market
shares fight it out. Within six years, the leading firm (in blue) has all
but squeezed the others out.

For instance, the Diagram shows how the market for hurricane insurance
around the Gulf of Mexico is split between five primary insurers in this
toy world. The initial market shares were almost identical-but not quite.
In this experiment, firm 4 has a slightly larger initial market share than
any of the others, an advantage that it uses to squeeze out the other
firms. This is not a result of a better premium-setting strategy or any
other business tactic, but is solely down to the "brand effect", in which
buyers tend to purchase insurance from companies they know about.

Large-scale, agent-based simulations like the three described here are in
their infancy. But they clearly show how computers can create laboratories
for doing experiments that have never been possible before. These
experiments are exactly the sort called for by the scientific method: they
are controlled and repeatable. So, for the first time in history, we have
the opportunity to create a true science of human affairs. The consequence
could be studies of, say, the mechanisms underlying revolution or how
racism takes hold of an institution. If I were placing bets on the matter,
I'd guess that the world of business and commerce will lead the charge
into this entirely new science. 

>From New Scientist, 24 April 1999
---<cut>---

  |    Ling Lo (living life in mono)
_O_O_  kllo at iee.org




_______________________________________________
MUD-Dev maillist  -  MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev




More information about the mud-dev-archive mailing list