Since the beginning of August, stock markets around the world have had a tough time, posting some big losses in the face of difficult economic conditions across the globe. But while U.S. stocks have shown some resilience in rebounding off their lows several times, once-favored emerging markets are stuck in the doldrums. Could this mean the end of years of outperformance for stocks in fast-growing markets like China and Brazil?

Looking at the numbers
The raw performance numbers tell part of the story. Since the end of July, the Dow Jones Industrial Average (INDEX: ^DJI) has lost about 7% of its value. But it's been down as much as 12% before bouncing back on several occasions.

Unfortunately, emerging-market stocks don't seem to be behaving as well. The iShares MSCI Brazil ETF (NYSE: EWZ) is down more than 14% since the end of July, while the iShares FTSE China 25 ETF (NYSE: FXI) has fallen 15%. Certain individual emerging-market stocks, including Petroleo Brasileiro (NYSE: PBR) and Aluminum Corporation of China (NYSE: ACH), have suffered even greater losses. It's therefore understandable why emerging-market investors are spooked about what could come next.

Understanding the macro picture
The key to understanding the disparity between the U.S. and emerging markets right now is that despite the increasingly interconnected nature of the global economy, emerging markets face completely different macroeconomic conditions from the U.S. and other developed markets around the world. The U.S., Europe, and Japan are all dealing with the challenges of skyrocketing government debt that is starting to threaten their ability to maintain current spending levels. Although Japan has had no trouble at all obtaining financing for its bonds for decades and the U.S. has thus far survived its credit downgrade unscathed, smaller eurozone countries are at a crisis point that could spill over to the rest of the developed world.

None of that is the case for creditor nations like China and Brazil. The big threat to emerging economies is a combination of rapidly rising prices and wage pressures, along with strong currencies and inflows of foreign capital that some believe have created unsustainable asset bubbles. Already, emerging market nations have had to raise interest rates and even implement barriers to capital inflows in order to protect their economies from overheating.

Turning inward
Emerging market success has largely stemmed from a strong world economy. That's why it's not surprising to see names like Petrobras and Chinalco, whose performance is largely tied to global economic conditions, suffer. But as developed nations continue their economic slowdowns, emerging countries will rely more on their home markets for their success.

When you look instead at companies with a stronger focus on their domestic markets, you see much less damage in the recent pullback. For instance, Internet search giant Baidu (Nasdaq: BIDU) is down just 6% in the past month and a half, while telecom China Mobile (NYSE: CHL) is actually up. Similarly, Brazil's AMBEV (NYSE: ABV), whose beverage business has most of its sales within Latin America, is up significantly since the end of July.

Once these countries get through their temporary tough times, though, exports will remain a vital component of emerging-market growth over the long run. So even if shares of globally oriented companies lose value in the short run, they should give long-term investors great entry points to capitalize on the almost inevitable recovery when it comes.

Don't count emerging markets out
After a long run of outperformance, emerging markets may finally be taking a break and letting the U.S. stock market take the lead for a short while. But don't make the mistake of thinking that you should give up on emerging markets forever. Sooner or later, they'll rocket back to the forefront -- and those who got in while the getting was good will earn some impressive rewards for their efforts.

The hottest IPO of 2011 came from an emerging-market economy. Find out what it is and whether you should buy it in this free special report from The Motley Fool.