Stocks ended a wobbly day slightly lower on Wall Street as a weeklong rally fizzled out and more in Friday’s Stock Market Update.

The modest losses Friday came a day after the S&P 500 set a record closing high. On Friday the Dow Jones Industrial Average also briefly traded above the all-time closing high it reached in October.

The milestone, which eclipsed the benchmark index’s last record close on April 30, came amid a swift turnaround for stocks this month that has erased the losses from a steep sell-off in May. The major U.S. stock indexes are up more than 7% so far this month and are holding on to gains of more than 14% for the year.

Investors have been reassured by statements from the Federal Reserve this month that suggest the central bank is prepared to cut interest rates in response to a slowing global economy. At the same time, traders are concerned that corporate profits might suffer should the kind of economic slowdown that would prompt the Fed to cut rates take hold.

The biggest uncertainty looming over the market remains the U.S. trade war with China. Stocks opened the week higher and rallied since then after President Donald Trump said he planned to meet with China’s president next week at the G20 summit in Japan to discuss their ongoing trade conflict.

Health care stocks drove much of the gains. Humana climbed 4.4%, while UnitedHealth Group added 1.8%.

Communications stocks also rose, with video game publisher Electronic Arts leading the way. The stock was 2.3% higher.

Energy stocks climbed for the second day in a row along with the price of crude oil. The price of U.S. crude jumped 5.4% on Thursday and is on track for gains of more than 9% for the week. That would be the biggest weekly gain in more than two years. Only a few weeks ago, the price of U.S. crude was in a correction, what Wall Street calls a drop of at least 20% from a recent peak. Baker Hughes gained 3.3% and Valero Energy added 2.7%.

Banks rose as long-term bond yields climbed, a reversal from the day before. Higher yields allow banks to charge higher interest rates on loans. KeyCorp added 1%, Charles Schwab gained 1.4%.

Technology stocks took some of the heaviest losses, with chipmakers leading the way. Micron Technology dropped 2.6% and Advanced Micro Devices lost 3%.

Real estate and industrial stocks also fell. Ventas dropped 2%, Snap-on fell 3.6%.

STOCK MARKET UPDATE

KEEPING SCORE: The S&P 500 fell 3 points, or 0.1%, to 2,950. It’s up 7.2% so far in June. The Dow Jones Industrial Average lost 34 points, or 0.1%, to 26,719. The Nasdaq dipped 19 points, or 0.2%, to 8,031. The Russell 2000 index of smaller company stocks dropped 0.8%.

Major indexes in Europe fell.

ANALYST’S TAKE: “Some of the information we’ve gotten today hasn’t been all that impactful to kind of change the price action we saw this week,” said Ioana Martin, global investment specialist at J.P. Morgan Private Bank.

A report gauging manufacturing activity for June came in below analysts’ forecasts, while new data showed sales of previously occupied U.S. homes increased in May.

Looking ahead, next week’s G20 summit is likely to be the next big market mover, Martin said.

“That hopefully gives us a little bit more color on the trade situation,” she said.

JUNE JUMP: The stock surge on Thursday pushed the broader market closer to its best monthly gains of the year. The S&P 500 is up 7.3% for the month so far, not quite as big as the 7.9% gain it had in January.

The monthly gains have already erased a sharp slide in May, when escalations in the U.S. trade war with China prompted investors to flee to safer holdings. Both nations’ leaders have lately signaled a willingness to resolve the dispute and are meeting next week for talks. The Federal Reserve has also signaled that it is willing to cut interest rates to stabilize the U.S. economy if the trade dispute crimps growth.

DRIVING SALES: Used car retailer CarMax rose 3.1% after it blew past Wall Street’s fiscal first quarter profit and revenue forecasts. The company also blew past forecasts for sales at established car lots as more customers purchased used vehicles. That more than offset a decline in prices.

BURSTED BUBBLE: Sealed Air fell 4.5% after the company fired its chief financial officer. The maker of bubble wrap said it terminated William G. Stiehl “for cause” as part of a review related to a Securities and Exchange Commission investigation. The SEC is requesting documents and information related to the company’s audit firm selection process.

HIRING FREEZE: Staffing company Korn Ferry plunged 17.4% after reporting weak revenue during its fiscal fourth quarter and issuing a profit forecast that mostly fell short of analysts’ expectations.

© The Associated Press. All rights reserved.