Correlation Graph

Earlier this week, I saw a message in my Twitter feed talking about an unusual correlation pattern between the S&P 500 and the Dow. Unfortunately, the graph produced by the Greg Mankiw recommended site AssetCorrelation.com was grossly inaccurate showing periods of zero correlation between the indices. A few lines of code using the Quantmod package in R can easily replicate the functionality of the site and a prudent analyst can simply load a more reliable data source before arriving at any conclusions. This script takes data from Yahoo finance but you can easily use Google finance or load your own data.

Author: Probable Pattern

Former Marine and Curious Critter

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s