Cellular Automata for Financial System and its randomness

by Tan Ma

 

Home | Links | Applets | Papers | Class Plan | Team

 

Cellular Automata for Financial System and its randomness

 

 

 

Introduction

In Dr. Wolfram’s book, he mentioned how Cellular Automata can apply to Financial Market. I think the most obvious future is how to predict the randomness of all Financial Markets. One of the most important futures of Cellular Automata is modeling Financial Markets. With the traditional way, we use mathematics, with its emphasis on reducing everything to numerical functions and use mathematic calculations and outcome to simulating market. But the most difficult thing is how we can predict the randomness by using economic theories or mathematic functions. Practical experience suggests that particularly on short timescales much of the randomness is purely a consequence of internal dynamics in the market, and has little to do with the nature or value what is being trade.  In Dr. Wolfram’s book, he give us good explain the Mathematica and origin of randomness.  This give us an idea of why we can not predict the randomness of Financial Market even we reduce all environment condition that would infect the Financial Market to minim. In this paper, we will review Dr. Wolfram’s Cellular Automata and its randomness rules. And apply this into Financial Market using simplest Investors’ behavior; study the effects of various elements of investor behavior on market dynamics and asset pricing by using Cellular Automata.   

 

What are the Cellular Automata and its randomness rules?

Cellular Automata can discrete dynamical system with simple construction but complex self-organizing behavior. This behavior is completely specified in terms of local relations who at each step each cell computes its new state from that of its close neighbors. Evidence is presented that all one-dimensional cellular automata fall into four distinct universality classes. Three classes exhibit behavior analogous to limit points, limit cycles and chaotic attractors. The fourth class is probably capable of universal computation, so that properties of its infinite time behavior are undecided. The different classes of cellular automaton behavior allow different levels of prediction of the outcome of cellular automaton evolution from particular initial states. In the first class, the outcome of the evolution is determined (with probability 1), independent of the initial state. In the second class, the value of a particular site at large times is determined by the initial values of sites in a limited region. In the third class, a particular site value depends on the values of an ever-increasing number of initial sites. Random initial values then lead to chaotic behavior. Nevertheless, given the necessary set of initial values, it is conjectured that the value of a site in a class 3 cellular automaton may be determined by a simple algorithm. On the other hands, in class 4 cellular automata, a particular site value may depend on many initial site values, and may apparently be determined only by an algorithm equivalent in complexity to explicit simulation of the cellular automaton evolution. For these cellular automata, no effective prediction is possible; their behavior may be determined only by explicit simulation.

 

Dr. Wolfram’s Simple rule for Financial Market

In the financial world, most simulation models in economics and finance assume that investors are rational. However, experimental studies reveal systematic deviations from rational behavior. How can we determine the effect of investors' deviations from rational behavior on asset prices and market dynamics? By using Cellular Automata, we assume investor behavior and to model it as empirically and experimentally observed. This can be explained by investors' quasi-rationality. Being able to predict how people will invest and setting asset prices accordingly is inherently appealing, and the combination of Cellular Automata and statistical mechanics can make such modeling possible.

Base on Dr. Wolfram understands. In the most naïve economic theory, price is a reflection of value, and the value of an asset is equal to the total of all future dividends. The prices are in fact determined not by true value, rather by the best estimates of that value at any time.  For Example, the stocks we trade are not equal to the real asset of company. Instead, stocks are determined by the company performance, earnings, and investor’s confidence…etc. The estimates of value are affected by many events that go on in the world.  In Financial Market, people try identified every situation and take that as input into Financial Simulate Model, but turns out it is still unpredictable. Even we could identify all situations, and speculate we trade without any significant external input, but the result is still random fluctuation. It is hard to understand why there should be any significant fluctuations in prices at all. We ask ourselves “Is the random fluctuation inevitable?” May be not, here is example: In negotiation between two parties, we often see that in the beginning, the prices of two parties will offer are very far from each other. But it is common to see fairly smooth convergence to a final price that both parties will satisfy. For large number of parties, we can get same result simply by construct some algorithms that operate between them. So why in financial market, which originate as a trade place for multiparty, could not get such smooth out result? In his book Dr. Wolfram gives us an example viewing a market as being like simple 1-Dimensional Cellular Automata.  Each cell corresponds to single trading entity choose to buy or sell at that step. The behavior of a given cell is determined by looking at the behavior of its two neighbors on the step before. According his strategy, if both neighbors buy, the investor will sell. If either neighbor buys, the investor will buy too. If both neighbors sell, the investor will sell. The Market price is the running difference of the total numbers of buying and selling at successive steps.

buy

 

buy

buy

 

sell

sell

 

buy

sell

 

sell

 

