Dimensionality reduction with graphs

We wanted to celebrate our 100th post on MKTSTK by exploring a new type of financial visualization. New to us, at least. One of the best aspects to making of living off the markets is that you never stop learning.

A few weeks ago we ran across an example in Python’s sklearn for visualizing stock market structure. We were really excited to try it out for ourselves because this type of graph can retain more information than the Minimum Spanning Trees we have been working with in the past. The following network graph was produced using the 88 component stocks of the Nasdaq 100 index with continuous data from 3/19/2009 to now. We connected two stocks if their partial correlation was above a threshold:

graph1 mds1These examples were produced using the manifold class within sklearn which contains a collection of algorithms for reducing the complexity of high dimension data. The first graph was produced from the correlation matrix of the 88 stocks we surveyed using a Spectral Embedding algorithm. The second chart uses Multidimensional Scaling to plot the relationship between each stock in the group.

As traders, we are constantly searching for ways to reduce the complexity of the markets we study. Visualizations are an important way to make sense of this deluge of data.

As of right now we have only looked at price and volume data; in the future we hope to apply this novel form of graphing to social data as well.

Further reading on spectral analysis

1 reply »

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 )

Google+ photo

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

Twitter picture

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

Facebook photo

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


Connecting to %s