About Me

Name: Andrews
Location: Riva, MD
Biography
Loading...

Create Your Own Blog Find Other Townhall Blogs

Comments

The Nonsensical Nature of Some Statistical Analysis

Back in college I took a course in "quantitative economics". Even back then I had read von Mises and was skeptical of the power to predict economic events numerically. Fortunately, most of the course was given over, not to predicting large trends, or attempting monetary manipulation, but more geared toward optimizing production, which can be handled, in the short term, through numeric analysis1. In fact, I was quite pleased to hear my professor adopt a healthy skepticism toward large-scale statistical analysis. Once, he mocked the government's "models" explaining that politicians either want models so complex they can't grasp them, or even better, so simple they think they are economic experts2.

The reason I mention this is that I was recently thinking about stocks, and especially the various methods used to predict the movement of specific stocks. In particular, I was thinking about the most common amateur method for stock prediction, the MACD analysis, that is the "Moving Average Convergence-Divergence" formula. What I wondered in particular was whether there was any validity to the method or whether it was more likely it was simply predictive because of one or two other factors, not related to any innate forces within the market. To be specific, was the MACD actually predicting a trend present in the market as a whole, a trend present in the market, but only under some conditions, or, was it not truly predictive, but seemed so as either (1) it was something that would always be true eventually, except under the most bizarre circumstances or (2) was true because so many believed in it that their behavior made it come true3.

For those unfamiliar with the method in question, MACD is a very simplistic method of stock analysis. The first step is to select a period over which a moving average is computer. Proponents exist for almost any number you could imagine, though multiples of five seem to have won in most cases, with those picking strange prime numbers seeming to have some cachet as well. In any case, a number of days is picked and the moving average is calculated, then the current value line is compared to the moving average line. If the average is above the moving average, it is predicted it will trend downward, if below, it is predicted it will trend upward. In other words, the method tends to argue that, while there can be long term movement, in the short term, the values tend toward the moving average.

Now, this is where one could argue that the method has some validity. The market, in general, does tend to have a pretty strong tendency toward the middle. When a stock falls too far, bargain seekers will buy it up hoping for a rally, and when it rises too high, those who bought it as a lower price will take their profits. So, in general, one could argue that the MACD simply represents a mathematical depiction of the mentality of market investors.

However, there are also clear exceptions. For example, during periods of rapid rise or fall it is quite possible for the accelerating rates of rise or fall to create moving averages which never approach the trend line for price. Or, in periods of heavy fluctuations, it is possible for both the price and moving average to be so senseless that the relationship of the two may have no bearing on price at all4. Not to mention that during chaotic days, the MACD may be of little use, as it tends to use a single aggregate from the daily figures (high, low, open, close, mean), while during a given day the figures could rise and fall wildly without being reflected in the subsequent MACD calculations5.

So, then the question arises, is MACD a predictive system which works on the market at all times, or does it apply only to certain market conditions, most likely markets which are relatively stable, or experiencing gradual, gentle changes?

And that leads to my next problem with the MACD, the inability to test it effectively. And, as a consequence of that question, we will also be led to my first real doubt about the MACD, the question of whether it is formulated in such a way that it is inevitably true, but not in any useful or meaningful sense.

But those statements clearly require some explanation.

I once took a philosophy course which concentrated on a most peculiar topic, the philosophical implications of parapsychology. Now the professor (Dr. Braude) was himself a strong believer in the paranormal, while I am a bit more skeptical (though I lack sufficient evidence against most of these topics to conclusively dismiss them, either -- see "Atheism's Circular Reasoning" and "Standard of Proof" for the problem I have with dogmatic "skeptics"). But, despite the professor's personal opinions, he was an honest teacher and presented the many arguments often offered against proofs of the paranormal, including poor test design. And one aspect that often arose was the problem that tests were designed in such a way that it was difficult to tell what was a hit and what was a miss6. In some cases it was easy. The tests done with the cards bearing four symbols provided an easy determination of "hit" and "miss". On the other hand, a test of precognition where a subject said "red" and the individual's house then burned down, is that a hit or a miss? What if he had said "hot"? Or "door"? What if the words were more clearly related? Or less? As you can see, it can be hard to tell what constitutes success. And a lot of the answer depends more on the individual's desire to find a hit or a miss than the real nature of the results.

And MACD seems to offer a similar problem.

