Monday, February 6, 2012

minority games

I have an essay just published in Bloomberg. The essay is quite short and I wanted to give interested readers a few more details and links to further reading on the subject: how to build simple yet plausible models of financial markets. Hence, this post.

Traditional models of markets in economics work from the idea of equilibrium. What happens in the market is assumed to reflect the interplay of two things: 1. the decisions of countless market participants who act more or less rationally in their best interests, their actions collectively bringing the market toward a balance in which stocks, bonds, or other instruments take their realistic "fundamental" values (or at least something close to those values), and 2. external shocks that hit the market in the form of new pieces of information concerning businesses, political events, changes in regulations, technological discoveries and so on. Without shocks from outside, these models imply, the market would settle down (very rapidly it is assumed) into an unchanging state. Everything that happens in the market, this perspective asserts, can be traced to new information perturbing that balance.

I've written before (here, for example, and here) about the considerable evidence against this picture. This includes many large market movements that occur in the absence of any apparent "shock" to the market, and "excess volatility" -- a general tendency for market prices to move more than they should by any rational reckoning of their true value. Many studies have established strong mathematical regularities in market fluctuations that reflect this excess volatility, including the fat tailed statistics of market returns and the long memory of returns -- the way markets absorb information, empirically, doesn't seem to be fast at all, but involves a long slow process of digestion stretching over a decade and more.

So, how to build models that go beyond this equilibrium picture? If the simple notion of equilibrium is too simple to explain market reality, why not non-equilibrium models? That is, models of markets in which the individuals' actions, even in the absence of outside shocks, never lead the market to settle down into some equilibrium balance. Rather, people might instead perpetually change their ideas and strategies, interacting in a way that gives the market a rich internal dynamics, much as the weather. Studies of very simple two player strategic games actually show that this kind of outcome should be expected in any case in which the decisions facing individuals are quite complex and not open to simple rational solution -- that is, in other words, in most cases (and obviously in the case of any real world market).

Science often makes progress by posing toy models that capture the logical essence of some problem. By struggling with it, people learn new ways of thinking. In my Bloomberg column I touched on one of the toy models that has recently inspired non-equilibrium models of markets. This is the so-called El Farol Bar problem invented by economist Brian Arthur in1994. The original paper is still well worth a read; it's one of those papers that puts forth an idea so sound and plausible that it seems obvious, and it is hard to believe that its ideas were revolutionary and against everything in mainstream economic habit. To this day, this remains true. But enough background.

My Bloomberg column gives a rough introduction to the idea of the bar problem -- it is an archetype of a situation in which it is not possible for people to make decisions through rational deliberation, but rather have to take a more practical approach, forming hypotheses and theories, and learning from experience. The result is a dis-equilibrium situation that continues to evolve in time, never settling into an equilibrium. There are plenty of articles giving more detailed synopses of the model and how it works.

But the essence of the bar model has since then been explored in much greater detail through another model -- the so-called minority game. It's just the bar model stripped down to be as simple as possible while still preserving the essential element that no one in the game can "figure it out." There is no strictly rational way to play; intelligent play requires perpetual adaptation and learning. The minority game is probably the simplest mathematical model of a market in this sense. It is, of course, too simple to be anything more than a toy model. But it is, at least, a toy model looks a lot more like real markets than does the EMH or anything else in economics. And the benefit of its relative simplicity is that it is possible to see how various fundamental factors influence how it works, without thousands of other potential complications that obscure matters.

So --what is the minority game?

Arthur assumed that people would enjoy the bar is 60% of less attended, and would be miserable if more than 60% attended. The minority game simplifies the cutoff to 50%, giving symmetry to the problem -- now the people who do well on any week are those who act so as to be in the minority (going when most others stay home, and vice versa). The minority game also dispenses with the story of the bar. Just let each N agents on each play choose either 1 or -1, with those in the minority gaining some payoff (let N be odd). Now let them play many times. Each agent just goes along trying each time to be in the minority. How does one do that?

Of course, everything hinges on how we suppose the agents play. Following Arthur, the typical approach is to suppose that they use some kind of trial and error learning. The record of outcomes of the game is given by some sequence of 1s and -1s -- these giving the winning choices that would have been in the minority in each instance. For example, the last 5 outcomes might be 1,1,-1,-1,1. A "strategy" in the minority game associates every such recent history with a choice of what to do next -- a choice of 1 or -1. A strategy may say that IF (1,1,-1,-1,1) THEN choose 1, or instead IF (1,1,-1,-1,1) THEN choose -1. If we suppose that agents look back to the past M outcomes in trying to forecast the future (this is often referred to as their "brain size"), then there are P=2M different histories that the agents can resolve or discern. A strategy, mathematically speaking, is a map or association that assigns a choice 1 or -1 to each and every one of the possible P=2M different histories. A strategy is a plan for action, if you will, an IF...THEN statement of what to do for every possible sequence of happenings (at the level the agents can perceive).

