NEW YORK (Reuters) - The dollar rose while key world and stock indexes on Wall Street scaled new records on Thursday as the U.S.-China trade deal, strong corporate earnings and encouraging U.S. economic data lifted equity markets.

Oil rose as the long-awaited Phase 1 trade deal brought some relief to markets, while gold prices slid briefly below the psychological level of $1,500 an ounce as the upbeat data signaled a healthy U.S. economy.

U.S. retail sales increased for a third straight month in December and the number of Americans filing claims for unemployment benefits dropped for a fifth straight week last week, indicating the labor market remained strong.

Other data showed a gauge of manufacturing activity in the U.S. Mid-Atlantic region rebounded in January to its highest in eight months, leading the Federal Reserve Bank of Philadelphia to call the factory outlook the brightest in more than 18 months.

Upbeat earnings from Morgan Stanley and a tech rally on Wall Street added to optimism from a trade deal investors hope will take the edge off a contentious 18-month U.S.-Sino dispute that has roiled markets and crimped global growth.

Stocks surged at the close on Wall Street to push the Nasdaq up slightly more than 1% and lead investors to wonder how much higher prices can go on valuations already at historic levels.

“It’s a melt-up,” said Joe Saluzzi, co-manager of trading at Themis Trading in Chatham, New Jersey. “It makes everybody look stupid,” he said, referring to the purchase of stocks at such high levels..

The market’s price-to-earnings ratio of 18.4 times earnings for the S&P 500 is the highest since 2002, leading Bank of America research to say the market is running on fumes, as the benchmark index surpassed the bank’s year-end forecast of 3,300.

Only a geopolitical event will curb an equity rally that has been largely fueled by the cutting of interest rates last year by the Federal Reserve and its expansionary monetary policy, Saluzzi said.

Mark Haefele, chief investment officer at UBS Global Wealth Management, said the trade deal has underpinned a positive outlook for risk assets, especially emerging market stocks.

However, Haefele said investors must understand the deal’s limitations. “We see the deal as representing a partial calming rather than an end to trade tensions,” he said.

FILE PHOTO: Trader Peter Tuchman wears a DOW 29,000 hat on the floor at the New York Stock Exchange (NYSE) in New York, U.S., January 15, 2020. REUTERS/Brendan McDermid

MSCI’s gauge of stocks across the globe gained 0.55%, setting all-time and closing highs. Its index for emerging market stocks rose 0.23%.

U.S. stocks also climbed to new highs, as did Canadian shares on Bay Street in Toronto.

The Dow Jones Industrial Average rose 267.42 points, or 0.92%, to 29,297.64. The S&P 500 gained 27.52 points, or 0.84%, to 3,316.81 and the Nasdaq Composite added 98.44 points, or 1.06%, to 9,357.13.

Technology stocks provided the biggest boost on Wall Street, with Apple Inc up more than 1.3% and chipmakers gaining after a strong forecast from the world’s top contract chipmaker TSMC signaled a recovery in the sector.

The market capitalization of Google parent Alphabet topped the $1 trillion mark shortly before the close of trading, making it the fourth S&P 500 component to reach the lofty level.

The Philadelphia Semiconductor index climbed 1.7%.

Morgan Stanley jumped 6.6% after it beat quarterly profit estimates and raised its performance goals, closing out fourth-quarter results at the big U.S. banks on a strong note.

European shares edged higher but Asia saw China’s biggest stocks take a slight dip overnight. [.SSEC]

The pan-European STOXX 600 index rose 0.22%. The dollar index erased earlier losses to rise on the data.

“The data flurry was positive, particularly the Philly Fed number,” said Greg Anderson, global head of foreign exchange strategy at BMO Capital Markets in New York. It “reduces the probability for a recession, which was low already.”

The dollar index rose 0.08%, with the euro down 0.13% to $1.1135. The Japanese yen weakened 0.22% versus the greenback at 110.16 per dollar.

Crude oil gains of more than 1% were capped after the International Energy Agency said it expected oil production to outpace demand.

Brent gained 62 cents to settle at $64.62 a barrel and West Texas Intermediate advanced 71 cents to settle at $58.52 a barrel.

China committed to buying more than $50 billion in additional U.S. oil, liquefied natural gas and other energy products over two years, according to the trade deal.

Central banks were active, with both Turkey and South Africa cutting their interest rates again after policy meetings.

The European Central Bank published a largely upbeat set of meeting minutes ahead of a speech from its chief, Christine Lagarde.

U.S. Treasury yields rose slightly on the strong economic data and bank earnings.

The benchmark 10-year yield was up 1.9 basis points at 1.8074%.

U.S. gold futures settled down 0.2% at $1,550.50 an ounce.