(Bloomberg) -- Foreign investors have piled into Taiwan’s markets this month, leaving its stocks tantalizingly close to a record.

The Taiex is unlikely to reach it, however -- because of the trade war and how many companies’ fortunes are linked to Apple Inc.’s latest iPhone, say Diana Wu, a senior manager at Capital Securities Corp. and David Chu, chairman of Hua Nan Securities Investment Management Co. Both predict the benchmark gauge will end the year just 2.5% higher at 11,200 -- a whisker shy of the record reached last year.

Global investors have flocked to Taiwan equities so far in September, with $2.3 billion of inflows the most among 10 Asian markets tracked by Bloomberg. Optimism over the economy’s dominant semiconductor industry helped the Taiex rise 5.8% from its August low, while the local dollar saw its longest rally in three years.

“The Taiex has very limited upside as the global economy is slowing due to trade war concerns, and the iPhone could be in demand only in the short term as consumers may prefer waiting for 5G phones in 2020,” Wu said.

Taiex companies’ earnings growth is expected to drop 6.7% this year, the most since 2015, according to Bloomberg-compiled data.

Rosenblatt Securities Inc. said last week that Apple is seeing “weak” pre-orders for the new iPhone, citing conversations it had with retailers. Demand could also be low in China, where 5G phones are in focus, the brokerage added. Greater China, including the mainland, accounted for almost 20% of Apple’s revenue last year, Bloomberg-compiled data show.

Any disappointing iPhone sales would be a big headwind for the Taiex. That’s because Apple suppliers Taiwan Semiconductor Manufacturing Co., Largan Precision Co. and Nanya Technology Corp. accounted for 35% of the benchmark’s recent rally.

Meantime, investors got a reminder of the impact that the China-U.S. dispute and other issues are having on the global economy on Tuesday, when World Bank President David Malpass called the slowdown “broad based.” Chinese trade negotiators are set to travel to Washington for the latest round of talks in October.

“There will be many uncertainties in the following months, such as U.S.-China trade war,” Chu said. Taiwan stocks have been boosted by fund inflows, “but that may change at any time so investors should be cautious,” he said.

--With assistance from Chinmei Sung.

To contact the reporter on this story: Cindy Wang in Taipei at hwang61@bloomberg.net

To contact the editors responsible for this story: Sofia Horta e Costa at shortaecosta@bloomberg.net, Philip Glamann, David Watkins

©2019 Bloomberg L.P.