Google Correlate Fun!

Since I suffer from a case of chronic, debilitating financial nerdliness, imagine my overwhelming joy when I discovered Google Lab’s new* goodie: Google Correlate.  That’s right, the same people who brought you such wonders as Google Docs (providers of the spreadsheets I post on this blog) and Google Flu Trends have brought us a simple tool that lets you find Google search terms that correlate with your time series or state location.  They even put together a cute comic that explains how Google Correlate works.

So what do I do when I find something like this?  Play with it!  Check this out:

First, I go and get a time series of data.  In this case I will model the S&P 500** by using the price data for SPDR S&P 500 (Ticker: SPY), an ETF*** that is designed to closely follow the S&P 500 Index.  I mosey on over to the finance.yahoo.com for SPY and get myself a time series of data by fiddling with the historical prices for SPY.  I make the start date 1/1/2003 and the end date 5/23/2011.  Then I set the interval for weekly.  When I do this Yahoo! gives me this page:

SPY Historical Prices, Captured from Yahoo! Finance, with dividend notice highlighted.

Detail of Screenshot from Yahoo! Finance

As you can see from my circle, I can’t just copy-paste the data that comes from finance.yahoo.com into my time series.  Its got all the dividend brakes that screw up the data.  So I scroll to the bottom of the page, and lo, behold, I can output to a spreadsheet.  I do so.

Download to Spreadsheet Link, Captured from Yahoo! Finance, with Download to Spreadsheet Link highlighted.

Detail of Screenshot from Yahoo! Finance

And this is what I get:

Detail of SPY Historical Prices spreadsheet, Output from Yahoo! Finance Download to Spreadsheet Button for SPDR S&P 500 (SPY)

Detail from SPY Historical Prices spreadsheet

Boom, done.  Now I just have to clean up the data.  (You can see that the volume is listed in scientific notation.  Excel does this when the cells are too small to display the whole number.  If you make the column wider, the notation goes away.)  I make another sheet and copy-paste the dates and prices such thusly:

Detail of SPY Historical Prices spreadsheet, Output from Yahoo! Finance Download to Spreadsheet Button for SPDR S&P 500 (SPY), dates and prices only

Detail from SPY Historical Prices spreadsheet, date and price only

And now we’re ready to shove this into Google Correlate.  I go over to Google Correlate, sign in with my Google User ID and choose “Enter your own data,” then choose “Time Series.”  I get an input page that looks like a spreadsheet and simply copy-paste my data into the Google Docs spreadsheet.  I name my data set “SPY Price.”

Detail of Google Correlate input widget, containing SPY Historical Prices from spreadsheet

Detail of Google Correlate input widget

I then choose “Search Correlations,” and, in a few moments, this is what I get.  First, a list of search terms that are most correlated with my data set.

Detail of Google Correlate output, list of search terms that correlate most closely with SPY time series

Detail of Google Correlate output

And, below that, a chart showing the correlation of the most highly correlated search term.

Google Correlate output, comparison between SPY historical prices and search term "stockhouse"

Correlation chart between SPY historical prices and search term "stockhouse"

Isn’t this delightful!  Before I ran this, I had no idea what “stockhouse” could possibly mean.  Well, as it turns out, Stockhouse.com is a website that features scads of conversation between active investors.  Isn’t it interesting that the frequency of the search term “stockhouse” follows along so well with the price of the SPDR S&P 500?  Some of the correlations also seem to make superficial sense, like “401k calculator” or “investment calculator.”  But, “dhl track?”  “Biagio’s restaurant?”  I couldn’t speculate wildly as to what association, if any, the terms would have with SPDR’s price.  Maybe the correlation is just luck.

*  It appears to have been released just yesterday!

**  An index of the 500 largest stocks on the U.S. market.  Google it.

***  Exchange Traded Fund.  Google it.

Advertisements
This entry was posted in Current Events, Goodies. Bookmark the permalink.