By Georgina Lee and Faith Hung
HONG KONG/TAIPEI, July 21 (Reuters) - Investors are putting aside geopolitical tensions to pile in to Taiwan stocks, with foreign inflows the biggest in years, thanks to soaring artificial intelligence and chipmaking stocks.
The wave of enthusiasm, which has also helped the tech-heavy Nasdaq to its best first half in 40 years, is running hard as the market is dominated like no other by top firms all along the computer hardware and software supply chains.
Net foreign buying of $12 billion over the six months to June is the biggest since the first half of 2008, and Taiwan's benchmark index performance - it is up 20% in U.S. dollar terms this year - is the best in Asia.
The sparkling rally has scarcely been dented by Taiwan's slowing economy, repeated shows of force by the Chinese military, or while war in Ukraine highlights what is at stake over the Taiwan Strait.
Rather, investors say it's all the more sturdy as the bogged-down conflict deters Chinese action and risks can be managed by keeping positions liquid with one eye on a possibly quick exit.
And, market watchers, say the AI rally has further to go.
"What we are seeing now is a tactical trade, which tends to be based on a shorter-term investment horizon before the tech sector's valuation peak," said Carlos Casanova, Asia senior economist at Union Bancaire Privee.
"A potential escalation of events in the Taiwan Strait down the line is less relevant for these investors," he said.
China claims democratically governed Taiwan as its own territory, a view strongly contested by the government in Taipei.
China staged war games around Taiwan last August and again in April, and it has regularly flown military aircraft across the median line of the Taiwan Strait, which had previously served as an unofficial barrier between the two.
Famous investor Warren Buffett called geopolitical tensions "a consideration" in his decision to last year sell most of a stake in the giant Taiwan Semiconductor Manufacturing Co just a few months after buying it.
"Nobody can say they are unconcerned about the military threat from China," said one funds management veteran in Taiwan, who spoke on condition of anonymity in order to talk freely.
"However, we've been living with these cross-strait tensions for a long time," he said. "The entire AI supply chain is in Taiwan, and the entry barriers for any potential competitors are quite high.
"So that makes Taiwan’s AI supply chain very attractive for foreign investors, and we believe their fund inflows will continue to be strong throughout the year."