Major Wall Street stock indices edged to fresh records on Wednesday while European and Asian markets mostly retreated as the United States and China signed a long-anticipated trade agreement.

Both the Dow and S&P 500 finished at all-time highs, while the Nasdaq ended barely positive. Analysts increasingly question whether valuations are getting out of control after a series of records.

"We've been on a tear since mid-October," said Briefing.com analyst Patrick O'Hare, who said investors likely will wait for more earnings reports from big companies before moving significantly further.

"It's going to take a lot of good new news to get the market to take another leg higher," he said.

Gorilla Trades strategist Ken Berman said the weakness among technology shares "might be the first sign of a looming correction."

Earlier, European indices followed Asia lower, though London's benchmark FTSE 100 posted a rise owing to a weaker pound which boosts share prices of the index's multinationals whose earnings in are foreign currencies.

Investors have cheered the trade deal following nearly two years of conflict in which US-China trade tensions occasionally flared, pressuring stocks.

The deal between the world's dominant economic powers called off some US tariffs that had been planned on Chinese goods, and obliged China to beef up purchases of American crops and other exports and provide intellectual property protections for US technology.

But some analysts viewed the signing as a "sell-the-news" event after earlier gains.

"We've been waiting for the (US-China) signing ceremony for so long but there is a worry that, despite details of the deal being largely concealed, what we are hearing is a little underwhelming and may be already priced in, maybe even too much," commented Craig Erlam, senior market analyst at OANDA Europe.

Analysts also warned there will not likely be much more progress on the next phase of talks ahead of the US presidential election in November.

"It's possible that instead we see Trump threaten China more, dangling the prospect of abandoning the deal and taking an even tougher stance going into the election," remarked Neil Wilson at Markets.com.

"What is not clear is the extent to which this will hurt growth rates and may contribute to upwards pressure on inflation," he added.

In other markets, oil prices retreated following a US petroleum report that showed a large increase of refined product and higher oil production.

Among individual companies, Goldman Sachs dipped 0.2 percent as it reported lower fourth-quarter earnings due in part to a one-time charge of $1.1 billion for legal costs connected to probes into the bank's role in the 1MDB scandal.

The charge comes as Goldman continues to pursue settlement talks with authorities, including the US Justice Department, over the firm's work for the scandal-plagued Malaysian investment fund.

While the mood on trading floors is upbeat ahead of the China-US deal signing, investors are steeling for the next round of talks, which are expected to be the toughest
While the mood on trading floors is upbeat ahead of the China-US deal signing, investors are steeling for the next round of talks, which are expected to be the toughest AFP / STR

New York - Dow: UP 0.3 percent at 29,030.22 (close)

New York - S&P 500: UP 0.2 percent at 3,289.29 (close)

New York - Nasdaq: UP 0.1 percent at 9,258.70 (close)

London - FTSE 100: UP 0.3 percent at 7,642.80 (close)

Frankfurt - DAX 30: DOWN 0.2 percent at 13,432.30 (close)

Paris - CAC 40: DOWN 0.1 percent at 6,032.61 (close)

EURO STOXX 50: DOWN 0.2 percent at 3,768.96 (close)

Tokyo - Nikkei 225: DOWN 0.5 percent at 23,916.58 (close)

Hong Kong - Hang Seng: DOWN 0.4 percent at 28,773.59 (close)

Shanghai - Composite: DOWN 0.5 percent at 3,090.04 (close)

Pound/dollar: UP at $1.3038 from $1.3019 at 2200 GMT

Euro/pound: UP at 85.52 pence from 85.48 pence

Euro/dollar: UP at $1.1149 from $1.1128

Dollar/yen: DOWN at 109.90 yen from 109.99

Brent Crude: DOWN 0.8 percent at $64.00 per barrel

West Texas Intermediate: DOWN 0.7 percent at $57.81 per barrel