(Adds close of U.S. markets)
* World stock markets gauge notches 24% gain in 2019
* Trump announces signing of trade deal in mid-January
* Dollar slides as investors buy trade-sensitive currencies
* China December manufacturing activity beats expectations
* Gold, up 18% for year, posts best year since 2010
By Herbert Lash
NEW YORK, Dec 31 (Reuters) - The dollar slid to a six-month low on Tuesday as progress on U.S.-China trade tensions led investors to higher-risk assets, while a year-end rally that lifted global equity markets to record highs stayed alive on the last trading day of 2019.
A gauge of world stock markets and stocks on Wall Street rebounded late in the session after trading lower most of the day, marking an end to a remarkable year for investors. Many equity indices, long-term bonds, oil and gold posted double-digit gains in 2019.
U.S. President Donald Trump said the Phase 1 trade pact with China would be signed on Jan. 15 at the White House, though confusion remains about details of the agreement.
Hope of an imminent deal has been a key driver for lifting global equities to their best year since 2009, up 24% for the year and 88% for the decade.
MSCI's all-country world index of stock performance in 49 nations rose 0.86 point or 0.15 percent, to 565.24. The index is less than 3 points shy of an all-time high set on Friday, when the three major U.S. indices also posted record peaks.
The breakthrough in U.S.-China trade talks and a British election earlier in December pointing to a smoother exit from the European Union have boosted investor sentiment, but the outlook for equities next year is not as buoyant, said David Kelly, chief global strategist at JPMorgan Asset Management.
"This is a year in which everybody will celebrate," he said.
Going forward, however, Kelly said it will be hard to achieve similar gains, with U.S. equities likely to advance by mid-single digits annually for several years. International markets, especially emerging markets, are poised to do better, he said.
"The U.S. stock market rally could continue but at some stage there's going to be a significant correction, and the more it goes up, the more it's going to correct," he said.
In shortened trading sessions ahead of New Year's Eve celebrations, the pan-European STOXX 600 index closed down 0.08%.
French, British and Spanish listed stocks lost between 0.1% and 0.7%, while Frankfurt and Milan bourses were shut for the year-end holidays.
On Wall Street, the Dow Jones Industrial Average rose 76.3 points, or 0.27 percent, to 28,538.44 and the S&P 500 gained 9.49 points, or 0.29 percent, to 3,230.78 The Nasdaq Composite added 26.61 points, or 0.3 percent, to 8,972.60.
Emerging market stocks lost 0.34%.
Bourses in Asia diverged. China mainland stocks gained 0.4% after data showed manufacturing activity in the world's second-largest economy expanded for a second straight month in December.
China's Purchasing Managers' Index showing economic trends in the manufacturing and service sectors was unchanged at 50.2 in December from November, but still remained above the 50-point mark that separates growth from contraction.
In Hong Kong, stocks fell 0.5% as protesters geared up for pro-democracy rallies on New Year's Eve.
Markets in Japan and South Korea were closed for a holiday.
The dollar's slide came close to wiping out the year's gains, as the pound and trade-sensitive currencies rallied on improving U.S.-China trade relations and the outlook for global growth.
The decline of the dollar is one of the biggest bets in the FX market for 2020.
"We could be right at a turning point where global growth re-accelerates relative to U.S. growth, and that could mean a weaker dollar over time," Kelly said.
The dollar was strong for much of 2019 thanks to the relative outperformance of the U.S. economy and investors' preference for a safe-haven currency amid the trade dispute. But the dollar's gains for the year shriveled in December.
Investors bought up currencies linked to global trade, sending the Australian dollar, Chinese yuan and Scandinavian crowns to multi-month or multi-week highs against the greenback.
The dollar index, which tracks the greenback against a basket of six currencies, fell 0.237 point or 0.24 percent, to 96.503 and the euro was last up 0.14 percent, at $1.1213.
The Japanese yen strengthened 0.22% versus the greenback at 108.65 per dollar, while Sterling was last trading at $1.3245, up 1.01% on the day.
The weak dollar helped lift spot gold to its highest since Sept. 25 at $1,525.20 an ounce. The metal was set to post its biggest yearly gain since 2010, rising more than 18%.
U.S. gold futures settled up 0.3% at $1,523.10.
The benchmark U.S. Treasury 10-year note fell 7/32 in price to yield 1.9192%.
Longer-dated Treasuries were on track to post their best return since 2014, after concerns about the slowing U.S. economy prompted the Federal Reserve to cut interest rates three times this year. The move was a major reason for Wall Street's gains.
Thirty-year bonds returned 17.15% this year through Monday , according to Bank of America Merrill Lynch, while 10-year notes have returned 9.03%.
Final data will not be updated until late on Tuesday.
Oil fell but was still on track for monthly and annual gains, supported by a thaw in the prolonged U.S.-China trade row and Middle East unrest.
Brent crude settled down 67 cents at $66.00 a barrel, while U.S. West Texas Intermediate (WTI) crude slid 62 cents to settle at $61.06 a barrel.
Brent has gained about 23% in 2019 and WTI has risen 34%, their best yearly gains in three years.
Reporting by Herbert Lash and Karin Strohecker; additional reporting by Andrew Galbraith in Shanghai; Editing by Nick Zieminski and Dan Grebler