The market outlook appears gloomy as inflation persists and a recession starts to feel seemingly inevitable. But investors should remember that the stock market is forward-looking, so even if the current macroeconomic situation looks bleak, stocks aren't necessarily going to continue bleeding.

In fact, the U.S. Investor Sentiment bull-bear spread is nearly neutral at around -2%. Anything above 0% indicates bullish sentiment while anything negative is bearish.

US Investor Sentiment, % Bull-Bear Spread Chart

US Investor Sentiment, % Bull-Bear Spread data by YCharts

As you can see from the chart above, the market sentiment has plunged as low as -40% as recently as September.

While the chart above suggests a capitulation, there's another telling indicator I've been watching closely: margin debt.

I believe the drop-off in leverage could suggest investors are nearing a bottom in the bear market.

Person crossing their arms looking upward hopefully.

Image source: Getty Images.

What is margin debt?

Buying stocks with margin is essentially just investing with borrowed money. As greed increases in a bull market, investors start to use more and more margin until eventually the market crashes and brokerages begin asking investors to cover their debts.

This is known as a margin call, and when it happens on a large scale it typically signals the end of a bull market.

Each month the Financial Industry Regulatory Authority (FINRA) releases the total amount of margin used by investors. Tracking this data can give you an indication of where investors are in the market cycle (i.e., if margin skyrockets the market is euphoric, and if it crashes the market is fearful).

A key chart to watch

I'm particularly interested in the change in margin debt compared to the S&P 500. Historically, as margin rises faster than the market, investors can expect a crash in the relatively near future. Conversely, if it begins falling faster than the market, it could be a sign of capitulation.

FINRA Margin Debt Chart

FINRA Margin Debt data by YCharts

As you can see in the chart above, the margin debt levels have fallen sharply. Most notably, leverage has crashed harder than the overall market.

Let me be clear: This doesn't mean this bear market has bottomed. There are plenty of examples throughout the market's history where stocks have continued to decline despite a steeper decline in margin.

But recent history indicates this is a good sign for a market recovery, and investors should keep a watchful eye on the October margin numbers, which FINRA will release the third week of November.

This doesn't change anything for long-term investors

Tracking and analyzing the macro situation is a prudent exercise for investors, but it shouldn't change the way you invest. Even the smartest economists are more wrong than right in their predictions.

In trying to time the bottom you run the risk of having your money sit on the sidelines uninvested. The age-old market slogan "time in the market trumps timing the market" rings true today more than ever. Long-term investors are best off continuing to buy great companies on a regular basis than trying to predict exactly when the market will start its recovery.

That being said, a little macroeconomic analysis still a worthwhile endeavor so long as you don't base your investing strategy solely upon your conclusions.