TOKYO, Nov 22 (Reuters) - Japanese shares gained on Friday as cautious optimism about the prospect of the United States and China reaching a trade agreement lifted investors' risk appetite.
The Nikkei index ended up 0.32% at 23,112.88 points as exporters in the IT sector and the industrial equipment sector paced gains.
China wants to work out an initial trade agreement with the United States and has been trying to avoid a trade war, but it is not afraid to retaliate when necessary, President Xi Jinping said on Friday.
Xi made the comments at a New Economy Forum organised by Bloomberg LP in Beijing, according to a pool report.
China has invited top U.S. trade negotiators for a new round of face-to-face talks in Beijing, the Wall Street Journal reported on Thursday, on hopes the talks can take place before next Thursday's Thanksgiving holiday in the United States.
Completion of a phase one deal could slide into next year, trade experts and people close to the White House told Reuters previously, as Beijing presses for more extensive rollback of U.S. tariffs that have weakened its exports and slowed its economy.
"A retreat from some of the excessive pessimism surrounding the trade war is supporting Japanese stocks," said Hideyuki Ishiguro, senior strategist at Daiwa Securities in Tokyo.
"Both countries stand to benefit from a trade deal, so in practical terms I think that is where we are heading. There is still room for Japanese stocks to rise further as foreign investors buy back shares they sold last year."
For the week, the Nikkei fell 0.82%, its biggest since Oct. 4, highlighting concern about U.S.-China relations in the long term.
There were 143 advancers on the Nikkei index against 76 decliners on Friday.
The largest percentage gainers in the index were Internet services company Z Holdings Corp up 3.95%, followed by Taiheiyo Cement Corp gaining 2.89% and industrial equipment maker Yokogawa Electric Corp up by 2.17%.
Formerly known as Yahoo Japan, Z Holdings got a boost because it will merge with messaging app operator Line Corp . Shares in Line rose 0.19% on Friday.
The largest percentage losses in the index were online commerce company Rakuten Inc down 2.38%, followed by property developer Tokyu Fudosan Holdings Corp losing 2.37% and Nippon Light Metal Holdings Co Ltd down by 2.20%.
The Topix index ended Friday up 0.12% at 1,691.34, but fell 0.31% this week.
The volume of shares traded on the Tokyo Stock Exchange's main board was 0.94 billion, compared to the average of 1.27 billion in the past 30 days. (Editing by Sam Holmes & Kim Coghill)