Wednesday, March 05, 2014

The Market is People

kw: book reviews, nonfiction, statistics, physics, stock markets

A financial market behaves like a small collection of quantum particles. This is my conclusion after decades of investing (sometimes lucky, sometimes not), and reading about them, from The Emergence of Probability and The Taming of Chance by Ian Hacking, to The Black Swan by Nassim Taleb and Beat the Market by Ed Thorp and Sheen Kassouf, and now The Physics of Wall Street: A Brief History of Predicting the Unpredictable by James Owen Weatherall. The shine isn't quite off Dr. Weatherall's first PhD yet—it is but half a decade—but already he exhibits a breadth of vision that sets him apart. He actually has two doctorates, in physics and in philosophy, so he has the kind of mind I like, not just thinking outside the box, but leaving all the boxes behind.

So why would he be interested in market analysis? For the same reasons a ton of physicists have had already: that is where the money is. Plus it has the un-ignorable allure of a challenge that is almost impossible, yet not quite. Given that many thousands of smart people have been trying to "beat the market" for, oh, half a millennium at least, a few have gotten rich, at least by chance, but rare indeed are those persons or funds who managed to stay ahead of the pack and get rich by actually betting on predictions that panned out, again and again. A physicist-run hedge fund called Renaissance is claimed to be one of them.

The bulk of the book is a history of statistical thought, as it developed over the past few hundred years, frequently in response to the desire to understand price fluctuations in markets for currency, commodities, or stocks and options of various kinds. The tools used for this began with the Normal (AKA Gaussian) distribution, the familiar Bell Curve. All kinds of additive phenomena obey Gaussian statistics, such as average height for men or women of a given ethnicity, or most famously, IQ. A particular Normally distributed population is completely described by a Mean (µ) and a Standard Deviation (σ). The shape is scalable, wider for large σ and narrow for small σ, but is otherwise fixed, so that 68% of the population is found within the range µ-σ to µ+σ, called the 1-sigma range; and the 2-sigma range encompasses 95% of the population. So, for IQ, at least among Euro-Americans, µ is standardized at 100 and σ at 15. Thus the range [70-130] includes 95% of these folks, and 68% are found in [85-115]. Public education was originally aimed at the 1-sigma group, and the rest were left to fend for themselves, until Special Education and Gifted Education movements arose to help out those in the "tails", whether duller or brighter.

Is the Normal distribution a good model of market fluctuations? Not at all. First, we must realize that human perception is involved. A $1 change in a $10 stock feels just as large as a $5 change in a $50 stock, particularly if you have 500 shares of the first one or 100 shares of the other. Both changes are 10% of your $5,000 investment. The chart below shows the day-to-day change of closing price for Coca-Cola common stock, since the beginning of 1986, expressed as a % of the prior day's closing price.


If we sort these numbers and plot them against a "Probability Ordinate", really an inverse Normal ordinate (I use the NORM.S.INV function in Excel 2010), we would get a scatter plot that closely follows a straight line if the distribution were Normal. But here is what we get instead:


If we extend a line tangent to the central part of the distribution, to -4σ or +4σ, it strikes at a 5% change, indicating that variations greater than this ought to be rare indeed (there are 7,101 daily changes plotted here). But what do we see instead? Going back to the original data sheet, I find 42 days on which the stock increased by 5% or more, up to nearly +20%, and 33 days on which it fell 5% or more, to nearly -25%. How'd you like to own a million shares of this stock and have it lose 1/4 of its value on a single day? So early on, the Normal distribution was found wanting.

Normal analysis was based on the concept of a random walk, also called the drunkard's walk. Its additive nature will always result in a distribution of final locations, say after ten staggers, that is Normal. So a different distribution with extra-wide excursions is needed. In an entertaining section, Dr. Weatherall describes a drunken firing squad. They have a target upon a very long wall, but being too drunk to point well, might shoot in any direction at all. Give them lots of ammunition (and hide somewhere until they run out), and the pattern of bullet holes will follow a Cauchy distribution. It looks a little like the Normal distribution, but has a pointier top, and most importantly, "fat tails"; that is, many points that are farther—or much farther—from the middle than a Normal distribution would predict. The distribution above is also fat-tailed, having lots of numbers outside the range we'd expect from a Normal distribution. To test a distribution for Cauchy behavior, plot it against a Tangent function evenly distributed in the range -π/2 to +π/2. For my 7,101 points, the Tangent function ranges from nearly -5,000 to +5,000, so the chart is thus:


The Cauchy distribution is clearly a bit too much, its tails are "too fat", compared to the tails of Coca-Cola daily price fluctuations. This kind of conundrum was tackled by many bright people, from Fischer Black to Benoit Mandelbrot. Mandelbrot probably came closest with fractal analysis, which wasn't wedded to integer exponents. But I got another thought as I read along.

