You get recessions, you have stock market declines. If you don’t understand that’s going to happen, then you’re not ready, you won’t do well in the markets. -Peter Lynch
It is currently the end of July 2018 and we’ve been enjoying one of the longest bull markets in history, with sustained growth since 2009 and without a major pullback of more than 10% during that period. Given that many people attribute this bull run due to Quantitative Easing (QE) from the Federal Reserve, and given that they are now pulling back on this monetary expansion, many analysts are predicting an inevitable downturn from this.
Taking a look at history, here’s some data on the longest bull market runs, and what the corresponding drawdowns were afterwards:
Given that I take a statistical approach to investing and trading, I’ve been curious about analyzing past bear markets to determine if I could develop a model that would enable me to have a degree of confidence of when we have entered a bear market, and the probability of the stock market reaching various retracement levels. My ultimate outcome is to create an investment strategy that will allow me to risk a small percentage of my portfolio to maintain or grow my entire portfolio through a 20% or more peak-to-trough broad market drawdown.
Here’s the details of the data I used to conduct this analysis:
Instrument: S&P 500 Index (SPX) Data Range: Jan 1, 1950 to June 1, 2018 Bar Type: Daily Bars Data Provider: Kinetick (www.kinetick.com)
To conduct this research, I utilized the NinjaTrader platform (www.ninjatrader.com) to output price data from Kinetick to a CSV file (Crude, but quick). I then wrote a Python program to read in this data and analyze it before outputting the report to an Excel file via the openpyxl library (https://pypi.org/project/openpyxl/) or generate charts using the either matplotlib library or the Plot.ly service. This Python program is available on GitHub at the link here.
Past Drawdown Analysis
To start with, I wanted to take a look at how much the S&P 500 index would retrace, from the peak to the very bottom, to understand how often major drawdowns would happen and how much they would retrace. To do this, I took the closing prices for daily bars since January 1, 1950, and whenever we were making new lows, calculate the percentage loss from the previous peak. That analysis resulted the following chart:
This chart shows the magnitude of price declines over the last 70 years. As we can see, there are multiple times when price retraced more than 20%. In fact, since 1950, the S&P 500 has had:
- At least a 20% loss 10 times
- At least a 30% loss 5 times
- At least a 40% loss 3 times
Here are the date ranges that had at least a 20% or more loss:
Start Date | End Date | Total Drawdown | Num Days |
% Drawdown / Num Days |
6/17/1957 | 12/18/1957 | -20.67% | 184 | -0.112% |
12/8/1961 | 6/26/1962 | -27.97% | 200 | -0.140% |
2/9/1966 | 8/29/1966 | -20.76% | 201 | -0.103% |
11/29/1968 | 6/26/1970 | -32.20% | 574 | -0.056% |
1/11/1973 | 10/4/1974 | -48.15% | 631 | -0.076% |
11/28/1980 | 8/12/1982 | -27.11% | 622 | -0.044% |
8/25/1987 | 12/4/1987 | -33.51% | 101 | -0.332% |
7/16/1990 | 10/17/1990 | -19.02% | 93 | -0.205% |
9/1/2000 | 10/9/2002 | -49.15% | 768 | -0.064% |
10/9/2007 | 11/20/2008 | -51.93% | 408 | -0.127% |
Based on this data, we can start to drill into these time ranges and look for patterns and indicators that would help us to classify a future bear market early on. Next up in part 2, I’ll be taking a look at the System Quality Number (SQN) indicator values during these periods.