Regardless of whether you're a Wall Street professional or everyday investor, 2022 has been a historically challenging year. The S&P 500 (^GSPC -0.88%), which is often viewed as the barometer of the stock market's health, turned in its worst first-half return since 1970. Meanwhile, the Nasdaq Composite (^IXIC -2.05%) plunged as much as 34% below its mid-November high. In other words, both widely followed indexes firmly entered a bear market.

These declines come on the heels of back-to-back quarterly retracements in U.S. gross domestic product, as well as a knock-your-socks-off 9.1% inflation rate in June 2022. That's the highest inflation reading in a little more than four decades.

A person writing and circling the word buy beneath a dip in a stock chart.

Image source: Getty Images.

While history would suggest that the S&P 500 and Nasdaq are likely headed even lower, one investment strategy has been foolproof in making patient investors richer.

History isn't Wall Street's friend -- at least in the short run

Before getting to the one rock-solid strategy that hasn't failed long-term investors for more than a century (and counting), let's deal with the elephant in the room: History. As much as investors love when the stock market is heading higher, three indicators with a successful track record of calling bear market bottoms imply the S&P 500 and Nasdaq Composite have further to fall.

For example, margin debt usage has predicted each of the last three bear markets before they occurred. "Margin debt" is the amount of money investors are borrowing from their brokerage, with interest, to purchase or short-sell securities. While it's perfectly normal to see margin debt increase over time as the value of equities increases, it's not normal for margin debt outstanding to increase rapidly in a short period.

Since the beginning of 1995, there have been three instances where margin debt increased by a minimum of 60% over a trailing-12-month (TTM) stretch. It occurred immediately before the dot-com bubble burst, which saw the S&P 500 ultimately fall to 49% of its value. It happened again just months prior to the financial crisis taking shape in 2007, which led to the S&P 500 declining by a peak of 57%. Lastly, it occurred in 2021, and we've already seen the S&P 500 lose as much as 24% of its value. This indicator would suggest more downside is likely.

Chart showing the S&P 500's Shiller CAPE ratio on an overall upward trend since the 1970s, with some dips.

S&P 500 Shiller CAPE Ratio data by YCharts.

The S&P 500's Shiller price-to-earnings (P/E) ratio (also known as the cyclically adjusted P/E ratio, or CAPE ratio) is another worrisome indicator in the short run. The Shiller P/E ratio examines inflation-adjusted earnings over the past 10 years, as opposed to a more traditional P/E ratio, which is over the TTM.

Since 1870, there have been five instances where the S&P 500's Shiller P/E ratio surpassed and held above 30 on a bull market run (the Shiller P/E hit 40 in January 2022). The previous four instances where it occurred resulted in declines of between 20% and 89% for the benchmark index. While a Great Depression-esque 89% decline is incredibly unlikely today due to various monetary and fiscal tools available, a bear market has been the minimum expectation for the broader market when valuations get stretched.

The third indicator of concern is the S&P 500's forward P/E ratio. A forward P/E ratio examines a company's share price -- or in this case, an index's point value -- to Wall Street's forecast earnings per share in the upcoming fiscal year. Historically, the S&P 500's forward P/E ratio has bottomed between 13 and 14 during bear markets. It was still at 16.3 as of this past weekend, which implies additional downside. 

A person reading the financial section of a newspaper.

Image source: Getty Images.

This investment strategy has been batting 1.000 for over a century

However, there's an investment strategy that has, for more than a century, made bear market declines and stock market corrections a moot point. Best of all, patience is about the only thing required for this investment strategy to succeed.

Every year, stock market analytics company Crestmont Research releases data on the rolling 20-year total returns, including dividends paid, for the S&P 500 dating back to 1919. For example, if you wanted the rolling 20-year total return for the end year of 1977, Crestmont would examine the total return for years 1958 through 1977. The latest report from Crestmont provided the 20-year rolling total returns (presented as an annualized average) for all 103 end years from 1919 through 2021. 

The result? If you bought an S&P 500 tracking index at any point in time since 1900 and (key point) held onto that position for at least 20 years, you made money -- and often quite a lot of it. Roughly 40% of the 103 end years resulted in an average annual total return of 10.9% or higher. Comparatively, the S&P 500's 20-year annual average total return was less than 5% only a couple of times spanning 103 end years. This data is precisely why billionaire Warren Buffett suggests investors buy an S&P 500 index fund.

The two most popular index funds to take advantage of this seemingly foolproof investment strategy are the SPDR S&P 500 ETF Trust (SPY -0.87%) and the Vanguard S&P 500 ETF (VOO -0.84%). While both index funds attempt to mirror the daily price action of the S&P 500, there is one noticeable difference. Though the SPDR S&P 500 ETF Trust offers a reasonably low net expense ratio of 0.09%, the Vanguard S&P 500 ETF has a leg up on its competitor with a net expense ratio of just 0.03%. In other words, only $0.30 of every $1,000 invested will go toward management fees with the Vanguard S&P 500 ETF.

It's an extremely small price to pay for an opportunity to ride the S&P 500 higher and take advantage of what's been an unstoppable investment strategy for more than a century.