The stock market has been on a tear for most of the past two years, rising over 40%. Latin American e-commerce company MercadoLibre (MELI 4.24%) has done even better. The stock has soared over 140%. This isn't anything new; MercadoLibre has run circles around the market for years and has returned over 5,600% since its IPO in 2007.

Buying such a hot stock can feel wrong, like chasing after a boat that has already set sail. But taking a peek at MercadoLibre's short- and long-term opportunities should calm those fears. Here's why MercadoLibre still has room to run and can continue beating the market for years.

MercadoLibre: Just getting started

Recognizing MercadoLibre's investment potential requires understanding the primary industries in which it competes. MercadoLibre offers e-commerce and financial services in Latin America. The combined population where the company operates is over 500 million, though the broader region's population exceeds 650 million.

Latin America is very different from the United States. Many consumers there lack access to e-commerce, the Internet, and even basic banking services, which many Americans take for granted.

MercadoLibre is the leading e-commerce retailer in Latin America, where e-commerce penetration is still just over 10%. The company's 85 million customers average just seven transactions each quarter. There is lots of room to grow the customer base and for them to purchase more frequently. MercadoLibre also has a fintech business, which offers banking, payments, and lending to 45 million monthly active users.

These two core businesses could fuel MercadoLibre's growth for years and don't account for new revenue streams. For example, MercadoLibre is leveraging its user data to build a digital advertising business that has grown its revenue tenfold over the past five years to over $700 million. Yet according to management, it still has just 5% of the digital ads market.

The cumulative progress across the business these past five years shows in MercadoLibre's top- and bottom lines. Both revenue and free cash flow have shot higher since 2020:

MELI Revenue (TTM) Chart

MELI Revenue (TTM) data by YCharts

MercadoLibre still generates just $16 billion in annual revenue. Latin America isn't as economically prosperous as America, but there are far more people. The population base gives MercadoLibre ample room to grow over the coming years, and a maturing economy in Latin America, where consumers have more money, will only add to it.

This growth story could easily justify buying and holding the stock. This game is still in its early innings.

But what about the short term?

MercadoLibre has pulled off an impressive feat. Despite going up 140% over the past two years, the stock has actually become less expensive:

MELI PE Ratio (Forward) Chart

MELI PE Ratio (Forward) data by YCharts

The stock's forward P/E has fallen from around 75 to under 50, thanks primarily to earnings per share, which grew from $8 to nearly $30. This isn't a fluke; MercadoLibre's revenue grew at a similarly impressive rate that outpaced its expenses (operating leverage) to create profits.

Is 48 times earnings an attractive price for the stock today? Analysts believe MercadoLibre will grow earnings by an average of over 40% annually for the next three to five years. In other words, the company could earn over $100 per share in a few years. That takes the stock's P/E ratio from almost 50 to 16 in four years.

High starting valuations are much easier to digest when the business is rapidly growing earnings. The stock gets cheaper in a hurry.

Is it too late to buy MercadoLibre?

It should be clear that MercadoLibre has plenty more growth left in the tank. The stock should appeal to both short- and long-term investors.

E-commerce and financial services are massive industries in Latin America and full of growth opportunities. Therefore, MercadoLibre's core business units don't seem near their peaks. The company could enjoy strong growth for a long time as Latin American consumers earn more and steadily gravitate toward the modern luxuries of online shopping and other services.

All investors can ask from the stock is a reasonable entry point, and its current valuation provides just that. Investors can confidently buy and hold the stock for what's likely to be magnificent results over time.