Stocks shook off an early wobble to eke out small gains Tuesday, nudging the S&P 500 index to an all-time high for the second straight day.
Communications services, technology and consumer goods companies helped push the market higher. Those gains outweighed losses in energy and financial stocks and elsewhere.
Trading was subdued ahead of the Independence Day holiday in the U.S. Thursday. Markets will close early on Wednesday.
Investors drove a strong comeback in stocks last month and have continued to do so this week on expectations that the Federal Reserve will cut interest rates amid signs of a slowing global economy and uncertainty over multiple U.S. trade disputes.
Traders are waiting to see what will come from the latest truce in the U.S.-China trade war. They're also looking ahead to a key government jobs report due out Friday, among other potential market-moving developments in the next few weeks.
"With everyone trying to figure out what the next step is going to be in terms of what the Fed is going to do and how strong the economy is, we're kind of in a void here today," said Willie Delwiche, investment strategist at Baird.
After barely budging for much of the day, the S&P 500 rose 8.68 points, or 0.3%, to 2,973.01. That's the benchmark index's seventh record high this year.
The Dow Jones Industrial Average gained 69.25 points, or 0.3%, to 26,786.68. The Nasdaq composite added 17.93 points, or 0.2%, to 8,109.09.
Small-company stocks fell, sending the Russell 2000 index down 9.13 points, or 0.6%, to 1,560.54.
Major stock indexes in Europe finished higher.
Wall Street's gains in the first half of the year were marked by months of volatile trading as investors rode the ups and downs of the trade war. That volatility is unlikely to fade as Washington and Beijing move forward with another round of negotiations.
Presidents Donald Trump and Xi Jinping of China agreed over the weekend to resume trade talks. The United States also agreed not to impose additional tariffs on the world's second-largest economy.
The detente is good news for markets, but tariffs in place have already hurt global economic growth, and investors see that the two sides still face the same differences that caused talks to break down earlier.
"Yesterday's optimism in equity markets is beginning to look a little over-eager, with some already drawing worrying parallels to the November 2018 G-20 summit, which was followed up by a dramatic fall for equities," said Chris Beauchamp, chief market analyst at IG.
Companies are lining up to tell investors in upcoming weeks how much profit they made during the spring. Expectations are generally low, and this could be the first time in three years that S&P 500 companies report a back-to-back decline in overall earnings, according to FactSet.
Besides the government's latest monthly tally of hiring on Friday and the beginning of the next earnings reporting season, the next big milestone for markets may be the Federal Reserve's meeting at the end of July. There, many investors expect the Fed to cut interest rates for the first time since the Great Recession in 2008 in the face of slowing economic momentum around the world.
Communications, technology and consumer goods makers accounted for much of the market's gains Tuesday. Verizon rose 2.6%, Cisco Systems gained 2% and Philip Morris International added 2.3%.
Energy stocks fell broadly after U.S. crude oil prices slid nearly 5% a day after OPEC agreed to extend a cut in production levels for nine months. Marathon Oil dropped 4.9% and Concho Resources lost 4.3%.
The yield on the 10-year Treasury note fell to 1.97% from 2.03% late Monday. The yield is now close to its lowest level since the 2016 election. Yields have been falling since last autumn on worries about a slowing economy and as expectations have climbed for a rate cut by the Federal Reserve.
The slide in bond yields weighed on financial stocks. When yields decline they push down interest rates that banks charge for mortgages and other loans, cutting into their profits. Comerica dropped 3.3% and SunTrust Banks fell 1.6%.
Lighting company Acuity Brands sank 7.8% despite reporting stronger profit for its latest quarter than analysts expected. Revenue was below expectations, and the company cited "ongoing angst generated by trade policy issues" in the market.
Delta Air Lines climbed 1.3% after it gave a profit forecast for the just-completed quarter that was stronger than analysts had been expecting. The carrier said revenue during the quarter was at the high end of its initial expectations, while costs outside of fuel were up just 1% to 2%.
In commodities trading, benchmark crude oil fell $2.84 to settle at $56.25 a barrel. Brent crude, the international standard, lost $2.66 to close at $62.40 a barrel.
Wholesale gasoline fell 6 cents to $1.87 per gallon. Heating oil dropped 7 cents to $1.89 per gallon. Natural gas slid 3 cents to $2.24 per 1,000 cubic feet.
The price of gold rose $18.70 to $1,408 per ounce, silver gained 5 cents to $15.15 per ounce and copper dropped 2 cents to $2.66 per pound.
The dollar fell to 107.84 Japanese yen from 108.46 yen on Friday. The euro rose to $1.1291 from $1.1286.
AP Business Writer Stan Choe contributed to this report.