The MACD system, as I described it, speaks in very vague terms. When a moving average and the price line diverge, the price will tend to move toward the moving average. That's it. No talk of time period, not talk of rate of change. just the idea that eventually the line will move back toward the moving average. At first glance it sounds rather meaningful, I will admit, but it becomes less and less meaningful as you start to ask questions. Today the price is 1% greater than the moving average, will it drop today? How much? The analysis has no answer. It just provides "tendencies".

And that was when I began to wonder if the MACD may be "true" for the simple reason that in almost all cases it will eventually prove true simply because of the way the market moves. I said before that the MACD may be valid because it incorporates the behavior of the market, but it may also be meaningless because it simply defines things so loosely it will always be true.

For example, let us suppose we draw a chart of coin flips. We set heads at 1 and tails at 0 and chart our total over the number of flips. I can say that at any given point, the line will tend toward the line Y=1/2X.  And it is true. Over a sufficiently long run, the numbers will average out to that value. However, if we take only a run of 10 or 20, we may see them diverge quite a bit before the numbers begin to move back toward that line. In fact, in some cases it may take a very long time for the numbers to come back. They will, eventually, but if you use that tendency to predict the upcoming flips, you are making a fool's wager.The tendency only works on a long term.

And I think sometimes that is how MACD works. It works because in a market not undergoing very large movements, all stocks that don't fail will tend to average out to the market rate of return. After all, if they earn above market they will be bid up until the price brings the market rate, and if they fall below market, they will languish until their price and return work out. And so, since most stocks will remain relatively stable, over time, like the coin flips, the prices will tend to converge on a line representing the market rate of return. Of course, that is over a long time, and so we can see lengthy periods where the lines diverge, which means using MACD to invest in the short term is insane. Or would be, were it not for one other factor.

You see, there is one other factor that I realized I had forgotten to consider. Yes, if it existed in isolation, MACD would not have very good predictive powers. But it does not exist in isolation. Many of those buying and selling also know about MACD, and many believe in it. And so, they make their decisions based on what they see the MACD numbers predicting. Of course, they may use different periods for the moving average, but, as a few numbers seems most popular, the number of choices used are pretty small. And so, MACD, far from being useless, may be a useful predictor after all, though not as a trailing indicator, but as a leading indicator, as investors respond to what they see in their MACD analysis after the fact. In other words, MACD may not be so much predicting the market, as driving it, at least to a degree.

The reason I mention this is that I have seen similar nonsensical analysis in all manner of statistics. From polls being used to drive public opinion to economic numbers being pushed to convince people that they are doing poorly despite the evidence of their senses. (My favorite polls show 75% of respondents think they are doing better than last year, but 90% believe the economy is doing poorly.) Somehow, when coupled with numbers, people will believe all manner of nonsense. If it can be quantified, we will buy it, even if ti makes absolutely no sense.

I have written on this topic before, multiple times ("Statistical Artifacts", "Revealing Too Much", "Allergies", "Shocking Numbers", "Disease Incidence", "Twice in a Row", "Interesting Numbers", "Problematic Arguments", "The Plural of Anecdote is Not Data", "Flu Panic", "The Sky's Not Falling Part 1", "Correlation versus Causation", "Correlation and Causation Revisted", "Violence and Culture", "An Interesting Article", "Law or Choice?", "Pro Hoc, Ergo Propter Hoc","Poverty and Lifespan", "Shocking Numbers", "Mathematical Deception", "Best of the Web Imitates Me XXII", "Bad Economics Part 1",  "Lifespan", "Why the Numbers Don't Matter", "Misusing Numbers", "Another Example", "The Devil is in the Definitions (And Assumptions)", "Bad Logic", "Yet Another Needless Scare", "Insufficient Skepticism", "Inflation and Uncertainty", "The Rubber Yardstick", "What Is Money?", "What Is A Dollar? ", "Overly Simplified Economics and Confused Interpretations", "The Sky Isn't Falling, Again", "An Interesting Mistake"), which makes me wonder how much is left to say on the matter. But the more I think about it the more I realize that the subject is almost infinitely broad. After all, every time I have written on one matter, two more have come to my attention. It seems there are countless ways that statistics can be abused.

I originally intended to go into that very topic here, but I then realized I was already writing another post that would cover some of the same ground. And so, rather than push ahead here, I think I will leave this subject at that, and come back to it in the future. Rather than try to muddle through it all here, I will take a few future essays and cover the topic piece by piece, hopefully doing a better job than I have done in the past.

