I want to introduce to all of you a statistical measure which has come to have a significant influence on the trading systems I am developing. Ralph Vince describes the measure very well in his book Portfolio Management Formulas.Â This measure is called the Z-Score, or the Runs Test.
I want to skip most of the statistical jargon and get right to the meat of the issue, but I will be happy to answer specifics in the comment section.
To understand why the Z Score or Runs Test isÂ important, we need to digest Rob Hanna’s statement from his recent post How to Trade the Choppiest Environment in 50 Years. Rob writes, “As you can see, buying after strong days and selling after weak ones worked well for 40 years. In 2000 that changed, and the last year and a half is the worst it has ever been with regards to follow through. This would suggest that strategies that may have worked well for forty years or more could be suffering greatly now.”
Also, it is important to read Dr. Brett Steenbarger’s recent post Short-Term Reversal Patterns Among Global Equity Indexes.
Both authorsÂ conclude that short-term trend following is not working very well.Â We can test their conclusion by applying the Z-Score to theÂ dataÂ from theÂ indices.Â IÂ should mention that both Bhh fromÂ IBDIndex and Damian from Skill Analytics have been instrumental in helping meÂ flesh out the rest of the ideas presented below.
The Z-Score can determine whether wins or lossesÂ are dependent on previous wins or losses. Think ofÂ dependency inÂ this way: Do wins begat more wins?Â Do losses begat losses? If so, this relationship would be described as a positive dependency. WhatÂ if wins begat losers, and losers begat wins? This would be a negative dependency.
While Z-Score has traditionally been used to analyze the win and loss streaks of aÂ trading systems, it seems that another application for the measure may be to analyze the win and loss streaks of theÂ indices in order to determine whether there is any dependency. Are the sequences of wins and losses containing more or less streaks (of wins and losses) than would be expected in a truly random sequence? When digesting this, consider the fair coin, where one flip is equally as likely to be heads as it is tails. We want to determine if the indexes are trading as a fair coin, or one that is biased to heads or tails, or both.
Below are the Z-Scores for the S&P 500 (SPX), using all data available from yahoo, which goes back to 1950. In January of 1993, the S&P 500 SPDRs was introduced. I will quit using SPX data and use SPY data fromÂ 1993 forward.
All Data, 1950 to Present: Z-Score -9.359014
This negative Z-Score implies a positive dependency at a confidence level of much higher than 99.73%. In short, a positive close on the S&P 500 generally begat more positive closes, and losing days generally begat more losing days, over this broad time span.
1960 to Present: -7.196132
1970 to Present: -3.795268
Note that the positive dependency is decreasing, yet from 1970-Present, the confidence level is still above 99.73%.
1980 to Present: Z-Score .3465443
1990 to Present: Z-Score 1.692151
1993 to Present (With SPY Data): Z-Score 2.115444
Note that there has been a switch. The positive Z-Score implies a negative dependency, where buying begats selling, and selling begats buying. Be careful though with this data, as the score must be above 1.64 to have a confidence level of greater than 90%.
2000 to Present: Z-Score 1.3608623
2003 to Present: Z-Score 1.1696094
2006 to Present: Z-Score .4530397
2007 to Present: Z-Score 1.3030246
October 2007 to Present: Z-Score .3994188
Note that from 2000 on, the Z-Scores move lower. The highest score from this period, 1.303, gives a little better than an 80% confidence level. I interpret this data to mean that the S&P 500 is basically moving through a random walk, although the confidence level is not high enough to draw any firm conclusions.
January 2008 to Present: Z-Score -0.628093
February 2008 to Present: Z-Score -0.400456
March 2008 to Present: Z-Score -0.246511
April 2008 to Present: Z-Score -0.403907
May 2008 to Present: Z-Score -0.288564
June 2008 to Present: Z-Score 0.0022265
July 2008 to Present: Z-Score -0.09631
From January 2008 to the present, we begin to once again see negative Z-Scores. A negative score implies a positive dependency, where selling begats selling and buying begats buying.Â The scores are notÂ significant enoughÂ to exhibit a high level of confidence.
The recent dataÂ show noÂ definitive dependency, either positive or negative. This means that buying because the market has closed up or selling because it has gone down has not been working as well as in the past. Also, buying weakness or selling strength, in order to catch a reversal, has not been working as well either.
Right now, betting on the market, as represented through the SPY, is similar to betting on the flip of a fair coin. This data, while it may not prove the conclusion of Hanna and Steenbarger, certainly does not disprove it.
Implications for Further Research
It seems to me that keepingÂ shorter and intermediate time frame of Z-Scores, update daily across the indices, could give the trader a head’s up that market conditions may be changing to be more favorable to trend-following or contrarian strategies.