Analyzing S&P 500 Returns

Today, September 13, 2022, was a bad day for stocks. The Bureau of Labor Statistics published their monthly Consumer Price Index. It came in at a rise of 0.1% for the month of August compared with the month of July 2022. Compared to August of last year, CPI has risen 8.3%. Economists the Journal surveyed prior to the official release had projected 8.0% year-over-year CPI growth. The extra 0.3% in the numbers caused a 4.4% drop in the S&P 500 index in anticipation that the Federal Reserve may raise their borrowing rates faster than expected.

Leaving aside any conjecture about what the Fed will do, or any kind of guess as to what future inflation prints may yield, is it wise to buy a dip like the one today?

Using a 252-day rolling index and log returns, today’s move was a -3.2 standard deviation from the mean–lower than 99.93% of the preceding 252 days. A fairly extreme outlier, although market returns have well-documented tail risk. Out of the total dataset of daily log returns since 12/28/1990, this was a -3.87 standard deviation move (or lower than 99.99% of 7,988 other days).

Betting on a market rebound after a day like today might make intuitive sense, but does evidence back this hypothesis?

Using a quick Python script and analytical tools in pandas, we can create a dataframe that holds:

  • columns for S&P 500 index level
  • log returns of the S&P (remembering that log returns are summable across time periods)
  • each day’s z-score based on the mean and standard deviation of the last 252 trading days
  • the z-score based on the entire 32-year lookback period
  • and the VIX fear gauge 10-day rolling median level for an additional metric for market sentiment (the VIX median for this whole dataset is 17.74)

The dataframe looks like this:

Now to loop through and test the hypothesis that buying on big down days brings positive returns:

The code block returns a dataframe with 111 rows with columns corresponding to the rolling zscore, VIX median level and the sum of 20 days of log returns. 77 of these 111 have positive returns. In other words, about 69% of the time it pays to go long on the big dips (at least in the short run).