Margin debt is debt provided to investors to buy equity in companies. There is nothing particularly fancy or new or innovative about the use of leverage or margin, particularly in the markets. What is interesting, though, is how this data point tracks with the S&P 500 (SNPINDEX: ^GSPC), and what it may be telling us about our current economic cycle. 

First, take a look at this chart tracking the monthly closing price of the S&P 500 and the month end balance of margin debt outstanding on the New York Stock Exchange. 

The S&P 500 data in all the charts in this post was sourced from the St Louis Fed and the margin data from NYXdata.com. All data is nominal -- I have not adjusted for inflation.

The relationship is pretty strong. As margin debt began to rapidly increase in the 1980s, the S&P followed suit. 

Drilling down now into more modern history, the recent relationship is just as strong.

From this vantage point, the chart speaks for itself. We can't discern if this is causation or just correlation, but it is clear that the S&P and total margin debt on the NYSE move together, through bull and bear markets. 

But looking at the data again from a slightly different perspective, a different conclusion begins to form. 

Same data, different perspective

Let's look now at the data in terms of nominal growth. The data set available begins in 1959, so initially we'll use that as our starting date.

After nearly 30 years of uneventful history, the percentage change in margin debt began to explode in the 1980s. The S&P, as a percentage of its closing price in 1959, also increased, but nowhere near as much as the change in margin debt. 

Zooming into the period between 1994 and the present (but maintaining 1959 as our start date), we see the same story magnified.

The chart points to the Tech Bubble in the late 90's and early 00's, as well as to the chaos during and following the Financial Crisis and subsequent recession. When the economy is booming, margin debt and the S&P boom; when the economy contracts, so does margin debt outstanding and the S&P. 

What does this tell me about my investments?

Watching margin debt as an economic indicator gives investors a window into the economy's current position in the short term debt cycle. The economy today is still going through a once-in-a-generation deleveraging period, but without that long term cycle, we are still experiencing the ebb and flow of the short term debt cycle. 

Just like in the Long Depression of 1879-1893 and the Great Depression of 1929-33, we will see rising and lowering expectations for short and medium term economic performance as fundamentals get back on track. Leverage, for better or worse, is a huge driver in our economy at the macro level, and the rise of leverage will lift the economy -- particularly in the short and medium term. This means higher stock prices, more jobs, and higher, more generalized prosperity. 

But as the chart demonstrates, when the economy sputters, leverage declines along with the stock market. 

I consider myself to be a long term investor, but that does not preclude me from watching the economy closely to know when to buy and -- perhaps more importantly -- when to stay on the sideline. I'll be watching these margin debt data reports closely as an indicator for market pain hiding just around the corner.