sell

 

 

buy

 

 

buy

 

 

buy

 

 

The plot below gives us a market price the running difference of the total numbers of buys and sells.

Although the behavior of the system running on very simple rule, but the plot above looks in many respects random. 

 

 

Cellular Automata for Simple Financial Market

 

Base on Dr. Wolfram’s model to simulating Financial Market as a minimal idealization one which tries viewing a market as being like a simple 1-D Cellular Automata. We can come out some strategy more close to real market. The main force that drives the Financial Market is Consumer Confidence, when Consumer Confidence is high, the market is in Bull Market, every entity is in buying stage, and the price of stocks going up. When Consumer Confidence is low, the market is in Bear market, every entity is in selling stage, and the price of stocks going down. Base on this we develop Cellular Automata rules that the color of the cell at a particular step specifies whether that entity chooses to buy or sell at that step. We can imagine the way that information flows in a market, for example the cells looking at its neighbor’s behavior to determine its own activity. So we have:

 

Bear Market Strategy

What this Cellular Automata rule reflects in the real market is that if the stock market in bear market, when consumer confidence is very low. The investor only sees every one around him selling, so he sells too. Only time he is buying is when every one else buying. From CA side, the cell look both its neighbors, if both sides are buy, he buys. If either side is selling or both sides are selling, he sells.

buy

 

buy

buy

 

sell

sell

 

buy

sell

 

sell

 

buy

 

 

sell

 

 

sell

 

 

sell

 

 

The complete system behavior of Bear Market Strategy

 

The price movement

 

Bull Market Strategy

What this Cellular Automata rule reflects in the real market is that if the stock market in bull market, when consumer confidence is very high. The investor only sees every one around him buying, so he buys too. Only time he is selling is when every one else selling. From CA side, the cell look both its neighbors, if both sides are sell, he sells. If either side is buying or both sides are buying, he buys.

buy

 

buy

buy

 

sell

sell

 

buy

sell

 

sell

 

buy

 

 

buy

 

 

buy

 

 

sell

 

 

The complete system behavior of Bull market Strategy

 

 

 

The price movement

Another main force that infect the investor’s decision is it selves passed experience. Sometimes the trader’s passed experience gives them an instinct of what they should do in the Market environment. This together with the behavior of people around him makes his decision. Apply to Cellular Automata; the cell is not only looking at its neighbors states, but also look at itself passed state to determine its future color. So base on the Bear and Bull Strategy we already have, for example in Bull Market, we can come out the following new strategies:

buy

buy

buy

buy

buy

sell

sell

buy

buy

sell

sell

sell

 

buy

 

 

buy

 

 

buy

 

 

sell

 

 

buy

buy

buy

buy

sell

sell

sell

sell

buy

sell

sell

sell

 

buy

 

 

buy

 

 

buy

 

 

sell

 

 

buy

buy

buy

buy

sell

sell

sell

buy

buy

sell

sell

sell

 

buy

 

 

sell

 

 

buy

 

 

sell

 

 

buy

buy

buy

buy

buy

sell

sell

sell

buy

sell

sell

sell

 

buy

 

 

buy

 

 

sell

 

 

sell

 

 

 

buy

buy

buy

buy

buy

sell

sell

sell

buy

sell

sell

sell

 

buy

 

 

buy

 

 

buy

 

 

sell

 

 

buy

buy

buy

buy

sell

sell

sell

buy

buy

sell

sell

sell

 

buy

 

 

buy

 

 

buy

 

 

sell

 

 

The above, cells’ color is determine by both its neighbor and it’s previous color. Over all it shows the buy activity in the market.

 

Cellular Automata for Complicate Financial Market

 

In the real financial world, the values of socket market are determined by some complexity environment which different entities apply their own strategy. Instead we have same strategy apply to every one in above; we give each individual cell inside Cellular Automat its own strategy. And each individual’s trade strategy is changing according the environment. It is obviously in real world, if some one have good trading strategy, soon or late, every one else will following. It is so simple that term of good strategy is depending on how much you will make. So the price is determined globally by other people’s strategy change. So the investor not only looks the trade behavior of its neighbor but also the trader strategy of its neighbor. We looking in a timescales of order weeks or months---and in some cases perhaps even hours or days, the trade strategy can be as a sequence of trade behaviors. And the entity would be able remember its neighbors trade behavior in several pervious steps to make it decision. In the Cellular Automata world, we can use 2-D CA to modeling this activity. The cells starts look all neighbors around him to make trade decision with its own trade strategy.

 

Time---1 step

 

sell

sell

sell

sell

S/buy

buy

buy

buy

buy

 

Time---2 steps

 

sell

buy

sell

buy

sell

sell

sell

sell

sell