The S&P 500 (^GSPC 1.02%) is up 18% in 2023, but the gains have been far from linear. Instead, the stock market has been a rollercoaster of ups and downs as investor sentiment has whipsawed in response to various signals.

The benchmark index shot higher in the first half of the year, rebounding from bear market lows amid signs of economic resilience, better-than-expected earnings, and enthusiasm surrounding artificial intelligence.

The S&P 500 then surrendered some of those gains in the second half of the year, stringing together three consecutive monthly declines in August, September, and October as recession fears resurfaced and investors came to terms with hawkish commentary from the Federal Reserve -- namely, that interest rates will likely remain elevated for longer than previously anticipated.

Yet since then, the rollercoaster has taken a sharp turn once again. Through Friday, Nov. 24, the S&P 500 notched four consecutive weekly increases largely due to a flurry of encouraging economic data, including a low October inflation reading that could signal an end to the Fed's rate-hiking campaign.

In any case, that upward momentum in the S&P 500 could be good news for investors. Here's why.

History says the S&P 500 could climb higher, and Wall Street agrees

Four-week win streaks are relatively uncommon. In fact, the S&P 500 has accomplished the feat only 10 other times in history, and those events usually preceded more upward momentum in the index. Specifically, the S&P 500 returned an average of 16.3% during the 12-month period following the 10 previous four-week win streaks, and it produced a positive return 80% of the time, according to Carson Group.

In short, history says the S&P 500 could increase about 16% over the next year. But what makes the situation especially interesting is that another forecasting tool hints at a similar outcome.

As mentioned, inflation has cooled to such an extent that many investors believe the Federal Reserve will stop raising interest rates. Since 1984, the S&P 500 has returned an average of 17.6% during the 12-month period following the end of a rate hike cycle, and it produced a positive return 83% of the time, according to JPMorgan Chase.

For context, Fed officials last raised rates on July 26, and the S&P 500 has effectively traded sideways since then. In other words, that forecasting tool says the benchmark index could rise about 18% by the end of July 2024, which is roughly in line with the 16% upside implied by the recent four-week win streak. But investors have one more cause for celebration.

Wall Street expects a significant acceleration in S&P 500 revenue and earnings growth in 2024, and that could drive the stock market higher. In fact, the optimism among Wall Street analysts can be distilled into a single number by blending the median price targets on every stock in the index. That bottom-up methodology gives the S&P 500 a price target of 5,030, implying 10% upside from its current level, according to FactSet.

Where should investors put their money today?

Investors should bear in mind that no forecasting tool is perfect, and that every situation is unique. To that end, it is impossible to predict stock market movements with absolute certainty, even when several forecasting tools converge on the same conclusion. To quote the familiar platitude: Past performance is never a guarantee of future results.

So where should investors put their money? One option is an S&P 500 index fund. The index has essentially been a guaranteed moneymaker over long periods of time. The table below shows how the odds of a positive return in the S&P 500 have historically increased with longer holding periods.

Holding Period

Odds of a Positive Return in the S&P 500

1 Year

75%

5 Years

88%

10 Years

94%

20 Years

100%

Data source: Fisher Investments.. Note: S&P 500 returns data collected from 1926 to 2017.

Alternatively, investors willing to do some homework should consider buying individual stocks. As mentioned, artificial intelligence (AI) has been a particularly hot topic, and it promises to create substantial wealth in the years ahead.

Indeed, Cathie Wood's Ark Invest believes AI could be "more impactful than the internet," and Bill Gates says AI is as fundamentally important as the creation of the microprocessor, personal computer, and mobile phone. Those technologies have made millionaires out of many investors, and the AI boom will likely have a similar outcome.