NEW YORK (Reuters) - Stocks on Wall Street came off their highs in late trading after U.S. President Donald Trump announced a partial trade deal with China that could be signed within weeks, with the boost from New York enough to give stocks across the globe their largest daily gain in two months.

The British pound closed its strongest week against the dollar in over two years on hopes that Britain was moving closer to a smooth exit from the European Union and oil jumped over 2% after reports of an attack on an Iranian tanker.

The MSCI world equity index .MIWD00000PUS posted its first weekly rise in four. Frankfurt's main stock index .GDAXI, seen as sensitive to trade wars because of its export-oriented components, ended up 2.9% for its biggest daily gain since January 4.

The U.S.-China deal agreed on Friday covers agricultural purchases, currency and some aspects of intellectual property protections, and it averted a tariff hike scheduled for next week, though there was no mention of tariffs set to rise in December.

The S&P 500 rose as much as 1.9% but ended the day up 1.1% after the agreement announcement triggered selling.

“Anything that was less than a comprehensive agreement was likely to see some degree of market selloff,” said Michael James, managing director of equity trading at Wedbush Securities in Los Angeles.

“The timing had a lot to do with the volatility. There were 15 minutes to go in the trading day on a Friday,” he said.

Investors had said they were hoping for, at best, a deal limited in scope, and noted that rhetoric had in the past failed to translate into meaningful action.

“We have been here before, where we have seen positive talk. It’s possible they will be able to do a smaller deal around tariffs, where there is some room for movement,” said Mike Bell, global market strategist at J.P. Morgan Asset Management.

FILE PHOTO: A trader works on the floor of the New York Stock Exchange shortly after the closing bell in New York, U.S., October 2, 2019. REUTERS/Lucas Jackson

The Dow Jones Industrial Average .DJI rose 390.17 points, or 1.47%, to 26,816.59, the S&P 500 .SPX gained 32.14 points, or 1.09%, to 2,970.27 and the Nasdaq Composite .IXIC added 106.27 points, or 1.34%, to 8,057.04.

The pan-European STOXX 600 index .STOXX rose 2.31% and MSCI's gauge of stocks across the globe .MIWD00000PUS gained 1.38%. Emerging market stocks rose 1.51%.

POUND RALLIES

Sterling jumped 2.55% versus the dollar this week, its largest weekly gain in more than two years. The EU Brexit negotiator reported a “constructive” meeting with his British counterpart.

Sterling GBP= ended the session at $1.2647, up 1.66%.

Graphic: Sterling loses a cent in two minutes before recovering -

The Federal Reserve said it would begin buying about $60 billion per month in Treasury bills to ensure “ample reserves” in the banking system, a program that will continue at least until the second quarter of 2020.

The dollar fell toward its session lows after the Fed announcement.

The dollar index .DXY fell 0.37%, with the euro EUR= up 0.33% to $1.104.

The Japanese yen weakened 0.40% versus the greenback at 108.43 per dollar as its global safe-haven luster faded.

In commodities, oil prices rose after Iranian media said a state-owned oil tanker had been attacked in the Red Sea near Saudi Arabia, raising the prospect of supply disruptions, but bearish oil demand forecasts are seen keeping a lid on gains.

U.S. crude CLc1 rose 2.54% to $54.91 per barrel and Brent LCOc1 traded at $60.69, up 2.69% on the day.

The Fed announcement triggered a steepening of the U.S. yield curve, with the spread between 10-year US10YT=RR and three-month US3MT=RR yields on track to end the session in positive territory for the first time since May.

Benchmark 10-year notes US10YT=RR fell 23/32 in price to yield 1.7342%, from 1.656% late on Thursday.

The 2-year note US2YT=RR fell 4/32 in price to yield 1.5975%, from 1.53% late on Thursday.

Graphic: Global assets in 2019 - tmsnrt.rs/2jvdmXl

Graphic: Global currencies versus dollar - tmsnrt.rs/2egbfVh