Did you wonder how the ‘fake’ stock prices in the previous blog were generated? Statisticians have long noticed that stock prices bump around in a way that can be described as a random walk.
Random walk is the technical name given to a statistical process where the object fluctuates in a totally unpredictable manner, much like the results from tossing a fair coin (the chance of each throw landing on a head (H) or tail (T) being equal to 0.5). As anyone who has thrown coins in their spare time knows, occasionally one sees ‘nice’ sequences like HHHH or TTTT and we are tempted to think that the coin has remembers the past and repeats it. Yet, the chance of a next coin toss giving a H or T remains at 50-50 (otherwise, yours is a biased coin).
Now, swap heads and tails for ‘up’ and ‘down’ for stock prices and the same cautionary tale applies. Thus, the fact that a stock’s price increased 4 days in a row is no guarantee that it will rise again on the 5th day (unless insiders in the firm have been accumulating the stock ahead of some unreleased good news).
The ‘fake’ stock prices in my previous blog were created using excel according to a certain specified random walk. You can download the excel program below to a picture of the randomly generated prices. The chart is dynamic in that every time you press F9 on your pc or Function F9 on your laptop, a new random price series will appear. Try it! You will see that these ‘fake’ prices have jagged ‘hills’, ‘slopes’ and ‘valleys’ that look pretty much like the real thing, except they were simulated.
Generating random walk for stock prices (excel)