# Chaos and Fractals in Financial Markets

## Part 3

### Hazardous World

Many things in life are random. They are governed by probability, by chance, by hazard, by accident, by the god Hermes, by fortune. So we measure them by probability—by our one-pound jar of jam.

Places where there is more jam are more likely to happen, but the next outcome is uncertain. The next outcome might be a low probability event. Or it might be a high probability event, but there may be more than one of these.

Radioactive decay is measured by probability. The timing of the spontaneous transformation of a nucleus (in which it emits radiation, loses electrons, or undergoes fission) cannot be predicted with any certainty.

Some people don’t like this aspect of the world. They prefer to believe there are "hidden variables" which really determine radioactive decay, and if we only understood what these hidden variables were, it would all be precisely predictable, and we could return to the paradise of a Laplacian universe.

Well, if there are hidden variables, I sure wish someone would identify them. If wishes were horses, David Bohm would ride. Albert Einstein liked to say, "God doesn’t play dice." But if God wanted to play dice, he didn’t need Albert Einstein’s permission. It sounds to me like "hidden" is just another name for probability. "Was it an accident?" "No, it was caused by hidden forces." Hidden variable theorists all believe in conspiracy.

But, guess what? People who believe God doesn’t play dice use probability theory just as much as everyone else. So, without further ado, let’s return to our discussion of probability.

Coin Flips and Brownian Motion

We can create a kind of Brownian motion (or Bachelier process) by flipping coins. We start with a variable x = 0. We flip a coin. If the coin comes up heads, we add 1 to x. If the coin comes up tails, we subtract 1 from x. If we denote the input x as x(n) and the output x as x(n+1), we get a dynamical system:

x(n+1) = x(n) + 1, with probability p = ½
x(n+1) = x(n) – 1, with probability q = ½ .

Here n represents the current number of the coin flip, and is our measure of time. So to create a graph of this system, we put n (time) on the horizontal axis, and the variable x(n) on the vertical axis. This gives a graph of a very simple type of Brownian motion (a random walk), as seen in the graphic below. At any point in time (at any value of n), the variable x(n) represents the total number of heads minus the total number of tails. Here is one picture of 10,000 coin flips: Much of finance is based on a simple probability model like this one. Later we will change this model by changing the way we measure probability, A Simple Stochastic Fractal Using probability, it is easy to create fractals. For example, here is a dynamical system which creates a Simple Stochastic Fractal. The system has two variables, x and y, as inputs and outputs: x(n+1) = - y(n)y(n+1) = x(n) with probability p = ½ , but x(n+1) = 1 + 2.8*(x(n)-1)/(x(n)*x(n)-2*x(n)+2+y(n)*y(n))y(n+1) = 2.8*y(n)/(x(n)*x(n)-2*x(n)+2+y(n)*y(n)) with probability q = ½. We map x and y on a graph of two dimensions. If the coin flip comes up heads, we iterate the system by the first two equations. This iteration represents a simple 90-degree rotation about the origin (0,0). If the coin flip comes up tails, we iterate the system by the second two equations. This second type of iteration contracts or expands the current point with respect to (1,0). To see this Simple Stochastic Fractal system works in real time, be sure Java is enabled on your web browser, and click here.  Simple stochastic dynamical systems create simple fractals, like those we see in nature and in financial markets. But in order to get from Bachelier to Mandelbrot, which requires a change in the way we measure probability, it will be useful for us to first think about something simpler, such as the way we measure length. One we’ve learned to measure length, we’ll find that probability is jam on toast. Sierpinski and Cantor Revisited In Part 2, when we looked at Sierpinski carpet, we noted that a Sierpinski carpet has a Hausdorff dimension D = log 8/log 3 = 1.8927… So if we have a Sierpinski carpet with length 10 on each side, we get N = rD = 10D = 101.8927 = 78.12 smaller copies of the original. (For a nice round number, we can take 9 feet on a side, and get N = 91.8927 = 64 smaller copies.) Since each of these smaller copies has a length of one foot on each side, we can call these "square feet". But really they are "square Sierpinskis", because Sierpinski carpet is not like ordinary carpet. So let’s ask the question: How much space (area) does Sierpinski carpet take up relative to ordinary carpet? We have 78.12 smaller copies of the original. So if we know how much area (in terms of ordinary carpet) each of these smaller copies takes up, we can multiply that number by 78.12 and get the answer. Hmmm. To calculate an answer this question, let’s take the same approach we did with Cantor dust. In the case of Cantor dust, we took a line of length one and began cutting holes in it. We divided it into three parts and cut out the middle third, like this: ```0__________________________________________________1 0________________1/3 2/3_______________1 ``` That left 2/3 of the original length. Then we cut out the middle thirds of each of the two remaining lines, which left 2/3 of what was there before; that is, it left (2/3)(2/3), or (2/3)2. And so on. After the n-th step of cutting out middle thirds, the length of the remaining line is (2/3)n. If we take the limit as n ® ¥ (as n goes to infinity), we have (2/3)n ® 0 (that is, we keep multiplying the remaining length by 2/3, and by so doing, we eventually reduce the remaining length to zero).  So Cantor dust has a length of zero. What is left is an infinite number of disconnected points, each with zero dimension. So we said Cantor dust had a topological dimension of zero. Even though we started out with a line segment of length one (with a dimension of one), before we began cutting holes in it. Well. Now let’s do the same thing with Sierpinski carpet. We have an ordinary square and divide the sides into three parts (divide by a scale factor of 3), making 9 smaller squares. Then we throw out the middle square, leaving 8 smaller squares, as in the figure below:  