For 13 months, investors have enjoyed an almost uninterrupted rally for the ages. Since the iconic Dow Jones Industrial Average (^DJI 0.54%), benchmark S&P 500 (^GSPC 0.38%), and technology-reliant Nasdaq Composite (^IXIC 0.35%) hit their bear-market bottoms on March 23, 2020, these widely followed indexes have gained 83%, 87%, and 106%, respectively, through April 26.

In one respect, things couldn't possibly be better for equities. The Federal Reserve has pledged to keep lending rates at or near historic lows for years. Meanwhile, Washington seems to be rolling out one trillion-dollar spending package after another. We could be on the cusp of one of the strongest growth periods for the U.S. economy that we've seen in decades.

On the other hand, the stock market isn't known to go up in a straight line. History tells a far different story of what's to potentially come -- and you may not like it.

A person drawing an arrow to and circling the bottom of a steep decline in a stock chart.

Image source: Getty Images.

History suggests a valuation-induced crash may be on the horizon

To state the obvious, it's impossible to precisely pick when a stock market crash will occur, how long it'll last, how steep the decline will be, and in many instances, what'll be the primary cause of the crash. Last year, few had "once-in-a-century pandemic" penciled in on their cheat sheets.

Nevertheless, history is pretty clear that when certain parameters are hit, a crash or sizable correction has occurred. Although the market doesn't follow averages to a T, it does tend to mirror history quite closely.

For months, the biggest telltale indicator of an upcoming crash has been the S&P 500's Shiller price-to-earnings (P/E) ratio, which is also commonly known as the cyclically adjusted P/E ratio (CAPE). The S&P 500's Shiller P/E is a measure of average inflation-adjusted earnings from the previous 10 years.

On April 26, with the S&P 500 closing at a fresh all-time high, the Shiller P/E ratio crept up to 37.62. That's well over double the average Shiller P/E (16.81) for the benchmark index since 1870 and its highest level since the dot-com bubble nearly two decades ago.

But doubling up the average S&P 500 Shiller P/E ratio throughout history isn't what's scary. What's worrisome is if you analyze how the S&P 500 responded each and every time the Shiller P/E has previously hit and sustained a ratio above 30 during a bull market. The 30 level has only been breached five times since 1870 in a continuous bull market, and in each of the previous four instances, the S&P 500 eventually declined by 20% to 89% from its peak. Though a Great Depression-esque 89% plunge is extremely unlikely today, a 20% or greater decline is quite possible, based on history.

A magnifying glass laid atop a financial newspaper, with the words Market data enlarged.

Image source: Getty Images.

Stocks don't move higher in a straight line

And that's not all.

History has given us an inside look at what happens following bear-market declines, too.

Since 1960 (a year I've chosen for the sake of simplicity), there have been nine bear markets. In each of the previous eight (i.e., not including the coronavirus crash), there was at least one double-digit percentage crash or correction within three years of reaching the bear-market bottom. In aggregate, these eight bear markets yielded 13 double-digit moves lower within three years of a bottom. That's one or two sizable crashes or corrections following every bear market.

As a reminder, we're more than 13 months removed from the S&P 500's bear-market bottom and we've yet to see a double-digit decline in the index.

Keeping in mind that the market doesn't strictly adhere to averages, it's also worth pointing out that the S&P 500 has experienced a 10% or greater decline once every 1.87 years since 1950.

Big declines are commonplace in the stock market, but there's no need for them to be feared.

A woman holding a financial newspaper and looking off into the distance.

Image source: Getty Images.

Crashes and corrections are surefire buying opportunities

One of the more interesting statistics that often gets overlooked about stock market crashes and corrections is how quickly they're over.

Out of 38 double-digit declines in the S&P 500 since the beginning of 1950, 24 of these dips have resolved in 104 or fewer calendar days. That's about 3.5 months. Another seven found their trough somewhere between 157 and 288 calendar days, or between five and 10 months. That leaves just seven double-digit declines in 71 years that took more than a year to find a bottom.

Even more important, history tells us that crashes and correction are a surefire buying opportunity. Though "surefire" isn't a word to toss around lightly when it comes to investing, each and every one of these 38 double-digit declines was eventually put in the rearview mirror by a bull market rally.

If you have a long-term mindset, history can be your greatest ally.