U.S. stocks ended pretty much where they started Thursday after spending the day cycling up and down. Investors bought safe picks like phone companies and food makers after a surprisingly weak report on the job market.

ON WALL STREET: At the close, the Dow Jones industrial average had gained 9.4 points, about 0.05 percent, to 17,720.5. The Standard & Poor’s 500 index was down less than a point at 2,064.1. The Nasdaq composite index had given up 23.4 points, about 0.5 percent, to 4,737.3 as technology and health care stocks traded lower.

advertisement | advertise on newsday

OIL PRICES: As markets closed, benchmark U.S. crude oil, which is at its highest price since early November, was up 16 cents at $46.39 a barrel on the New York Mercantile Exchange. In London, Brent crude, the benchmark for international oil prices, gained 30 cents to $47.90 a barrel.

The International Energy Agency said it thinks the global oil surplus will shrink by the year’s end, bringing supply and demand much closer to balance.

AN UP-DOWN DAY: Stocks started the day higher. Materials companies climbed after Monsanto, an agricultural giant, soared on reports it might be acquired. The market turned lower in late morning trading as investors worried about the Labor Department’s report, which showed an unexpected jump in the number of people seeking unemployment benefits.

JOBLESS BENEFITS: The Labor Department said applications for unemployment benefits rose to the highest level since February 2015. That comes after a disappointing jobs report for April. Applications rose by 20,000 to 294,000. Despite the increase, they have remained below 300,000 for more than a year.

BIG GAINERS: The biggest gains went to phone companies, chemicals makers and consumer stocks. AT&T increased 37 cents to $39.55. Among consumer companies, Kraft Heinz rose $1.14, or 1.3 percent, to $86.34 and Coca-Cola added 37 cents to $45.83.