The last trading day of 2023 was a loser for U.S. equities, with the S&P 500 dropping 0.3%, but for the year the index skyrocketed 24%.