SHANGHAI, Dec 31 (Reuters) - China's yuan extended gains to a near three-week high on Tuesday on the final trading day of 2019, but was on track for a second year of losses as the Sino-U.S. trade dispute and domestic economic weakness took a toll on the currency. The yuan was supported by a firmer-than-expected midpoint fixing and continued optimism over a preliminary agreement to end the 17-month-long trade dispute between Beijing and Washington. Prior to the market open, the People's Bank of China (PBOC) set the midpoint rate at 6.9762 per dollar, 43 pips or 0.06% firmer than the previous fix of 6.9805 and the strongest since Aug. 6. The official guidance rate was much stronger than the market had expected and 45 pips firmer than Reuters' estimate of 6.9807. The market read the strength as an official signal that authorities were unwilling to see much weakness in the yuan towards the year-end, said traders and analysts. In the spot market, onshore yuan opened at 6.9830 per dollar and rose to a high of 6.9751 at one point, the strongest level since Dec.13. At midday, it was changing hands at 6.9771, 94 pips firmer than the previous late session close. At current levels, the yuan is down 1.5% against the dollar for the year, after losing 5.3% in 2018. It will have lost for five out of the past six years. The year has been marked by high volatility, with the yuan weakening in early August past the closely watched and long supported seven-per-dollar level as Sino-U.S. trade tension intensified. Days later, Washington labeled China a currency manipulator. "Yuan trade this year has been heavily driven by information and headline risks from the trade war," said a trader at a Chinese bank. Traders said they would pay close attention to the currency agreement in the Phase 1 trade deal, which White House trade adviser Peter Navarro said on Monday would likely be signed in the next week. A senior Trump administration official said earlier that the currency agreement is based on provisions in the U.S.-Mexico-Canada Agreement trade deal. "The RMB is the purest barometer to understand the broader USD dollar movement amid U.S.-China friction," Stephen Innes, chief Asia market strategist at AxiTrader, said in a note using the other name for the local unit. Separately, economists said China may need more stimulus to support its economic growth despite manufacturing activity expanding for a second straight month in December. "We expect Beijing to roll out more easing measures despite limited policy room in coming quarters," said Lu Ting, chief China economist at Nomura. The global dollar index fell to 96.692 at midday from the previous close of 96.74. The offshore yuan was trading at 6.9747 per dollar as of midday.
The yuan market at 0404 GMT:
Reuters/HKEX CNH index
Divergence of the dollar/yuan exchange rate. Negative number indicates that spot yuan is trading stronger than the midpoint. The People's Bank of China (PBOC) allows the exchange rate to rise or fall 2 percent from official midpoint rate it sets each morning.
OFFSHORE CNH MARKET
*Premium for offshore spot over onshore
**Figure reflects difference from PBOC's official midpoint, since non-deliverable forwards are settled against the midpoint. .
(Reporting by Winni Zhou and Brenda Goh; editing by Richard Pullin)