The S&P 500 is seriously flirting with bull market territory. The major index already met one key prerequisite for a new bull market by soaring more than 20% from its previous bear market low. Now it only needs to achieve a new all-time high. Just a small gain could make that a reality.

Of course, it's possible that the S&P 500 could check off the second box, only to fall yet again. But that's not a foregone conclusion.

Is a sustained bull market on the way in 2024? Here's what history shows.

Hand turning wood blocks to spell "bull" instead of "bear."

Image source: Getty Images.

Election-year trend

Probably the most important differentiating factor about 2024 is that it's a U.S. presidential election year. That might not seem like a big deal at first blush, but there's an intriguing trend to know about.

Morningstar and Ibbotson Associates analyzed S&P 500 returns during each U.S. presidential election year between 1928 and 2016. The S&P 500 rose in 19 of the 23 election years during the period -- a batting average of nearly 0.83.

This analysis didn't include the most recent U.S. presidential election year of 2020. However, the trend continued then, too, with the S&P 500 rising 16%.

SPY Chart

SPY data by YCharts.

Why does the S&P 500 tend to perform well during presidential election years? There are various theories.

Some think that the party holding the White House prioritizes taking actions that help the economy, thereby boosting stocks (and the prospects of retaining the presidency). It could also simply be a coincidence: The number of election cycles since the inception of the S&P 500 and its predecessors is relatively small.

Big fall, big bounce effect

Another factor to consider is momentum. When stocks deliver strong gains in a given year, the momentum frequently continues into the next year. This is especially true when the big gains follow a year when the S&P 500 experienced a steep downturn.

There have been only three times in the history of the S&P 500 in its present form when the index fell by 15% or more in one year and then rebounded by 15% or more in the subsequent year. In all three cases, the S&P extended those gains in the year after the initial bounce.

The one catch is that the index didn't deliver as great of a return in the year after a rebound as it did during the year of the rebound. We can see this effect in the most recent big-fall/big-bounce cycle. In 2008, the S&P 500 plunged 38%. The next year, it soared more than 23%. This momentum continued in 2010 but at a slower pace, with the S&P jumping 13%.

SPY Chart

SPY data by YCharts.

We're about to see history repeat itself -- at least partially. The S&P sank a little over 19% in 2022. It should close up well over 20% this year. Based on past trends, the index could continue rising in 2024.

A sustained bull market on the way?

If history is any guide, the chances look quite good that the S&P 500 will be in a sustained bull market in the new year. However, history isn't always a great guide.

The reality is that no one knows for sure what the stock market will do over a given 12-month period. Even the great Warren Buffett wrote to Berkshire Hathaway shareholders in 2019 that he and his late business partner Charlie Munger "have no idea as to how stocks will behave next week or next year."

However, every investor can take comfort in the fact that over a long enough period, the S&P 500 has always risen. The management teams of the 500 companies in the index must answer to shareholders who expect growth. Accordingly, they take the steps they think will help deliver growth.

Granted, their efforts don't always succeed. If they fail too much, though, their companies will be replaced in the S&P 500 by another company that is growing.

Maybe there will be a bull market in 2024; maybe not. But the S&P 500 goes up in more years than it goes down. And over the long term, the index will almost certainly move higher.