The Normal and Cauchy distributions are related, being examples of Stable distributions. In one formulation, a parameter called α has a value of 2.0 for a Normal distribution, and a value of 1.0 for a Cauchy distribution. The fattest tails possible are at α=0, the Uniform distribution of infinite width. Mandelbrot had used fractal analysis to calculate a distribution with α of 1.7, closer to Normal but still with a fat tail. I realized that the most familiar distribution with at least one long tail is Lognormal, but it is confined to positive only values. Does it have a complex square root, perhaps? I sorted the squares of the KO daily changes and charted them against a Normal ordinate on a logarithmic scale. But there was a problem. On 245 days there was no change in price. Prior to the 1970s stocks were valued in 8ths of a dollar (12.5¢), and in pennies thereafter, though dividend allocations can be calculated to 0.0001¢ increments. Trades are reported to the nearest cent. Anyway, you can't take the logarithm of zero, so in my spreadsheet I used a value a little smaller than the smallest calculated nonzero value for those 245. They form the line at bottom left on this chart:


If trades were made with a continuous range of values, not limited by the minimum value, I would expect the left portion of the chart to be as linear as the rightmost. Quantization errors have artificially depressed the daily motion for about 15% of the trades. In the other charts, the two extreme values, -25% and +20%, seemed like outliers. Here, as the two rightmost data points, they are seen to be at most slightly larger than one might expect.

So, all you quants out there, working out the best formula for calculating risk. Give a little attention to the square root of the Lognormal distribution! Now, back to the book.

A key theme of the book is both the value and the danger of numerical models. A physicist understands that a model is always simplified, and cannot be appropriately used outside its range of application. When the people using models of financial systems, to set option prices and other instruments, are physicists, they will know this and avoid over-extending the model. People without physics education will not. When you have a black box program that seems to work magic, it is easy to use it everywhere (the parable of the man whose only tool was a hammer comes to mind).

There have been several major crashes in the past century, and only the one in 1929 was free of the influence of sophisticated statistical modeling tools. I say "sophisticated" because there were statistical tools in use a century earlier, but they were back-of-the envelope estimates at best. All of the more recent ones show at least traces of "broken model" influence, but the October 1987 crash was an overt "robo-trading" crash. This brings up another principle that physicists, at least, ought to keep in mind: the observer effect.

I am not just talking about Heisenberg Uncertainty. Rather, most observations of physical phenomena disturb the system being measured. I remember my father telling me not to check the air pressure in my bike tires so often, because each measurement caused some air to be lost. Later, working in electronics (in a time when the components were visible and manipulable by hand) I learned how to use a Wheatstone Bridge to measure DC voltage the most accurately, because it uses a counter-voltage to keep from bleeding extra current from the circuit. It is only good for very steady DC, of course. Thermometers change the temperature of the pot roast, but only a tiny bit; still the effect is not zero. But now imagine that you have half a million people whose livelihood depends on knowing the temperature in your pot roast, and they all insist on using their own thermometer. There won't be much left of the roast! THAT's what happened in October 1987.

The use of new tools changes the way markets work. What worked in September 1987 doesn't work today; what worked in 1997 or 2007 doesn't work now, and so forth. This pretty much negates the notion of an efficient market. It can only be efficient under two conditions:
  1. The traders have no supercomputers available.
  2. All traders are coldly rational.
Fat chance, right?

The "efficient market" works like this: In comparatively quiet times, the asking price of a stock or whatever incorporates all the current knowledge about things that might affect its value in the future. To profit from trading that instrument, you either guess it might be underpriced, because of unknown or little-known information, or you try to learn something nobody else knows. The most common source of such knowledge is cadging or coercing it out of an insider, which happens a lot even though it is illegal. Quantitative analysis attempts to find patterns in price fluctuations that signal a change you can profit from. When someone finds a useful pattern, he or his company will profit from it for a while, until others catch on, then pretty soon everyone can do it, and the market is "efficient" again. So quants' work is a continual arms race. Thus, the tools used to test the market change the market.

But the markets are not that efficient. In the medium term they might be, but the momentary trading picture is much more emotional, and tiny bits of information or rumor disguised as information can sway a trader's estimate of value. If that trader is influential, and others see him (usually male) make a move they didn't contemplate before, some will follow. It can cascade into a large market move, that might last a matter of an hour or less, but might last a day or more, and then there is the potential for quite a swing, either towards a bubble or a crash.

The fragility of any market lies in the tendency for all the quantitative trading firms to use the same models, or models based on the same math, with the same or very similar trigger points. Certain rules instituted after 1987 can calm the flurry to some extent, but the events of 2007 to early 2009 present a case in which the agony was simply drawn out over the space of more than a year, rather than taking place in a month or less.


With the contents of this book under my belt, I ask myself, "What is the ordinary investor to do?" We don't have supercomputers and armies of physics PhD's running sophisticated options evaluation software, trading 10-a-minute on our behalf. Dr. Weatherall doesn't tell us what to do. It isn't his business to do so. He is instead advocating for a kind of financial Manhattan Project to set an appropriate, physics-based replacement for the Consumer Price Index, whose flaws are politically grounded, very much on purpose (Oh, you thought it was objective?). As I said, his PhD's are still shiny and new. His next PhD needs to be in human nature, particularly the nature of the political human.

In the meantime, if you dare to invest in stocks, the advice of Will Rogers is still the best:
  1. Buy a stock.
  2. When it goes up, sell it.
  3. If it isn't going to go up, don't buy it.

No comments: