The Problem with Stock Path Generation

Recently I’ve been reading Benoit Mandelbrot’s book The (Mis)Behavior of Markets: A Fractal View of Financial Turbulence. Early in this book Mandelbrot discusses one major issue with the underlying assumption of certain financial simulations. In particular, he mentions the use of the bell curve (i.e. the normal distribution) to create random stock price movements when using stochastic models, such as geometric Brownian motion (GBM), to generate stock paths. In this post, I will discuss the issues that arise from using the normal distribution in this way and show the results of doing so when compared to actual movements of financial securities.

The problem with using the normal distribution to model stock price movements is that large movements in a stock (or commodity or derivative) play an above-average role in the movement of the security. Furthermore, there are more of these large movements than there should be, statistically. Some price movements, such as those during the “Covid Crash” of 2020, should have never happened in the history of humanity if using a normal distribution to model the price movements. However, movements of this magnitude have actually happened multiple times in the history of the stock market. Clearly, there is something wrong with the underlying assumptions.

To exemplify this, let’s generate a stock path via GBM and compare the simulated movements to actual historical movements that have occurred in the underlying stock. If you’d like to learn more about stock path generation via this method I have two posts on the topic: one which defines and implements the method and another which improves on the first. For this post, the implementation details will be taken for granted. Those interested can view the implementation (full code) in the referenced posts.

In actuality, we will generate 50 potential stock paths using GBM. Underlying GBM is a normal distribution parameterized by the mean and standard deviation of the stock’s historical price movements, which should make the simulated movements pretty accurate, right? Here are the 50 paths (along with some other data) generated via this method.

As seen in the upper left- and right-hand charts, the simulated stock paths look somewhat realistic. When presented price charts generated in this way along with actual price charts, it’s very difficult to determine the simulated from the actual. This makes the method very convincing as a legitimate financial tool. Let’s now take another look at essentially the same data but a different representation. Now, we will take one stock path generated via GBM and look at the daily percent changes. These movements are determined by the stochastic process in the GBM which, again, has an underlying normal distribution. For the actual price movements, this doesn’t seem to be the case.

Above, the plot with green bars shows 2 years (~504 trading days) of price movements for Apple stock. The bottom chart (with red bars) shows the price changes from a GBM simulation for the same number of trading days. Notice that the y-axis has the same scale for both plots. Although this is one example, taking any generated path and comparing it in this way produces a similar result.

There are two clear problems with the generated stock paths. The first is that the movements are just not “wild” enough. With real-world data, Apple’s stock price swings between much higher and lower daily price changes. The simulated stock price movements are much more centered around the mean.

The second is that the price changes in the generated distribution are more or less independent. Look particularly at the sections of the plots with the highest and lowest amount of volatility. In the generated stock path, periods of “high” volatility are sporadic, appearing every once in a while but with no real rhyme or reason. Compare this to the actual stock price movements. In this case, volatility seems to beget volatility. That is, high volatility in recent trading days is an indicator of further volatility (most wild price movements are clumped together).

Conclusion

Hopefully, this short post and these two graphs are convincing and interesting enough for you to give this topic a closer look. I would encourage anyone that is interested to take the sample code from the posts linked above and to generate their own GBM simulations. Once these simulations are created, the code below can be used to plot the percent changes as was done above. After doing so, it should be clear that generating stock price paths in this way is probably not a very useful tool. Fortunately, Mandelbrot also presents a solution in his book by way of fractal geometry (a branch of mathematics he personally created). The book is very approachable (there are not really any equations or any topics that are too complicated) and is very interesting. For the more mathematically inclined, Benoit Mandelbrot has many scientific publications on this topic (and others relating to fractal geometry/scaling) which are very interesting. These can easily be found on his Google Scholar profile.

Percent Change Comparison Code

Note that this (and the GBM code in the attached posts) requires the YahooFinanceAPI that I created and discussed in a previous post. This can easily be installed via pip.

Leave a Reply

Your email address will not be published.