Thanks Dan. Your notebook is important for what it demonstrates. And maybe, we should accept some of its implicit conclusions.
Runs test have been around for quite a while. Probably, prior to Pascal. They are part of randomness tests in variables.
In an old 1972 book (Risques et Profits à la Bourse), the hypothesis and demonstration was made that revenues, profits and other fundamental data follow about the same runs distribution as in your notebook.
If you try adding more runs in a row (gain_6 and gain_7), you will get the same distribution.
If you add years to the mix, again you will get the same distribution.
And if you increase the time period from 5T to 390T and beyond, you will get the same distribution again. About half the samples will be close to 0.50 for a run of 1 and about 0.25 on the run of 2, and so on.
If you use stocks as proxy, you will again get about the same results. Looking at the long term (2002-2020), even if the distribution remains about the same, you can see in the probability chart, that the rolling-mean is fluctuating around its expected value (as if biased one way or another), and at times for quite a while. But nonetheless, remaining close to their expected values.
We tend to ignore the random nature of what we are dealing with and will use about anything in trying to forecast future prices and yet, the data says that what we see is almost random, not totally random mind you but almost random. And this has its own set of consequences.
Only a game where the odds of most things are close to 0.50 can allow the diversity of raw data interpretations we see since even if we are wrong, we will still be right about half the time.
That is the beauty of having trading systems where almost all opinions can demonstrate in some way that they are right about half the time, and this even if they are wrong.
My conclusion is: we need to design trading systems that will show some alpha even under those conditions. Because those runs test charts say we are dealing with a zero-sum game and that has it own conclusions too.