US markets had a stellar year, with the S&P 500 gaining 24% in 2024. The index's best performance since 1997 and 1998.