Back to Community
Analysis of minute bar trading volumes of the ETFs SPY & SH

Title: Analysis of minute bar trading volumes of the ETFs SPY & SH
Author: Grant Kiehne
Abstract:
SPY is an S&P 500 ETF, and SH is a -1X (inverse) S&P 500 ETF, thus both ETFs track a common index. Their relative trading volumes may have a relationship that could be exploited in a trading algorithm. The analysis is presented as a heatmap of the difference in the z-score normalized trading volumes over a rolling 390 minute trailing window. The horizontal and vertical axes are daily trading minute and trading day, respectively; each row represents a trading day and each column a trading minute. Visualization of the heatmap provides a means to discern patterns and anomalies of potential utility in developing a trading algorithm.
Quantopian username: Grant Kiehne
Filename: heatmap example v01
References:
https://www.quantopian.com/posts/research-platform-how-to-get-a-nice-heatmap
https://www.quantopian.com/posts/messing-around-with-spy-vs-sh-volume-profiles-h-slash-t-grante-kiehne-and-michael-van-kleeck
https://www.quantopian.com/posts/modified-heatmap-based-on-grant-kiehnes-example
https://www.quantopian.com/posts/heatmap-of-returns-by-day-of-week

Loading notebook preview...
Notebook previews are currently unavailable.
4 responses

If anyone ends up making money off of a strategy inspired by this, you owe me a six pack of porter from http://www.backeastbrewing.com/. Just give them a call, ask for Tony, and tell him you want to put it on a credit card for me to pick up. "Aspiring quant. Will work for beer."

Just noticed a minor mistake. Please disregard:

# lighter color means z_diff > 0 (V_SH > V_SPY) & darker color mean z_diff < 0 (V_SH < V_SPY)  

I changed the colormap, so this comment no longer pertains.

I think I see ET flying across the greenscreen sky in a bike basket. Or is this one of those stereograms where I have to squint and cross my eyes to see the pattern, hold on, (-x-)v(-x-). Nope. Oh I know, it's one of those modern art pieces right? Where's my AAPL-tini!?

(All offered in friendly jest of course.)

It's actually a photo of the throw rug in my man cave!