The U.S. equity market has been in bearish territory since early 2022. While early 2023 offered some respite, the January rally seems to have already fizzled out.

The personal consumption expenditures price index (PCE, Federal Reserve's preferred inflation metric) increased by 5.4% year over year in January 2023, after several months of year-over-year decline. This may further pressure the Federal Reserve to hike interest rates, which could prove to be a major downer for the stock market.

However, bear market also offers an opportunity for investors to build long-term wealth since historically stock market corrections have been almost always followed by bull market rallies. Let's see how high-quality stocks such as MercadoLibre (MELI 8.27%), Qualys (QLYS -0.38%), and MongoDB (MDB -0.09%) can prove to be good buys in the current difficult market environment.

1. MercadoLibre

Latin-American e-commerce giant MercadoLibre surpassed consensus revenue and earnings estimate in the fourth quarter (ended Dec. 31, 2022).

Unlike many struggling e-commerce players, MercadoLibre managed to report solid year-over-year growth in gross merchandise volume in its three major markets (83% in Argentina, 22% in Brazil, and 28% in Mexico) in Q4. The company built a logistics network with 94% penetration in the Latin American market, which is a major competitive advantage. Additionally, despite the high network and fulfillment center penetration levels, the company managed to control overall shipping costs.

MercadoLibre also leveraged the strength of its e-commerce business to build a very strong fintech ecosystem. Launched in 2003 to facilitate MercadoLibre's e-commerce transactions, Mercado Pago evolved into a complete financial services provider in Latin America. The company's financing arm, Mercado Credito, provides loans to merchants and credit to customers, which in turn attracts more merchants and customers to the e-commerce platform. This flywheel effect further helped boost overall top-line performance for the company.

MercadoLibre is already profitable and is currently trading at 5.7 times trailing 12-month sales, which is very close to its historically low valuation. Coupled with its growth prospects in the Latin American market, the company seems to be a bargain buy now.

2. Qualys

Qualys offers services such as asset management, IT security, compliance, cloud security, and web application security -- all combined in a single unified platform. This helps enterprises reduce the excessive operational and maintenance costs and challenges associated with scaling, upgrading, and centrally managing a multivendor cybersecurity and compliance infrastructure.

Qualys' services are currently used by 70% of the Forbes Global 50 companies and 46% of the Global 500 companies. More reliance on larger customers makes its business relatively less sensitive to economic downturns. The company has been growing its top line at a healthy clip, with revenue jumping 19% year over year to $489.7 million in 2022. Qualys is also profitable, with robust generally accepted accounting principles (GAAP) gross margin and operating margin of 81% and 27%, respectively, in 2022. The company is also cash-flow positive, which is a solid plus during a difficult economic environment.

Since the global cost of cybercrimes is expected to climb up from $8.4 trillion in 2022 to $23.8 trillion by 2027, cybersecurity services have become mission-critical for enterprises. Qualys is well poised to capitalize on this trend and expects its target addressable market to expand from $45 billion in 2023 to $64 billion in 2026. With an annual run rate of just around $500 million, there is huge scope for the company to grow in the coming years.

3. MongoDB

With the world increasingly adopting digitization across all walks of life, an astronomical amount of data is being generated every day. With enterprises focusing on using this data to derive insights and make informed decisions as well as for performing daily activities, data has now become the new gold. Much of this data, however, is unstructured (social media, tweets, consumer surveys, documents, etc.) and requires specialized software for storage and computation.

The global database management system market is expected to grow from $65.3 billion in 2022 to $120.8 billion in 2028. MongoDB is well poised to grow rapidly in this market, thanks to multiple big clients, the cloud-agnostic nature of its platform, and its prowess in storing and querying non-relational or unstructured data across all types of IT infrastructures (on-premise, hybrid, public cloud, or multicloud). 

MongoDB charges its customers for its database-as-a-service offering, Atlas, based on usage. Although this exposes the company to some top-line volatility, the increased flexibility for customers helps reduce churn levels. The company has also been quite successful in new customer acquisitions, as is evident from the 20.7% year-over-year jump in its total customer count to 39,100 at the end of the third quarter (ended Oct. 31, 2022).

MongoDB is not yet generally accepted accounting principles (GAAP) profitable, which is not surprising since the company has been growth-focused for the past few years. However, the company has been gradually improving its gross and operating margins and is cash-flow positive. The company also has a strong balance sheet with $1.8 billion cash and $1.2 billion debt. With enough funds available for funding future expansion in the current high-interest environment, the company seems to be an attractive buy now.