Close Help Window 
Overview 
Consider a market with some number of traders. Initially, the wealth of each trader may be equal, or perhaps follows a selected distribution, e.g., exponential, uniform, or triangle.
On each turn, two randomly selected traders exchange money. We can also view this as flipping a coin to determine the winner of an amount bet. Over time, what happens to the relative wealth of the traders?
If the bets are small relative to the initial wealth of each trader, and the number of trading periods (trials) is relatively low, and all traders start with equal wealth, there will be a normal distribution of wealth.
This normal distribution occurs because it is relatively unlikely (although not impossible) that a given trader will "win" all trades or "lose" all trades, so either extreme of the bellshaped Gaussian distribution is unlikely: the wins and losses tend to cancel out in accordance with the central limit theorem.
Importantly, however, if the trades (bets) are not "trivially" small, and/or a large number of trading periods pass, some traders will go broke. In this simulation, this is an irreversible state (traders are not allowed to take on debt in the hope that their fortunes change). Consequently, wealth tends to concentrate in fewer and fewer traders, eventually leading to a stable single "winnertakeall" equilibrium state. This is not unlike Russian Roulette: eventually there is only one trader left standing. If the bets are nontrivial, e.g., potentially sized at the entire net worth of a trader, at any given time, traders may exit the market, further concentrating the initial wealth among fewer traders: the rich (in aggregate) get richer, and the poor get poorer. If the trades are bounded by the "poorer" trader's net worth (to prevent any trader going into debt), the distribution of wealth rapidly appears to follow an exponential or power law distribution. These modelsso called "yardsale simulations"and related variations are described in the chapter "Follow the Money," in "Group Theory in the Bedroom" by Brian Hayes. The original article appeared in American Scientist. The basis for the model is described in "Wealth Distributions in Asset Exchange Models," by Slava Ispolatov, Paul Krapivsky, and Sidney Redner references. 
Basic Flow  First, select the number of traders, which may range from 2 to 200.
Second, select the initial distribution of wealth. It may be constant (every trader has 100 units), uniform (traders have random initial assets uniformly distributed between 0 and 100 units), triangle (roughly equivalent to uniform, but sorted), or exponential (each trader has initial assets that are 95% of the next wealthier trader). Third, determine the amount traded. "Poor Random" means that the value at risk is a uniformly distributed fraction of the poorer of the two traders. "Poor All In" means that the poorer of the two traders is "going for broke" via a "double or nothing" approach. In other words, if they lose, their net worth will be zero, if they win, their net worth will double. Other choices include fixed amounts such as .1, 1, 5, 10, 20, etc., units of value. Fourth, run any number of Monte Carlo trials, where each trial entails a random selection of two traders, and the determination of a winner and loser. The amount won or lost depends on the rule selected, but in no case can be more than the lowest net worth of a trader. Consequently, the most that either trader can win or lose is the net worth of the "poorer" trader. You can run 1, 10, 100, 1,000 or 10,000 trials at the push of a button, and keeping the [ENTER] key on your keyboard depressed will repeatedly run that many trials. If the amounts at risk are large and the number of traders is low, very few trials are required to achieve substantial concentration. Conversely, if the lowest amount is selected (.1) and the maximum number of traders (200) is operative in the market, even after one or two million trials, there will be a normal distribution of wealth and the wealthiest trader will have only gained 25  30% of their initial asset value. Fifth, at any time, the results can be sorted to better visualize the nature of the distribution of wealth. If the "Keep Sorted" checkbox is checked, the evolution of the distribution of wealth may be easily viewed. On the other hand, not continuously sorting can help illustrate how an early leader may be overtaken. Finally, the percentage of total wealth of the leader may be viewed. While this tends to increase to 100%, this does not necessarily happen monotonically. For example, a trader with 50% of the total wealth may lose to a next wealthiest trader with 16.6% of the total wealth, resulting in two leaders each with 1/3 of the total wealth. 
About  This model was written by Joe Weinman in just over 300 lines of code, which are a mixture of HTML, DHTML, ASP.NET 2.0 / Visual Basic, stylesheets, and JavaScript, using Microsoft Visual Web Developer 2008. It has been tested in Firefox 3.0 (Mozilla 5), Safari 4.0, Internet Explorer 8.0, and on an iPhone 3G. 
