Even the suddenly shaky stock market hasn't scared people away from investments that are supposed to be some of the world's riskiest.

In a surprising twist, investors have continued to pump money into funds that own Chinese technology giants, Thai energy companies and other stocks from developing countries. At the same time, investors have become more hesitant about U.S. stock funds.

The split is notable because emerging-market stock funds have historically had higher highs — and more painful lows — during troubled times. But the preference shows how much growth investors see for companies from the world's fastest-growing economies, where middle classes are expanding.

More importantly, a long list of big-name investors see emerging markets as offering something rare in the world: prices that aren't too high.

U.S. stocks in the S&P 500 are close to their highest level since the dot-com. It's a result of how much better U.S. stocks have performed than the rest of the world since the bull market started in early 2009.

At GMO, the firm led by famed investor Jeremey Grantham, who earlier in his career warned about inflating bubbles for dot-com stocks and U.S. real estate, the expectation is that high prices will prevent nearly all types of stocks from keeping up with inflation over the next seven years.

The exception is emerging-market stocks, where GMO is forecasting annual returns of 1.9 percent after inflation.

One wild card for investors is the threat of a global trade war, as the United States and China threaten to raise barriers to commerce. Investors see emerging-market companies as being more vulnerable to the damage of a trade war.

And even if a trade war never happens, emerging-market stock funds have a long history of much sharper swings in price than U.S. stocks, developed-market stocks abroad or bonds. Accepting volatility is a prerequisite for investing in an emerging-market fund.

That hasn't been enough to dissuade investors, at least not yet. They put more money into emerging-market stock funds than they took out for seven straight weeks, as of April 11, according to EPFR Global. For U.S. stock funds, meanwhile, investors made net withdrawals in three of four weeks.

"If we do assume that the trade issues get resolved, emerging markets still have a really good story," said Evan Brown, director of asset allocation at UBS Asset Management. "We think we're in the beginning or a couple years into a multiyear bull market."

Stan Choe writes for the Associated Press.