TAIPEI/SINGAPORE, Dec 6 (Reuters) - Taiwan's stock market is soaring ahead of elections next month that will shape relations with China, which claims the island as its own, as investors look past political risk and potential for conflict and bet on success for chipmakers and other exporters.

Foreign investors poured a net $7.6 billion into Taiwan equities in November, a record sum according to LSEG data stretching back to the beginning of 2008. Domestic investors were also net buyers to the tune of $300 million.

The island's benchmark stock index hit a 20-month high on Monday.

Presidential and parliamentary elections on Jan. 13 are happening as China has stepped up its military pressure and denounced leadership frontrunner Lai Ching-te from the ruling Democratic Progressive Party as a dangerous separatist. He says only Taiwan's people can decide their future.

The main opposition party, the Kuomintang (KMT) which traditionally favours close ties with China but denies being pro-Beijing, has pledged to re-start engagement should it win.

Money managers who have long borne the political risk to own Taiwan's technology-heavy equity market say a surprise KMT victory could make for short-term gains by easing relations with China.

They are betting, though, on rebounding profits from chipmaking to power a new leg for a rally that has lifted Taiwan Stock Exchange Weighted Index by 23% this year.

"Lai would not be so stupid as to declare independence after Taiwan's protective big brother, the United States, has expressed clear opposition to the idea," said Allen Huang, a senior analyst at Mega International Securities in Taipei.

Markets likewise see a conflict as unlikely, even though China has cast the election as a choice between war and peace. The Taiwan dollar, along with China's yuan, has rebounded strongly in recent weeks.

Taiwan has lived with the threat of Chinese invasion since the defeated Republic of China government fled to the island after losing a civil war to Mao Zedong's communists in 1949.

"We do not think the current Taiwan elections will result in a meaningful escalation in cross-straits tensions," said Gary Tan, a portfolio manager at Allspring Global Investments in Singapore.

"We continue to focus on secular growth drivers impacting Taiwan companies such as artificial intelligence," he said, as well as outsourcing of electric vehicle production, manufacturing offshoring and industrial equipment demand.

'OPPORTUNITY TO BUY'

Taiwan is a major manufacturer of chips used in everything from smartphones to cars and fighter jets, led by Taiwan Semiconductor Manufacturing Co Ltd whose Taipei-listed shares dominate the index and have surged 27% this year.

The benchmark index is the best performing major market in Asia in U.S. dollar terms and the success has become an election talking point, with President Tsai Ing-wen on Sunday telling a campaign rally this showed "the world's confidence in Taiwan".

"The major stocks in Taiwan are not extreme on valuations, they are not as expensive as some of pure AI companies," said Caroline Yu Maurer, head of China and specialised Asia strategies at HSBC Asset Management in Hong Kong.

"They are quite well supported by the earnings growth ... a lot of stocks have quite reasonable P/E, if it does correct, it's an opportunity to buy instead of selling everything," she said.

Taiwan's stock market trades on a price-to-earnings or PE ratio - one measure of relative value - of 17 compared with 23 for the S&P 500.

To be sure, the KMT has retorted that rather than stocks, the number to look at is this year's projected economic growth rate of 1.42%, a 14-year low.

Foreign outflows over the four months preceding November suggest some investors were stepping back and others actively negative.

In a note last month, research firm Alpine Macro recommended below-benchmark allocation to Taiwan stocks and shorting the currency against higher-yielding South American currencies due to the risk the election could "generate negative surprises".

SEMI-REBOUND

Fund managers see tourism, biotech and renewables as particularly sensitive to the unexpected outcome of a KMT victory. Wind power and biotechnology enjoy support from the DPP and could be expected to prosper under its leadership.

Hotels and travel shares have underperformed the market with a 9% gain this year, and are likely to stay subdued as long as Chinese visitors stay away - something which a KMT victory could change.

The KMT, which had signed landmark trade and tourism deals with China when it was in power, wants to revive plans for a controversial service trade agreement that it had abandoned in the face of mass protests almost a decade ago.

Ker Chien-ming, the DPP's parliament whip, described that idea earlier this year as like "opening the gates to the enemy".

Still, with TSMC beating forecasts last quarter and foreshadowing health growth ahead, longer-term investors say that even politics can't spoil a party built on rebounding demand for its products.

"We own predominantly technology names in Taiwan and expect limited impact from the elections," said Sat Duhra, a portfolio manager at Janus Henderson in Singapore.

"Drivers for these names are largely outside Taiwan – for example PC and smartphone recovery globally and growth of AI."

(Reporting by Faith Hung in Taipei and Rae Wee in Singapore. Additional reporting by Reuters Hong Kong newsroom; Writing by Ben Blanchard; Editing by Kim Coghill)