Rising prices hit the U.S. economy hard on the heels of the pandemic, and many believe some blame lies with the Federal Reserve. Had policymakers moved more swiftly, they may have quashed inflation before it reached a four-decade high. Instead, the Fed delayed action for months, then attempted to course correct by pivoting into the fastest series of rate hikes since the 1980s.

That chain of events worried Wall Street. Many investors feared the Fed would overtighten and choke the economy into a recession, and that caused the S&P 500 (^GSPC 1.02%) to nosedive into a bear market last year. But the index has rebounded sharply in recent months, propelled upward by signs of economic resilience and better-than-expected earnings.

Better yet, one stock market indicator says the S&P 500 could climb even higher in the coming months.

An abstract multicolored stock price chart.

Image source: Getty Images.

The stock market could soar when the Fed stops raising interest rates

The Federal Reserve has guided the economy through six rate hike cycles (excluding the current one) since 1983, and those events have historically affected the stock market in similar ways. Specifically, the S&P 500 increased during the 12-month period following five of the last six rate hike cycles, meaning the index produced a positive return 83% of the time.

Better yet, the S&P 500 gained an average of 16.7% during the year following each of those six cycles, and it gained an average of 46.2% during the subsequent three years. That information is particularly timely because core inflation fell to a 21-month low in July, so many investors believe the current cycle has run its course. But even if the Fed tightens credit conditions a little further, the futures market is signaling two more rate hikes at the most, and they would likely be effected when the Federal Open Market Committee meets in November and December.

Here's the bottom line: History says the S&P 500 could soar following the final rate hike in the current cycle, and that event has either already happened or is fast approaching. Either way, now is an excellent time to put money into the stock market, especially an S&P 500 index fund.

Another reason to believe the S&P 500 is headed higher

Scorching inflation and rising interest rates are headwinds to consumer spending and business investments, two metrics that account for 85% of gross domestic product (GDP), and those headwinds caused economic growth to decelerate in the fourth quarter of 2022 and the first quarter of 2023. But that trend seems to be unwinding.

Sequential GDP growth accelerated to an annualized 2.4% in the second quarter, crushing the consensus estimate by 60 basis points, and early projections point to another acceleration in the current quarter. Specifically, third-quarter GDP is currently forecasted to increase at an annualized 5.9%, due in large part to strength in consumer spending and business investments, according to data from the Federal Reserve Bank of Atlanta.

So what? Economic momentum appears to be snowballing, meaning the odds of a significant downturn are diminishing by the day. Indeed, JPMorgan Chase and Bank of America recently recanted their predictions of a recession. That trend should boost investor sentiment, which could easily send the S&P 500 higher in the coming months.

A few places investors can put their money right now

As mentioned, now is an excellent time to buy an S&P 500 index fund like the Vanguard S&P 500 ETF (VOO 1.00%). Shareholders would benefit if the S&P 500 does indeed rise sharply in the coming months, but the index fund is still worth buying even if those near-term gains fail to materialize. The S&P 500 returned 1,630% over the last three decades, or 10% annually, and there is no reason to believe the next three decades will look any different.

Alternatively, investors who prefer individual stocks should consider industry-leading names like Amazon. The company has a strong competitive position in three markets forecasted to grow quickly -- e-commerce, cloud computing, and ad tech software -- yet shares currently trade at 2.6 times sales, a nice discount to the five-year average of 3.5 times sales.