NEW YORK (Reuters) - U.S. stocks edged higher on Wednesday, extending a strong start to the quarter as a rally among chipmaker shares provided a boost to the broader market on growing hopes of a trade deal between Washington and Beijing.

White House economic adviser Larry Kudlow said talks between the United States and China have progressed and both sides hope to get closer to a deal this week.

Shares of chipmakers, which rely heavily on China for revenue, especially benefited. The Philadelphia Semiconductor index jumped as much as 3% to a record high. The index ended 2.3% higher.

Advanced Micro Devices Inc shares gained 8.5%, the most on the S&P 500, and Intel Corp shares rose 2.0% after Nomura Instinet started coverage of both the stocks with “buy” ratings.

Positive sentiment on trade outweighed weak economic data. The Institute for Supply Management’s U.S. services sector PMI for March was below estimates and at its lowest since August 2017.

Earlier, the ADP National Employment Report showed U.S. private employers added 129,000 jobs in March, below economists’ estimates.

“It’s the push-and-pull hope of a trade deal versus the stark reality of disappointing economic news,” said Oliver Pursche, chief market strategist at Bruderman Asset Management in New York.

The Dow Jones Industrial Average rose 39 points, or 0.15%, to 26,218.13, the S&P 500 gained 6.16 points, or 0.21%, to 2,873.4 and the Nasdaq Composite added 46.86 points, or 0.6%, to 7,895.55.

The S&P 500 came off its highs in afternoon trading after a report from cybersecurity firm UpGuard that millions of Facebook Inc’s user records were inadvertently posted on Amazon.com Inc’s cloud computing servers in plain sight.

Facebook shares turned negative on the report and ended 0.4% lower.

“Facebook looks like it’s trotting down the road to regulation,” said Kim Forrest, chief investment officer at Bokeh Capital Partners in Pittsburgh. “Whenever a company has a high market share and it’s in the political spotlight, that’s not a great combination.”

Still, dovish Federal Reserve and trade hopes set the stage for a strong start to the quarter. The S&P 500’s gains put the benchmark stock index just 2% below a record high set in September.

Boeing Co capped gains on the Dow, with its shares dropping 1.5% after Baird said it expects Wall Street to cut earnings estimates “considerably” after the company reports delivery numbers next week. The numbers could reflect the 737-MAX groundings following the Ethiopian crash, Baird said.

Advancing issues outnumbered declining ones on the NYSE by a 1.51-to-1 ratio; on Nasdaq, a 1.43-to-1 ratio favored advancers.

The S&P 500 posted 57 new 52-week highs and three new lows; the Nasdaq Composite recorded 79 new highs and 33 new lows.

Volume on U.S. exchanges was 7.24 billion shares, compared to the 7.45 billion average for the full session over the last 20 trading days.