Until then, please read the posts linked earlier, as well as my upcoming post "Mistaken Perceptions of the Industrial Age" which also deals, in part, with the topic. They don't cover everything, but they are as good a place to start as any.

----------------------------------------------------------------------------------------------

1. Obviously, in the long term, optimizing production methods is a fools game as well, as there is simply no reliable way to predict long term trends among all the possible inputs for all the possible methods of production. In the end, you are simply picking the method that either seems most likely to remain a sound choice, the method which is best right now, or the method which will do the best under all possible foreseeable outcomes. But you cannot predict the definite long term outcome, and so you cannot predict "the best" future method.

2. My professor's example was amusing. "Project A grew by an average of Y every year, so the formula for future expenditures is X+ Y times year." Sadly, this does seem to be a popular predictive method in many statehouses, as well as in Washington.

3. I mentioned this before in my essay "Expectations", but as it seems few ever read that, and fewer still recall it (probably with good reason, having trouble recalling it myself), I will happily repeat what I said there (hopefully better), rather than refer readers to my old post.

4. It doesn't take too much imagination to conceive of examples of all sorts of bizarre circumstances where moving average and price could bear little relationship with each other. Then again, as we shall discuss later, it is also hard to tell what is a "hit" or a "miss" in terms of prediction, so it is hard to tell what constitutes falsification. But that is something we will discuss later.(In my post "Failure of Modeling?" I mention a period of quite some time when MACD failed to hold. So there is at least one real life example of the predictive system failing. Or, I should say, failing to respond as predicted within what I consider a reasonable time. As the model does not specify a time horizon, others could easily disagree with my conclusions, which is part of the problem, as we will discuss.)

5. That is a general shortcoming of any historical stock analysis, it is an aggregate figure, which can clearly obscure much data. Imagine a day which started at X, rose to X+500 points, fell to X-400 points, rose to X+400 again, fell to X-500, and closed at X+1. Depending on whether you pick, high, low, mean, open or close, you value for the day would be X+500, X-500, X, X or X+1. None of which tells you the whole story. In fact, by obscuring the volatility, it manages to make the day seem either much more successful, much more disastrous, or much more uneventful than it truly was. Even including a measure of daily volatility does not tell the whole story. Of course any aggregate has this shortcoming, but that is my point. Aggregates are always a compromise between a complete picture and a comprehensible volume of information, what we need to determine is whether this compromise is an effective one, and I think in this case it may not be.

6. Actually, both sides argued this, as some paranormal researchers argued that a higher rate of failures than normal may represent a psychic subject intentionally interfering. While it sounds a little absurd, the problem here is valid, as this is not a physics experiment. As I said in "An Interesting Refutation", when dealing with volitional beings -- in the essay G-d, here the psychic -- they can refuse to cooperate, and so we can't rely on mechanistic responses, nor can we demand repeatability. So, while it would be very hard to take such effects into account in experiments, it is interesting to consider. (Though I doubt any amount of consideration can develop a mathematical model of volition. In fact, I know it cannot. Which means this question will have no resolution, and any experiment involving human subjects will always be somewhat uncertain, with results that can vary for no obvious reason. See "Volitional Beings" and "The Limits of "Scientific" Management" among others for more on this topic.)

-------------------------------------------------------------------------------

POSTSCRIPT

I am reluctant to admit it, but I am afraid I may have made some small mistakes in my last few essays. Not factual errors, or mistakes of argument, but simple redundancy. I have had some physical problems the past several days and, among other more painful symptoms, I have suffered from rather sudden and uncontrollable narcolepsy. I have not noticed it elsewhere, but in the last essay I realized that after falling asleep I sometimes went ahead and wrote the same thing twice, obviously not realizing I had already written it. I have since cleaned up the essay as much as I could, but there are still a few places where I repeated myself, and others where removing the repetition made the essay read rather awkwardly.

I am feeling better at the moment and don't think this will be an ongoing problem, but I wanted to admit to my mistake in case it was more obvious than I imagined. And so, I apologize for any repetitions or other confusion.


Email ItEmail It | Print ItPrint It | CommentsComments (0) | TrackbacksTrackbacks (0) | Flag as offensiveFlag as Offensive