Now, since each possible sequence can be associated with 1 or -1, there are actually 2P or 22M different possible strategies. Even with M as low as 5, this is already 232 which is well over one trillion different possible strategies. It grows extremely fast as M gets bigger.

The way the minority game is played is that, at the outset, each one of the players gets assigned a number S of these strategies at random. You can think of this as their intellectual inheritance. It's a collection of S different "ways to think" about how to predict the world. (The interesting properties of the model do not depend on this choice.) Agents use these strategies to play the game, and keep track of which strategies seem to work well, and which ones don't. This is generally done through some simple algorithm wherein each strategy in an agent's bag gains a point when it makes a good prediction, and gets docked a point if it predicts incorrectly. On each play, the agents look into their bag and play the strategy with the highest score. This is like a person mulling over the various theories in their head, and using the one that seems to have been most successful in the past.

So that's it. You have a collection of agents using simple learning dynamics to try to predict the future based on the past. They try at each moment to choose what most others will not choose. Clearly no one strategy can emerge as the winner, because if it did and everyone started using it then they would all be in the majority, and all be losers. Successful strategies, therefore, sow the seeds of their own demise. This is what makes the game interesting. But wait -- how is this linked to markets?

Qualitatively, the minority game is a little like a market. It's a situation in which each person tries to profit by choosing the right strategy, but where what is "right" is determined by the collective actions of everyone together. There is no "right" independent of what others do. The minority game, like any market, is a game involving an enormous and complex ecology of interacting strategies. Except there is no price. A minor addition can change that, however.

We get the simplest crude model of a market if we think of those choosing 1 as "buyers"  and those choosing -1 as "sellers" of some stock. Naturally, more buyers than sellers drives a price up, and an imbalance the other way drives it down. Mathematically, you can take the change in the logarithm of the price (the return) at time t as being proportional to Number(buyers) - Number(sellers). The resulting price has a highly erratic behaviour that very roughly resembles the movements of financial markets. In particular, even without any external information hitting the market, no shocks from outside or perturbations of any kind, the price fluctuates up and down unpredictably merely through the perpetual evolution of the agents' trading strategies. One day, apparently caused by nothing, the price may suddenly drop by 10% -- all because many agents chose to sell just as a part of trying to predict what was about to happen next.

This post has already gone on long enough. For lots of detail, I highly recommend this excellent review of the minority game by Tobias Galla, Giancarlo Mosetti and Yi-Cheng Zhang, which I highly recommend (Zhang is one of the co-inventors of the minority game). There is a great deal more to say, but two points are most important for now:

1. This simplest version of a minority-game market does NOT give rise to the so-called "stylized facts" of real markets -- the fat tailed statistics of return distributions, and the long memory and persistence of market volatility. In fact, the returns for this simplest minority game market are Gaussian, at least when the number of players is large. However, this model is only a beginning, and these stylized facts emerge quite naturally as soon as one includes a few more realistic features. For example, in this version of the game, every agent must either choose 1 (buy) or -1 (sell) at each moment. Hence, the volume of trading is always the same; it is forced to be fixed, which is of course completely unnatural.

An easy way to relax this is to give the agents the ability also to abstain -- they might just hold what they have, neither buying or selling. This can be included with some measure of confidence, whereby an agent doesn't trade unless one of its strategies has been very successful in the recent past. This immediately leads to a market with fluctuations in volume, and this market does turn out to have stylized facts much like those of real markets, with fat tailed returns and long memory. Another way to allow for a fluctuating volume is to let the agents accrue wealth over time, and let the volume of their trading grow in proportion to that wealth. Again, this is an obvious step toward reality, and again leads to market fluctuations with many of the rich statistical features seen in real markets, even in such simple models.

2. The other important point is that the minority game is so simple that it can be solved with some analytical techniques borrowed from physics. The details aren't so important, but the results show a fascinating behaviour in the market with a kind of phase transition separating two distinct regimes of behaviour. The picture that emerges gives a beautiful coarse grain understanding of markets as ecologies of interacting agents.

The basic story is that one key parameter in the minority game determines its overall character. The parameter is α=P/N, where N is the number of agents in the game. If this is small, then there are lots of players relative to the number of different market histories they can perceive. If this is big, then there are many different possible histories relative to only a few people. These two extremes lead to very different market behaviour and it's not hard to see why.

The figure below (from the Galla et al paper) shows what is effectively the market predictability as a function of this parameter α=P/N. In other words, this shows how much a past record of prices can be used to make accurate predictions of future prices. For large α, this predictability is positive, and it grows as α grows. Why? In principle, this kind of predictability ought to make for easy success in the game. But only if the agents' have enough flexibility in their behaviour to pounce on the pattern and exploit it. In this regime, it happens frequently that patterns emerge in the prices and yet no agent has the intellectual capacity to exploit it. Recall that each individual is given a random set of strategies to work with. With very few people in the market, that means very few strategies relative to the many possible market histories on which the agents make their decisions. In short, if the diversity of agents and their behavioural strategies is insufficient to let them jump on all possible patterns, the market retains a degree of predictability.


For the opposite limit, α small, things look very different. Now we have an oversupply of agents and strategies in play relative to the number of discernible histories. Now it is very likely that any predictable pattern will suit some agent's bag of strategies, and that agent will jump on it, profit, and their activity will tend to wipe out that pattern. This phase looks rather like the efficient market -- such a rich diversity of agents with different skills and mindsets that any predictable patterns are immediately washed away.

One of the most interesting conjectures emerging from this picture is that real markets are probably something like "marginally efficient", at least much of the time. If fully efficient and hence unpredictable (many agents in the market, low α), then it's very hard to make profits in the market. This should make the market less attractive and some people should leave to do something else. But as the number of people falls, this pushed the market toward higher α and into the inefficient phase in which the market becomes predictable. This should in turn attract more people into the market to profit from easy patterns. In this simple picture, the market should tend to evolved toward a value of α where the predictability of prices is low but not zero, making it hard but not impossible to find patterns in the market. This is, judging in a loose non-scientific way, just about where markets often seem to be.
Works on the minority game now number on the thousands, and I only wanted to get across the most basic points. It's a beautiful simple model that captures a great deal of the qualitative character of markets, and with further changes can be taken step by step toward more sophisticated models of markets. There's no reason to stick to idea that payoff go to those in the minority. The game has generalized, for example, to majority type games (where  trend following pays off) or mixed majority-minority games (where market reversion and trend following both play a role). A few steps further and you can forget the game itself and simply model markets as systems in which people interact with various trading strategies, each buying and selling, and where prices move through their collective action. Lots of models study a simple mixture of fundamentalists, who try to trade on the base of real information about stocks, and trend followers who ride the momentum. Computing power and imagination present the only limits.

I'm going to explore some of these more sophisticated models in future, but the minority game remains extremely important precisely because of its simplicity. That simplicity allows full analysis leading to the picture of two phases shown above. But this is already considerably more complex than market models based on assumed fully rational behaviour. It's crude, very much so, but a small step in the right direction.


  1. Hello Mark, this is fascinating. Thank you. What happens when we leave financial markets behind for a moment, and apply these insights to real markets, i.e. manufacturing for export/re-export.

    Real world strategies would or could be developed to take advantage of certain outcomes, so that over time there would be fewer and fewer players.

    Except as relative profits rise, it may not be possible for new players to enter (or re-enter) the competitive market due to barriers to entry, i.e. state-sponsored capitalism and access to soft loans, non-tariff barriers, or the destruction of local manufacturing hubs due to outsourcing or off-shoring.

    This could over time lead to much less market competition than traditional models would predict based on free trade and free entry/exit from markets.

    Basically, the +1 outcome is producing anything China Inc. needs to buy, while the -1 outcome is producing anything China Inc. wants to sell. The +1 outcome is really becoming the minority. Cheers.

    1. Sorry, I meant based on comparative advantage and free entry/exit from markets.

    2. It is an effective article. First time, i heard about that game and after reading your post my views about market changed. great work!
      uk dissertation writers|dissertation writing service|good dissertation writing

  2. Hello,
    Excellent post, I really enjoy reading this article, thank you so much for sharing it.
    assignment help
    assignment help australia

  3. Hi,
    This is really great work. Thank you for sharing such a useful piece of information here in the blog.
    Assignment Help UK
    Assignment Writing Help UK

  4. I just heard about the bar game for the first time in your article on Blooomberg. It really changed my view on the market, since I believed in an equilibrium. Funny to see how plain the model actually is that just made me rethink my whole point of view.

  5. I'm really impressed with your article, such great information you mentioned here. Cheap Essays

  6. I personally like your post; you have shared good insights and experiences. Its sounds exciting and it will really help me a great deal. Cheap Essay Writing

  7. This is a Great Website You might find Fascinating that we Motivate A person. Paper Writing Services

  8. it talks about Financial budgets market and all related topics to Finance it is good knowledge to convey the blogger.dissertation writing service uk || pay for dissertation || buy a dissertation

  9. I think that this blog is really cool .so please visit my this site and get collection information. Custom Essays

  10. Hi! This is my first visit to your blog! We are a team of volunteers and new initiatives in the same niche. The blog gave us useful information to work. You have done an amazing job!
    Advertising agencies in UK | Mobile apps for university

  11. No one can write like this that's important for Physic Finance is not an easy task but everybody can try best we also provides essay on these type of subjects that you can follow here. write essay – essay villa

  12. Challet and Zhang introduced Basic Minority Game (MG) in 1997. It is an awesome post.UK dissertation services|dissertation writing services UK

  13. Enjoyed every bit of your blog post.Really looking forward to read more. Fantastic.
    buy dissertation in cheap rates

  14. custom essays
    I loved the way you discuss the topic great work thanks for the share.

  15. Cheap Essays
    Wow Amazing post really informative thanks for the great post.

  16. Wow amazing stuff I really enjoyed thanks for the amazing stuff.
    Cheap Essays

  17. Thanks for sharing your reviews about Dissertation Writing Services UK which will sure help me to improve my Dissertation Writing Services in its best way and making its quality best.

  18. Thanks so much for this wonderful website as well as this post. This post is the kind of thing That keeps me on track through.WritingEssay | Professional Dissertation Writers

  19. It is the first i read some thing about bar game. You can see dissertationwritinguk for best dissertation writing services online.

  20. Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post with people..
    Financial Beratung Schweiz

  21. Great... i found your website from google
    Big Tent

  22. Its such a nice article. I really like this blog.

    Assignment Help

  23. Hi,This post is really informative and you have posted such precious and informative article which gave me lot of information. I hope that you will keep it up and we will have more informative and helping news from you. Thanks
    online essay writing

  24. Hi, I think u have posted the best article according to information. keep it up I will be glad to see such informative and helping article from u. very useful information.. thanks for sharing
    assignment writing services

  25. Thanks for this great post, i find it very interesting and very well thought out and put together.
    Clash of clans hack

  26. I would like to thank you for presenting a very insightful informative post. Thanks
    Best Dissertation Writing Service

  27. I am very agitated that I have discovered your post because I have been penetrating for some information on this for about two hours. You have helped me a lot undeniably and by

    reading this article. I have found much new and valuable information about this subject. I was guessing if you could write a little more on this subject? I’d be grateful if you

    could involved a little bit more.
    Thanks for sharing it.
    this website provide dissertations

  28. this is really interesting blog and very useful things and information. thanks for sharing.....

    Assignment Help

  29. I am very agitated that I have discovered your post because I have been penetrating for some information on this for about two

    hours. You have helped me a lot undeniably and by reading this article. I have found much new and valuable information about this

    subject. I was guessing if you could write a little more on this subject? I’d be grateful if you could involved a little bit

    Thanks for sharing it.
    Online writing services london -

  30. Nice. I think you keep it continue. I am enjoying your blog.

    Assignment Help


  31. Hi, I think u have posted the best article according to information. keep it up I will be glad to see such informative and helping article from u. very useful information.. thanks for sharing
    Buy cheap dissertations from

  32. I am very agitated that I have discovered your post because I have been penetrating for some information on this for about two hours. You have helped me a lot undeniably and by reading this article. I have found much new and valuable information about this subject. I was guessing if you could write a little more on this subject? I’d be grateful if you could involved a little bit more.
    Thanks for sharing it.
    cheap dissertation writing services UK

  33. I just wanted to say that I found your site via Goolge and I am glad I did. Keep up the good work and I will make sure to bookmark you for when I have more free time away from the books. Thanks again!
    cheap essay writing service uk


  34. Hi, I think u have posted the best article according to information. keep it up I will be glad to see such informative and helping article from u. very useful information.. thanks for sharing.
    click here for details about affordable assignments

  35. This is an excellent post I seen thanks to share it. It is really what I wanted to see hope in future you will continue for sharing such a excellent post.
    Jakarta Wedding Photography

  36. Hi, I think u have posted the best article according to information. keep it up I will be glad to see such informative and helping article from u

    hope u will also like our quality paper writing

    for more visit

  37. I just wanted to say that I found your site via Goolge and I am glad I did. Keep up the good work and I will make sure to bookmark you for when I have more free time away from the books. Thanks again!dissertation writing services


  38. I was working and suddenly I visits your site frequently and recommended it to me to read also. The writing style is superior and the content is relevant. Thanks for the insight you provide the readers!
    cheap assignment writing service

  39. This is really great work. I really enjoy reading this article. Thank you for sharing such a useful piece of information here in the blog.
    Dissertation Help
    Dissertation Writing UK

  40. This article gives the light in which we can observe the reality. This is very nice one and gives indepth information.Cortinas de Cristal Marbella

  41. Finance and economics my favorite subject but the first time I have seen in different way.

    case study assignment help
    Mba assignment help
    assignment provider australia