Investing in a bear market can be tricky: Many great values are available, but it can be psychologically challenging. While the best strategy is to keep investing, watching a stock you recently purchased fall another 10% isn't thrilling. However, this bear market will eventually end, and many (but not all) stock prices will end up being higher when you stretch your investing time frame from a few months to a few years.

When you're investing with a multi-year holding period, today's prices begin to look like bargains. The key is to purchase successful companies with vast market opportunities. Two names I believe meet these criteria are Twilio (TWLO -0.55%) and MercadoLibre (MELI -1.98%). Their stocks are down 81% and 68%, respectively, from their all-time highs, but their businesses aren't skipping a beat.

Twilio

If you've ever received a text from a doctor's office confirming an appointment or communicated with a host on Airbnb, you've interacted with Twilio's product. Twilio provides communication APIs (application program interfaces) that allow its clients without coding experience to plug and play different applications. Twilio users can then integrate text messaging, emails, or video into their various business operating solutions.

The company experienced a massive boom during the pandemic when customer support and interaction were vital. However, the stock sold off hard after the hype subsided, and it currently trades at just 4.7 times sales, the lowest valuation it has reached as a public company. Yet management is confident the company will deliver 30% or greater organic annual revenue growth through 2024.

This disconnect between valuation and business expectations gives investors an excellent opportunity to establish or add to a position in the stock.

Twilio has made multiple acquisitions in its quest to become the go-to company for all communication needs, so investors should analyze organic growth, which excludes revenue from any bolt-on acquisitions. For the first quarter, Twilio reported 35% year-over-year organic revenue growth. In addition, active customer accounts rose to 268,000, up 14%.

The core concern many investors have regarding Twilio is its cash burn. The company is not free-cash-flow positive and never has been as a public company. This is the case despite a sizable stock-based compensation bill of $155 million during the quarter, which isn't a cash expense. If you strip out this expense (and the associated taxes), Twilio still posted an operating loss of $51 million.

Management projects the company will report non-GAAP profitability starting in 2023, but many investors aren't patient enough to wait around. If you can take a long-term view, Twilio stock is a great buy here.

MercadoLibre

E-commerce has significantly changed the way American consumers do their shopping. The story is no different in Latin America, but e-commerce deployment is in a much earlier stage there than it is in the U.S. The company leading this charge in Latin America is MercadoLibre. With its e-commerce platform, financial services, and logistics solutions, the company has its hand in nearly every aspect of online shopping.

Each division has also been growing rapidly. In the first quarter, gross merchandise volume (GMV) in its marketplace rose 32% year over year, and items per buyer rose despite consumers not being as isolated as they were last year due to the pandemic. Even with this increased volume, its shipping division delivered 79% of its packages within 48 hours.

Its financial services division turned in even better results. Fintech revenue rose 113% to $971 million, while its take rate rose from 3.19% to 3.84% in the same time frame. MercadoLibre pointed to its credit division revenues as the source of expansion in its take rate (the percentage of each transaction it keeps as revenue). This segment is in its infancy, and its credit portfolio more than quadrupled year over year to $2.4 billion. As it expands, expect MercadoLibre's take rate to increase and, thus, its fintech revenue to rise.

Despite how well the business has done, the stock has fallen flat on its face. At its current price-to-sales (P/S) ratio, MercadoLibre hasn't been this cheap since the depths of the Great Recession. And while Latin America could experience a recession, it's unlikely it will be as dire as in 2008 and 2009.

MELI PS Ratio Chart

Data by YCharts.

MercadoLibre is the most dominant e-commerce company in Latin America, and even if a recession disrupts its growth temporarily, the trend toward online shopping is undeniable.

Just because the stock market is down doesn't mean all stocks should be. Both Twilio and MercadoLibre have reached all-time low valuations, giving investors a great entry point into these stocks.