* Weak China factory activity cuts Nikkei gains * Bernanke remarks sees yen at 103 to dollar, aids exporters * Fast Retailing jumps as retail investors in hot pursuit By Dominic Lau TOKYO, May 23 (Reuters) - The Nikkei average trimmed gains after hitting a 5-1/2-year high on Thursday after factory activity in China, one of Japan's major export markets, shrank for the first time in seven months in May. By the midday break, the Nikkei added 0.2 percent to 15,662.95 after falling as much as 0.6 percent at one point on the back of the China HSBC flash PMI data. "People are taking profit after the China PMI," said Kyoya Okazawa, head of global equities and commodity derivatives at BNP Paribas in Tokyo. "China has a huge link with Europe in terms of exports. Looking at the OECD leading indicator for Europe ... the European economy is gradually coming back," he said. "China's economy can't get worse." The index earlier climbed to a peak of 15,942.60, its highest since December 2007, aided by some exporters as the yen weakened against the dollar after the U.S. Federal Reserve chief suggested the central bank could scale back stimulus in coming months. Ben Bernanke's comments lifted the dollar to a fresh 4-1/2-year high of 103.74 yen on Wednesday. The Japanese currency was last traded at 103.15 on Thursday. Stefan Worrall, director of equity cash sales at Credit Suisse in Tokyo, said the soft yen would help support the Tokyo market. "It's going to be a huge fillip for the market. Any weakening of the yen would be. Also, it's evident of the strength of retail investors and their optimism," he said. Exporters on the rise included Honda Motor Co, Canon Inc, TDK Corp and Ricoh Ltd, up between 1 and 2.8 percent. But Mitsubishi Motors Corp slumped 11.5 percent and was the second most traded stock on the main board by turnover after sources said the automaker is considering wiping out about 920 billion yen in accumulated loses by reducing capital stock by an equivalent amount. Such a move is a common step for Japanese firms with a history of deep losses that have returned to profitability and want to begin paying dividends. The broader Topix reversed early gains to trade down 1.1 percent at 1,262.22, with volume at 96 percent of its full daily average for the past 90 days. FAST RETAILING RIDING HIGH Fast Retailing Co Ltd, which has the biggest weighting in the Nikkei, climbed 3.9 percent, extending a 7.4 percent surge in the previous session as retail investors were in hot pursuit of the operator of casual fashion chain Uniqlo. It was the top-weighted gainer, contributing 64 positive points to the benchmark. "Retail investors are very active in this market. They are using Fast Retailing as a home camp," a Tokyo-based trader said. "It's an indicator of the extent of the retail investors' involvement in this market." Interest from foreign investors was also high, with government data showing they bought 716 billion yen ($6.9 billion) worth of Japanese equities last week. They have ploughed a total of 8.28 trillion yen into Japanese stocks since the end of 2012. The benchmark Nikkei is up 13 percent so far this month, on track for a 10th straight monthly gain - its longest such winning streak since 1972. The index has rallied more than 50 percent this year, supported by aggressive government and central bank policies to revive growth, and it has risen 10.4 percent since May 9, when the dollar broke above the 100-yen mark.