The U.S. stock market’s hefty gains in 2023 could provide a lift for equities next year, if history is any guide. The S&P 500 ended the year on Friday with an annual gain of just over 24%. The benchmark index also stood near its first record closing high in about two years.