For more than a century, Wall Street has been a generational wealth-building machine. Although housing, gold, oil, and bonds have all increased in value, the annualized returns offered by stocks runs circles around these other asset classes over extended periods.

But going from Point A to B on Wall Street doesn't occur in a straight line. It typically involves stock market corrections and bear markets along the way. Since this decade began, the ageless Dow Jones Industrial Average (^DJI 0.40%), widely followed S&P 500 (^GSPC 1.02%), and growth-centric Nasdaq Composite (^IXIC 2.02%) have danced between bull and bear markets.

When volatility arises, investors will often seek out economic data and predictive indicators to get a better bead on which direction the Dow, S&P 500, and Nasdaq Composite will head next. Although there isn't a foolproof indicator that can, with 100% accuracy, make this call, there are a small assortment of datapoints and predictive tools with exceptionally strong track records.

One such forecasting tool, with a flawless track record dating back 57 years, is pointing to a big move to come for the stock market.

A person drawing an arrow to and circling the bottom to a large drop in a stock chart.

Image source: Getty Images.

The U.S. economy and stock market may not be out of the woods just yet

In October, the U.S. Commerce Department's Bureau of Economic Analysis reported that U.S. gross domestic product screamed higher at an annual rate of 4.9% during the third quarter. It was a direct slap in the face to economists and pundits who'd been calling for a recession to occur for much of the past year.

But this chapter for the U.S. economy isn't closed just yet, according to the Federal Reserve Bank of New York's recession probability indicator.

The NY Fed's recession tool utilizes the spread (difference in yield) between the 10-year Treasury bond and three-month Treasury bill to determine how likely it is that a U.S. recession will occur over the next 12 months.

Traditionally, the Treasury yield curve slopes up and to the right. In other words, the longer an investors' money is tied up in a Treasury debt security, the higher the yield they should receive. A yield curve that slopes up and to the right usually signals a healthy economy.

Trouble brews when the Treasury yield curve inverts. Just as the name implies, an inverted yield curve is when short-term bills sport higher yields than long-term bonds. This inversion is a sign that investors see challenges ahead for the U.S. economy. What's particularly noteworthy about yield-curve inversions is that while not all inversions are followed by a recession, every recession following World War II has been preceded by a yield-curve inversion. It's a key ingredient for an economic downturn.

US Recession Probability Chart

US Recession Probability data by YCharts. The gray areas denote U.S. recessions.

In October, the yield-curve inversion between the 10-year T-bond and three-month T-bill shrunk to about (0.69%). Nevertheless, the NY Fed's forecasting tool predicts a 46.11% chance of a U.S. recession by October 2024.

On paper, a 46% chance of a recession might seem no worse than a coin flip. However, the NY Fed's predictive tool has been far more accurate over the past 55-plus years. Any time the NY Fed's forecasting tool has surpassed a 32% probability of recession since 1966, the U.S. economy has, without fail, dipped into a recession.

This selection of 1966 isn't arbitrary. It represents the one and only time, dating back to 1959, that the NY Fed's forecasting tool offered a false recession reading. Though the probability of a recession surpassed 40% in October 1966, no recession ever materialized. While it's not a perfect indicator, it's been flawless now for more than a half-century.

While the stock market and U.S. economy aren't linked at the hip, there's a logical connection between economic strength/weakness and corporate earnings growth/contraction. Historically, around two-thirds of the S&P 500's drawdowns have occurred after, not prior to, a recession being officially declared. The implication being that if (key word) a U.S. recession does materialize, the Dow Jones, S&P 500, and Nasdaq Composite would be expected to head meaningfully lower -- especially with equity valuations still well above their historic average.

A businessperson critically reading the financial section of a newspaper.

Image source: Getty Images.

Here's why smart investors are focused on the long-term

In addition to the NY Fed's forecasting tool warning of potential trouble, a couple of important money-based metrics also imply that the U.S. economy and stocks are straddling dangerous territory.

Despite these cautionary tales and historic correlations, smart investors are ignoring what could be a lot of white noise in the quarters to come and looking to the future. That's because time has a habit of rewarding the patient.

If you were to look back to the start of 1950, you'd seen no shortage of corrections and bear markets for the benchmark S&P 500. According to data aggregated by sell-side investment company Yardeni Research, the S&P 500 had endured 39 separate double-digit percentage downturns over the past 73-plus years. That's a 10% or greater decline, on average, every 1.9 years -- or about what we've experienced since this decade began.

However, there's a marked difference in length between bull and bear markets.

Five months ago, researchers at investment analysis company Bespoke Investment Group took the time to analyze the length of bull and bear markets for the S&P 500 dating back to the start of the Great Depression in September 1929. There were two pretty glaring takeaways from this dataset.

To start with, the average length of bull markets (1,011 calendar days) are about 3.5 times longer than the average bear market for the S&P 500 (286 calendar days). Statistically speaking, you have a far greater chance of being on the right side of history if you're betting on economic growth and corporate earnings expansion.

The other important takeaway is the sheer length of the longest economic expansions. Among the 27 bull and bear markets examined by Bespoke, the longest bear market lasted just 630 calendar days (Jan. 11, 1973-Oct. 3, 1974). By comparison, there have been 13 bull markets since March 1935 that have lasted for a greater period of time than the longest bear market.

Wall Street is never going to perfectly behave as investors expect, nor are short-term emotions going to always coincide with predictive indicators and forecasting tools. But when examined over long periods, being optimistic and thinking long-term is a recipe that has an unmatched success rate.