Perennially Curious

Making sense of it all.

Shared Destinies: Pairs of Stocks with Negative Correlation in Stock Price

Often times, fates of companies are seemingly tied to one another such as AT&T and Apple; and SolarCity and Tesla Motors. This leads one to wonder if there might be examples of pairs of companies where the stock price of one is strongly negatively correlated with the other. Correlation is not causation, but might reveal patterns. This was the inspiration for this data experiment.

Raw data (CLOSE price at weekly frequency) for all NASDAQ listed US companies between 2010 and 2013 was obtained via the Yahoo! Finance API. Companies with missing data in this period were removed. This left a list of 2980 companies and thus approximately 4.44 million pairs. The correlation coefficients for these pairs of stocks were calculated using the CORREL function in Excel. The distribution of the correlation coefficients, shown in the graph below (note that the y-axis is the % frequency) was heavily skewed to the right i.e., towards positive correlation values. The interesting data, thus was not the positive correlations but the negative ones. This is almost certainly a reflection of the macroeconomic context in which these stocks function: when the economy is booming stock prices will generally tend to rise, and in a recession, they will tend to decline. image

The correlation value reflecting the 99.9999th percentile of the above distribution is -.9430975 while the minimum is -.963537611. The historical data for PBIB and AZO, which have the lowest correlation score in the dataset are shown in the graph below.

image

It becomes clear that PBIB has been constantly declining and is thus, not surprisingly, strongly negatively correlated with AZO (and two other stocks FDO and MCD).


Back to Perennially Curious Homepage.