Think of the opportunities to make money investing in an enormous, rapidly developing country that spans a continent. It's a place that welcomes foreign investors, and has a capitalistic culture and an eager, hardworking population. It sure sounds like China in the 21st century, doesn't it? But I'm talking about the United States of America in the 19th century. And thereby hangs our tale. And it's a cautionary one.

While almost everyone thinks that the Chinese economy is a can't-miss bet, that doesn't make Chinese stocks a can't-miss investment. These stocks are exceptionally tricky for amateur U.S. investors who don't know the country, don't speak the language and don't know how business is done in a former communist country whose financial markets are an Asian version of the old American Wild West.

That's why history matters. Before you rush to buy any Chinese stocks--including the five dozen or so listed on the New York Stock Exchange or the NASDAQ market--remember what happened to European investors who thought the United States of 150 years ago was a can't-miss market. They put a ton of money into American investments--and got trashed. Sometimes that happened because they didn't know the rules here. And sometimes it happened because the rules changed, or because someone just flat-out cheated them.

Frances Dydasco, the Singapore-based manager of T. Rowe Price's New Asia Fund, says there's a lesson to be learned from the way that Barings, then a pre-eminent British banking house, lost its shirt financing U.S. railroads in the 19th century. "The country was growing and made good use of the railroads," Dydasco says. "But Barings lost so much money that it had to be rescued by the British government."

Similarly, foreigners investing in China today had better be ready for anything, she says: rules there have a tendency to change, and once investors have plunked down their money to finance a railroad or a power plant or a mine, they can't leave the country and take the asset with them if they don't like what happens.

If this sounds like I'm just being a fuddy-duddy, consider this. The Chinese gross domestic product has grown by more than 100 percent in the past 10 years--but the Morgan Stanley index of China stocks has lost more than two thirds of its value over that period. For the 12 months that ended May 31, Chinese stocks were up more than 50 percent. But they had fallen for the four previous years. "You have to be prepared for a lot of volatility," Dydasco says, "and a buy-and-hold strategy won't necessarily work." Says another China maven, Guang Yang of the Templeton Global Opportunities Trust: "A basket approach works best" because individual Chinese stocks are so unpredictable.

So what's an investor to do? If you really want a direct stake in China, the logical way to buy one is to invest in a mutual fund that's widely diversified and whose manager has specialized, local knowledge. Unless your stomach is a lot stronger than mine, you also want your fund to be diversified among countries, not confined to China alone. That's because you're subject to the whims of an authoritarian government and because the country's banking and financial systems are what economists call "opaque." That's econ-speak for "we can't see what's going on."

Wall Street, of course, has been offering up individual Chinese stocks in the initial-public-offering market. These securities trade on U.S. exchanges and look like regular stocks. But remember what Wall Street's about: most of these Chinese companies (like all companies doing initial offerings) pay fat advisory fees to the Street, which also makes a ton of money underwriting these securities and trading them. I'd be extremely wary of these individual stocks--just as I'm wary of Russian stocks, or stocks of companies based in any other country whose culture and rules and financial standards I don't begin to understand.

I think that the safest way to bet on China is through a mutual fund with a soupcon of Chinese holdings or by investing in American companies that are big players in the China game. China has become the United States' second largest trading partner, which means that many U.S. companies now do business in China or import goods from China or sell things to China. Buying these stocks isn't as glitzy as becoming a China investor--but it's likely to work out a lot better for you.