Stocks declined on Thursday after two consecutive record highs for the S&P 500, as investors sold off popular stocks following Walmart’s cautious forecast, raising concerns about the broader economic outlook. It was red across the board with all four major US indices closing down.