The S&P 500 SPX, -0.84% , which had earlier traded back and forth between slight gains and losses, finished down 4.02 points, or 0.2%, at 2,338.17, as energy shares closed down 1.4% with oil futures US:CLK7 settling down 3.8% at $50.44 a barrel.