Could SPY ETF Component Participation Have Alerted Us to Sell (Hedge) Prior to the Recent Market Downturn?

BlackArbs Admin

This is the Python Code version of a guest post presented here on RectitudeMarket.com. If you would like to read the analysis without the Python code please click the link above.

To market pundits and casual observers the recent correction in equity markets appeared as a surprise. Overall headline economic data was positive at best and mixed at worst. Domestically, capital markets had been looking ‘ok’ while most of the major volatility was taking place abroad in emerging markets, and commodity based economies like China.

That did not stop SPY from collapsing from an August high of $210.56 to an August low of $187.23, or a decline of ~12.5%. We’ve yet to have a daily close above $200 since the drop, even with a dovish Fed delaying the rate rising cycle once again.

As an investor I’m always searching for intuitive indicators that in essence, tip the collective Market’s hand. One indicator that always seemed interesting to me was ‘ETF Participation’.

What is ETF Participation?

There are likely several definitions on the web. For this analysis, I define ETF participation as the number of ETF component stocks’ returns that increase or decrease on a given day. I selected the SPY ETF for this study because SPY is considered by most to be the de-facto US market proxy.

To conduct this analysis I collected SPY holdings data from State Street. I only used a 252 day lookback due to the changing composition of the ETF. The first chart is a simple bar plot that shows the quantity of the current SPY component stocks that had returns above and below zero.

To begin I set up my exploratory research environment within the IPython notebook.

After setting up my environment I import the SPY ETF holdings data, and perform some small edits to the ticker symbols in order to get stock price data from the Yahoo Finance API. Finally, I run a function to collect price data and return a Pandas Panel.

My output looks like this:

Next I calculate both log returns and cumulative log returns, then isolate and sum the quantity of stocks whose daily returns were greater than or less than 0.0.

Next I construct a plot function to give an overview of the data collected so far.

The chart may look good but it doesn’t tell us a whole lot. We need a way to see the general trends in participation. To do this I decided to use a basic 63 day exponential moving average for both time series.

This looks a little more interesting. We can clearly see a general trend that many more stocks were participating to the upside late in 2014 during the strong rebound from the October lows of 2014. Additionally we can see the indecision of market participants throughout the entirety of 2015 as the spread compressed and oscillated. Even more interesting is that the two time series crossed over repeatedly during the period where SPY was testing 52 week highs.

To get a better understanding of the two EMA series I decided to plot the spread between them. I did not attempt to standardize the spread and made no assumptions about whether the spread is mean reverting or random. However, I do believe it crystallizes our naked eye observations from the previous chart.

If it wasn’t clear before it definitely is now. Market participants have not been as bullish as previously advertised. The spread was declining as far back as January 2015 and mostly oscillated around zero before breaking below into negative territory around June 2015. In mid August we see the real break which appears to coincide with the aforementioned 12%+ plunge.

Looking at the EMA spread, the zero line appears to be the important psychological support/resistance line. Theoretically the zero line would represent the maximum indecision point of all market participants, so a move above or below the line would indicate increasing conviction in either direction. Therefore it only makes sense to study those zero crossing points a little further.

This chart plots vertical lines at each zero crossing for the Raw EMA Spread. Again the chart appears to reinforce my previous theory that market participants have been largely indecisive regarding overall market direction as expressed through ETF component participation.

However, that’s not enough information to make a decision about whether we should have been alert to an impending decline. We need a quantitative method to really drill down into this theory.

To quantify this analysis and add structure to the theory I constructed a simple model. Assuming the zero line is an important psychological barrier, I calculated the subsequent cumulative return over N number of days following each instance of the spread crossing zero. I then calculated the average cumulative return for each N day look ahead period.

The lookahead periods I chose were 1, 2, 3, 5, 10, and 21 days. The results are unambiguous.

Current average cumulative returns are negative across all look ahead periods!

Notice a pattern? Looking at the table the trend appears to change for all look ahead timeframes in late May. It never got better. Obvious confirmation of the near term trend change could be seen as late as the end of July 2015.

Conclusions

Circling back to the original question, analyzing the SPY ETF components’ participation gave clear indications that broad market internals were weakening as early as late May, and continued to break down until present day.

Unfortunately, market internals still appear weak moving forward. For my personal portfolio, I would not feel confident as a long term dip buyer until ETF participation crosses over the zero line again and we see some positive cumulative returns accumulating on the 10 and 21 day periods.

This analysis provides a good foundation for further research regarding this indicator’s effectiveness. However there are some weaknesses to consider. The rolling EMA periods were chosen simply to represent a quarterly period but were largely arbitrary as were the lookahead periods. Furthermore, I did not have access to SPY ETF components ‘as of’ each date in the analysis which would have been more rigorous and largely eliminated the survivorship and look-ahead bias. Therefore, I only analyzed the last 252 trading days to minimize those effects on the results presented.

Blog RSS #block-yui_3_17_2_2_1443814349313_21865 .social-icons-style-border .sqs-svg-icon--wrapper { box-shadow: 0 0 0 2px inset; border: none; }

Enjoyed this post?

Subscribe for more research and trading insights.

By clicking "Subscribe," you agree to our Terms of Use and acknowledge our Privacy Policy. You can unsubscribe at any time.

No spam. Unsubscribe anytime.