The S&P 500 positioned itself on Thursday to snap a four-day losing streak that capped an otherwise strong 2024.