Wednesday, May 14, 2008

Spurious

I generally like Bespoke. They make some good recap posts of what sectors or countries are performing relative to each other. However, I was disappointed with today's post. Their point is that if you graph the S&P500 since October and compare it to June1990 to July1991, we follow a pretty consistent pattern.

I've seen arguments like this made before, "this is just like the conditions leading up to the '87 ('29 or what have you) crash." To the extent that some market participants believe this (as it can be generally be heard in the financial media), there might be some predictive power in that. I'm not sure, I would have to test it. However, my complaint is that simply graphing one time series onto another and positing a special relationship that could indicate future returns is sloppy statistics and bad practices all around. At a bare minimum, you should report the correlation today vs. that time period, how many times there has been similar correlations over time, and the returns in those situations. There's certainly more you can test, but I would suspect that it would make sense to check whether or not the relationship is spurious.

Well, I decided to look into this a little deeper. I use the weekly S&P500 data and compute the correlation of rolling time periods with May of 2007 through the end of the first week of May. Out of 3,011 weeks that correlations were computed, 457 (15.2%) showed correlations with the recent time period greater than 50% and 135 (4.5%) showed correlations with the most recent time period greater than 75%. The most highly correlated periods showed 90% correlation only 3 other times and two happened in 1953 and the other was 1990. However, if you look at the 75% correlation periods, it is clear that every time there has been a downturn, the market tends to look like it is now. They're right that on average, the market has bounced when it was highly correlated with today, 1.7% over the next three months (7% annualized). However, the standard deviation was also 8.5% (17% annualized) which means that it isn't statistically different than zero. On a six month basis, the return increases to 4.87% (9.7% annualized), but the standard deviation increases to 14.7%(20.8% annualized). So if you wanted to take advantage of the historical correlation, you would also be looking to take on a lot of risk.

Another point I wanted to note is that when you have a series like stock returns that have unit roots, you generally need to difference the series or log difference the series to tease out relationships. A unit root basically means that the process is not stationary, it doesn't have a consistent mean and standard deviation. But, if you put the returns in the form of percentage increases, then the returns might have the same mean and standard deviation over long periods of time. The problem is when you compare two series that both have unit roots (as both comparisons are here) and if you regress one on another and find a large R^2 value and positive autocorrelation. If the residuals are also integrated order 1, then you have what is called spurious regression. If the residuals are integrated order 0, then you have cointegration. Cointegration is like the relationship between gold and gold mining stocks (or oil and oil services stocks). Spurious regression would be like the relationship between defense spending in the U.S. and the population of South Africa. Both go up, but there's no fundamental reason. I can't think of any reason why the stock market would necessarily behave exactly the same way twice, but the way to test this would be to set up a Matlab program that iterates through every week of data and looks at the returns of highly correlated months and invests when they're significant. All things considered, it wouldn't be hard to test (this is just one time period).

For example, if you were looking at 6 month correlations on October 5th, 1987 and would hold for 3 months if the correlation were greater than 75%, then you would find an annualized return of about 10.6% with 11.4% standard deviation (pretty consistent even including the awful 1987 data with the whole series). You might choose to invest and lose 20% over the next three months. The risk/reward ratio looked even better on a 85% basis. Interestingly enough, the situation of greater than a 90% correlation with the 6 months leading up to the 1987 crash has never happened and neither has it happened looking at it including October (despite what anyone else will tell you). My point is that a correlation with a previous time period, or a chart pattern similar to what happened before, may or may not be robust, but it should be statistically tested and caveats given before being used as a buy/sell.

1 comment:

nodoodahs said...

Their free stuff has always bordered on useless info-porn and trivia, and now, apparently, they are the official infornography providers for Bloomers' Floor Babe during daily updates.

I suppose if they provide anything meaty and worth spending time digesting, they save it for their paying customers.