I was asked about whether or not I considered the win/loss sequences in my trading systems. It seems reasonable to expect that if you've had a losing streak, then the probability of the next trade being a winner should increase, and vice versa. Most people know that this is not true for a coin flipping exercise as long as the coin is a fair coin. If the coin is a fair coin, then the probability of a head or tail is always 50%. Even if you've had ten heads in a row come up, the probability of a head on the next toss is still 50%. But what if the coin is not fair? Can this be determined by lookingat the head-tail sequences.
Fortunately, people have devised just such as test for analyzing trade sequences; it's called the runs test. This is the equation:
Z-Score = (N*(R-.5)-X)/((X*(X-N))/(N-1))^(1/2)
- N = The total number of trades in the sequence.
- R = The total number of runs in the sequence.
- X = 2*W*L
- W = The total number of winning trades in the sequence.
- L = The total number of losing trades in the sequence.
Here is the reference if you want to read more about it, or you could look in "The Handbook of Portfolio Mathematics" by Ralph Vince.
So let's do the test on Alligator to see what it looks like. All of the data needed for the calculation is in the TradeStation Strategy Performance Report. I'll use a ten year back test.
Total Trades = 4519
Winning Trades = 2580
Losing Trades = 1939
Runs = 2100(To get this sum up number of series in the trade analysis section)
For these numbers, the Z score = -3.48
The Z score is the number of standard deviations from the mean for the population of sequences compared to what you would get if the sequences were random. If you know anything about statistics, you know that anything over 3 standard deviations from the mean puts you out in the tail of the distribution curve. This means the likelihood of the distribution being random is very low and that because the number is negative it means the streaks are longer than if it were a random process so wins follow wins and losses follow losses. If the number is positive, then you would expect a win to follow a loss.
So with this information, can the strategy be improved? Look at the table below to find out.
What you see in the table is that the best performing trades are the ones where the win and loss sequences were less than or equal to 2. Trade sequences longer than this tend to be followed by poorer performing trades. It's true there are some sequences for which this is not the case, but their distribution is inconsistent and in some cases the number of trades is not statistically significant. I cannot think of a good reason for the trade sequences to occur in this way. It may be non-random, but neither is the reason for it apparent. If the trades got steadily better on the win side in terms of $/trade, I would consider using the information, but since it doesn't I'm not going to act on this information until I can find a reason for it besides the statistics. After all, the saying is, "there are lies, damn lies, and statistics."