A meandering day of trading left stock indexes close to their record highs on Wednesday, as strong gains for health care companies jousted with sharp drops in energy stocks.
The market took a decisive turn lower in the middle of the day after a report from Reuters said the United States and China may delay signing ‘‘phase one’’ of their trade deal until December, but the drop didn’t last long. After sinking 0.3 percent, the S&P 500 erased its loss within about two hours. By the end of the day, the index was up 2.16 points, or 0.1 percent, at 3,076.78. It’s within two points of its record. The Dow Jones industrial average and the Nasdaq composite both dipped slightly. The US-China trade war has been a top concern for investors since early 2018, and momentum has recently been tilting toward at least a partial agreement. That, combined with encouraging reports on the economy and corporate profits, have recently propelled US indexes past their peaks from July to all-time highs. Among the health stocks, CVS Health helped lead the way with a 5.4 percent gain after it reported a stronger profit for the latest quarter than analysts expected.