Emerging markets are suddenly hot.
A "stampede" of cash recently rushed into emerging markets -- to buy both stocks and bonds -- according to Bank of America and research firm EPFR.
A record $4.9 billion flowed into emerging market bond funds between July 14 and July 20 and another $4.7 billion into stocks of developing countries like Brazil, South Africa and India. That's the largest one-week inflow in a year.
The inflows come after years of heavy outflows from emerging markets, which have been battered by a slowdown in prices for commodities like oil, iron and copper. Now some investors are betting that emerging markets are turning the corner.
Related: Venezuelans cry at sight of food as crisis deepens
"They absolutely are on better footing now than they were a year ago," says Jamie Anderson, managing principle at Tierra Funds, which creates ETFs for emerging markets. "There's real data that suggests we're in a bottoming process."
The latest inflow isn't enough to overtake what investors pulled out earlier in the year. So far this year, investors have still pulled out more cash from emerging markets than they've put in -- but that's true for stocks and bonds across the world.
Most of the outflows happened in January and February when oil prices were crashing. Since then, oil and other commodities have bounced back.
Investors have grown much more bearish on U.S. and European stocks, both of which have seen investment outflows of about $67 billion so far this year.
A few key factors that's causing investors to perk up about emerging markets after years of giving them the cold shoulder:
Low interest rates: The U.S. Federal Reserve indicated this spring that it will keep interest rates low for longer than originally expected. That's good news for governments and companies that owe debt that must be paid back in U.S. dollars. When the Fed raises rates, the dollar rallies, making that debt more expensive.
Related: Halliburton signals U.S. oil drilling revival
Commodities rally: The comeback in commodities has supported a big rally in stocks. The MSCI Emerging Market Index is up 9.4% this year. That's far better than U.S. stocks and far better than markets in Germany, France and elsewhere in Europe.
Affordability: Emerging markets are cheap. Right now, these stocks trade about 12 times their future earnings. American stocks trade about 17 times future earnings and European stocks, battered by Brexit, still trade 15 times future earnings, according to BofA.
In short, investors can get more bang for their buck in emerging markets right now.