NEW YORK — A day of back-and-forth trading Thursday ended with the fifth gain in a row for U.S. stocks. Industrial companies like Boeing and General Electric rose while retailers fell as Macy's suffered its biggest loss of all time.
Stocks struggled in the early going and the Dow Jones Industrial Average lost 175 points after U.S. and Chinese officials wrapped trade talks in Beijing. Transportation and machinery companies climbed after the U.S. Trade Representative said China agreed to buy more agricultural and manufactured products.
Macy's said its sales over the holidays were worse than expected and slashed its annual profit and sales forecasts. Kohl's and L Brands also posted disappointing results and a wide variety of retailers plunged as investors worried that the stock market's December plunge stopped some shoppers from spending as much as they had planned.
The S&P 500 index added 11.68 points, or 0.5 percent, to 2,596.64. The Dow gained 122.80 points, or 0.5 percent, to 24,001.92 after it fell 175 points in the morning.