The S&P 500 (^GSPC 1.02%) gained nearly 6% during the first week of November, marking its best weekly performance of the year. That upward momentum was broad-based in nature: 159 stocks in the S&P 500 (nearly one-third of the index) also had their best weeks of the year, according to The Wall Street Journal.

The primary driver of that momentum was action (or lack thereof) taken last week by the Federal Reserve. Specifically, policymakers held the benchmark federal funds rate steady for the second consecutive meeting, giving investors reason to believe the rate hikes may be over.

Jobs data from the Labor department reinforced that outlook. Hiring slowed sharply in October and unemployment topped expectations. Both trends point to an economy under pressure, and that could certainly dissuade policymakers from future rate hikes.

Investors see that as a net positive. The federal funds rate influences other rates across the economy, such as mortgages and personal loans. So an end to the rate hikes would mean lending conditions have reached a low point. The next step would be rate cuts.

So this is the question: Where will the stock market go from here?

Wall Street expects the S&P 500 to hit a record high in the next year

S&P 500 companies reported an earnings decline in the fourth quarter of 2022 and the first two quarters of 2023. Not all companies have reported earnings in the third quarter, but that trend appears to be reversing course, and consensus estimates call for double-digit earnings growth in 2024.

Accordingly, Wall Street has a bullish outlook for the stock market. The S&P 500 carries a 12-month price target of 5,052, implying nearly 16% upside from its current level of 4,371. That bottom-up forecast aggregates the median target price on every stock in the index, blending about 11,250 individual ratings, according to FactSet.

Should Wall Street prove correct, the S&P 500 would blow by its previous record high of 4,797 and enter a new bull market during the next year. That momentum could easily lead to more profound gains. The S&P 500 returned an average of 169% during the 12 bull markets that have taken place since its inception in 1957, according to Bloomberg.

A recession could send the S&P 500 lower

The collective bullishness among Wall Street strategists is encouraging, but investors should always remember that no one knows the future. Consensus estimates will be spot on sometimes, but they will be wildly inaccurate at other times. So the best recourse is to avoid making decisions based solely on forecasts, especially short-term forecasts.

Ultimately, where the S&P 500 goes from here depends on a constellation of variables with unpredictable outcomes. The stock market could skyrocket if the Fed starts cutting rates and corporate earnings meet expectations. But the stock market could just as easily decline if the economy slips into a recession.

Some experts see a recession as a distinct possibility because the U.S. money supply is shrinking for the first time in decades and the U.S. Treasury yield curve is inverted. If the economy does slip into a recession, history says the S&P 500 would fall about 31% from its high, meaning the index could decline about 22% from its current level.

The most logical move is to stay invested and keep buying quality stocks

Investors should not avoid the stock market just because a recession is possible. On the contrary, doing so could very easily backfire because -- I'll say it one more time -- no one knows the future. That means high points in the S&P 500 are unpredictable, but it also means low points in the S&P 500 are unpredictable.

So what? After hitting bottom during the last 10 recessions, the S&P 500 returned a median of 38% over the next year and 51% over the next two years.

Those statistics are particularly compelling because the S&P 500 tends to hit bottom about four or five months before economic activity hits bottom. That means the stock market usually rebounds before recessions end, so investors that attempt to time the market will probably miss some (or even most) of the rebound.

That leaves only once logical course of action: Investors should stay invested (and continue buying quality stocks) no matter what happens in the next year.