NEW YORK - A gauge of global equity markets hit a five-month high on Friday on investor optimism over U.S.-Chinese trade talks and hopes a new Brexit vote next week will prove successful, but the dollar headed to its biggest weekly loss since early December.

Hopes of Britain avoiding a chaotic exit from the European Union lifted stock indexes in Europe to highs last seen in October, while substantive progress on U.S.-China trade talks -as reported by China's state-run news agency - also buoyed sentiment.

Prime Minister Theresa May's deputy warned lawmakers that unless they approved her Brexit divorce deal after two crushing defeats, Britain's exit from the EU could face a long delay.

The dollar fell broadly, dragged lower by weak U.S. economic data that sent the euro higher and helped gold prices to rebound from below $1,300 an ounce. The pound posted its biggest weekly gain in seven weeks, up more than 2 percent for the week.

U.S. manufacturing output fell for a second straight month in February and factory activity in New York state was weaker than expected this month, further evidence of a sharp slowdown in economic growth early in the first quarter.

The reports added to recent weak U.S. economic data and underscored the Federal Reserve's "patient" approach toward hiking interest rates, a trend that favors equities, said Rahul Shah, chief executive of Ideal Asset Management.

"Slower growth in the U.S. enables the Fed to be more patient, so that's why you're seeing some dollar weakness," Shah said, noting it makes lower-volatility stocks more appealing.

Higher U.S. rates than elsewhere among major economies will draw capital from foreign markets and ultimately put upward pressure on the dollar, Shah added.

"It looks like the U.S. will avoid a recession in 2019, which gives a little bit of a green light to take a little more risk," he said.

MSCI's all-country world index, a gauge of equity performance in 47 countries, gained 0.62 percent while the FTSEurofirst 300 index of leading European shares closed up 0.73 percent as all major bourses in Europe rose.

The rally pushed the S&P 500 to its best weekly gain since the end of November and the best weekly gain for the Nasdaq this year.

The Dow Jones Industrial Average rose 139.07 points, or 0.54 percent, to 25,849.01. The S&P 500 gained 13.99 points, or 0.50 percent, to 2,822.47 and the Nasdaq Composite added 57.62 points, or 0.76 percent, to 7,688.53.

Fed officials are scheduled to meet next week to assess the economy and the course of U.S. monetary policy. While no change in rates is expected, officials might take a more cautious view on the global economy after a volatile week in currency markets.

Sterling rose 0.35 percent to $1.3285 and the dollar index fell 0.2 percent. The euro gained 0.13 percent to $1.1317 while the Japanese yen strengthened 0.18 percent versus the greenback at 111.53 per dollar.

Benchmark 10-year and 2-year U.S. Treasury yields fell to their lowest levels since early January, knocked down by the weak U.S. economic data and the growing perception the Fed will stand pat on raising rates for the rest of the year.

The benchmark 10-year U.S. Treasury note rose 10/32 in price to push yields down to 2.5925 percent.

U.S. crude futures briefly hit a 2019 high but later retreated along with benchmark Brent oil as worries about the global economy and robust U.S. production put a brake on prices.

West Texas Intermediate (WTI) crude oil futures settled down 9 cents at $58.52 a barrel. Brent crude futures slid 7 cents to settle at $66.16.

U.S. gold futures settled 0.6 percent higher at $1,302.90 an ounce. (Reporting by Herbert Lash; Editing by Phil Berlowitz and Dan Grebler)

© Reuters News 2019