Investing in emerging-market stocks is tricky. Many are involved in commodity industries like energy, where the local economy plays a relatively trivial role in a company's profit or loss. Oil stocks based in Brazil, for instance, aren't necessarily all that different from oil companies that operate in the United States -- global prices for oil, not the local economy, will drive results.

For this reason, it's important to look for businesses whose earnings power is driven by their relationships to the consumer class, not worldwide commodity prices, located in fast-growing, but relatively stable corners of the world. Latin America is one place that has my attention as an attractive place to deploy capital -- particularly in the retail sector, where companies benefit directly from rising wages and wealth.

MercadoLibre (NASDAQ:MELI), a Latin American online retailer, and Walmart de Mexico (NASDAQOTH:WMMVY), which is, you guessed it, Walmart Inc.'s (NYSE:WMT) Mexican operating unit, are two top choices in emerging-market stocks. Here's why I think these are great picks for 2018 and beyond.

World map

No portfolio is complete without some emerging-markets stock exposure. Image source: Getty Images.

Betting on e-commerce

Think of MercadoLibre as the eBay, or Amazon.com, of Latin America, an emerging market where e-commerce is only beginning to take hold. With more than 201 million registered users across its platform of services, MercadoLibre properties are a go-to destination for Latin Americans to transact online.

MercadoLibre is entrenched in virtually every facet of e-commerce, taking a slice of the pie on every product sold on its marketplace, a cut of every payment sent through MercadoPago, in addition to a piece of the shipping business through MercadoEnvios. It also earns revenue from MercadoShops, a Shopify-like solution that enables retailers to market and sell their products online. If a Latin American business wants to sell something online, MercadoLibre offers a one-stop solution.

It's notable to me that MercadoLibre has proven its mettle as a competitor. It shrugged off an early threat by eBay, which eventually sold its Latin American business to MercadoLibre, deciding that it was smarter to take a stake in MercadoLibre than compete against it. (eBay largely cashed in its chips in 2016.)

I think of MercadoLibre as a royalty on online commerce in Latin America. In addition to the backdrop of rapid organic growth in e-commerce, MercadoLibre has grown revenue by becoming more involved in each transaction, thus taking a greater share of each transaction in fees. Its take rate -- net revenue as a percentage of gross merchandise volume -- has recently expanded to roughly 12.1% in the most recent quarter, up from about 10.5% in 2016 and 9.1% in 2015, which acts as a multiplier on top of rising gross merchandise volume (GMV).

Bar chart of MercadoLibre's take rate, or net revenue divided by gross merchandise volume (GMV)

Image source: Author. Data from SEC filings.

In the third quarter, the company reported a 56% year-over-year increase in the number of items sold and a 51% increase in live listings, helping drive GMV up 51%, to nearly $3.1 billion. I suspect that MercadoLibre has a very long runway, perhaps decades, of double-digit annual increases in gross merchandise volume, revenue, and profit, as more business move online.

MercadoLibre is far from optically cheap, trading at a triple-digit multiple of trailing-12-month earnings. That said, its earnings power today is obscured by investments in free shipping and other perks designed to augment user growth, and sink its teeth deeper into the e-commerce industry. Since these "investments" are expenses for accounting purposes, they have the effect of muting its profitability in the present day. But it's my view that MercadoLibre's moat grows wider with every new and repeat user, so investing to add new buyers and sellers to its platform is a very smart move, even if it dings the income statement in the here and now.

Walmart de Mexico

Whereas MercadoLibre is a play on e-commerce across Latin America, Walmart de Mexico is an attractive stock for investors who want exposure to emerging-market consumers without the high multiple associated with faster-growing online businesses.

Walmart de Mexico is roughly 70% owned by its U.S. parent, Walmart Inc., with the remainder available for the public to trade on the Mexican Stock Exchange and over the counter in the United States. It operates approximately 3,100 stores, and roughly 81% of its sales are derived from stores located in Mexico, with the remainder split across stores in Central American countries -- Costa Rica, Guatemala, Honduras, El Salvador, and Nicaragua. 

What I like most about Walmart de Mexico is that it's a near pure play on the growing consumer class in Mexico, offering additional upside in e-commerce, where it competes directly with market leaders MercadoLibre (surprise, surprise) and Amazon. The online retail business in Mexico lags behind the United States, as only about 3.5% of retail spend has moved online south of the border, while the U.S. leads with 9% online share of retail spending.

Map of Walmart de Mexico's stores.

Image source: Walmart de Mexico.

Walmart de Mexico is investing heavily in building out its e-commerce platform, but I view it as attractively priced, even if the internet never becomes an important driver of sales. Note that Walmart de Mexico generates nearly half its sales from Bodegas and Superama branded stores, which have more in common with traditional grocery stores than the Walmart Supercenters you see in the United States. These stores sell foods and household items that are consumed quickly, and thus have little e-commerce risk.

Walmart and Sam's Club-branded stores, from which Walmart de Mexico generates roughly half of its revenue combined, are at a greater risk of disruption from the internet, in my view. That said, a wide selection (more than 90,000 products in its Walmart stores), and ultra-low bulk prices (in Sam's Club formats) offer some insulation against online competition. Furthermore, all of its stores offer a local access point for customers to pick up online orders, an important point of differentiation in an e-commerce market where roughly half of transactions are still settled in cash

Walmart de Mexico's ruthless efficiency and buying power shows in its financials, as the company has a negative cash conversion cycle -- that is, it receives cash from its customers before it has to pay its suppliers. In effect, everything on its shelves, and more, is financed by someone else's balance sheet, allowing the company to finance its expansion without tying up its own capital.

Shares trade at about 20 times trailing-12-month earnings, which is no small multiple, but I believe shareholders can earn a market-beating return driven by organic sales growth and increasing consumer spending in Mexico. Additional upside in the form of e-commerce wins isn't priced in and the peso could reverse its recent declines against the dollar, adding yet another avenue for shareholders to earn a very attractive return over the long haul.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Jordan Wathen has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Amazon, eBay, MercadoLibre, and Shopify. The Motley Fool has a disclosure policy.