Finding stocks that you can buy and hold for years takes time, patience, and research. You need to make sure that the companies you select are businesses that you're willing to put cash into and keep in your portfolio for several years at least. These should also be businesses that you understand and believe in, and have solid financials and growth stories to back up those assessments.

Every investor has unique financial goals, both short term and long term, as well as overall portfolio goals. The companies you buy should align with that strategy you've set for your financial future. While not every stock will be a winner, great companies can continue to deliver meaningful gains for investors over the years and compound your returns with time.

If you have $2,000 to invest in stocks right now, here are two fantastic businesses that fit that bill and which you can buy and hold for the next decade at least.

1. Confluent

Confluent (CFLT -2.35%) is a data-management platform that allows real-time data streaming across a virtually endless variety of use cases. From syncing data to inventory management to launching new products and services, Confluent's fully managed data-streaming services help brands like Walmart, BMW Group, Citigroup, eBay, and many other companies to store and process data that leads to actionable insights in the moment.

The streaming-analytics market represents a vast and growing space in which Confluent is a key player. Some estimates forecast that this space could hit a total addressable market in the ballpark of $50 billion by the year 2026. The business does face competition across the space, including from big names in tech like Amazon and Microsoft, with their respective cloud platforms.

However, Confluent is a company in the much earlier stages of growth that focuses specifically on data streaming, a more narrow but also fast-growing niche. Confluent's business revolves heavily around Apache Kafka, a leading open source, distributed-streaming platform that was created by the company's founders, including CEO Jay Kreps.

The company is not yet profitable, but revenue is growing at an exceptional rate as is its cohort of larger enterprise customers. Confluent brought in total revenue of $777 million in 2023, up 33% from 2022. Most of that revenue was derived from recurring subscriptions, which totaled $729 million of that revenue amount. Subscription revenue in 2023 rose 36% compared to the prior year.

The remaining $349 million was attributable to Confluent Cloud revenue, and that segment's growth rate significantly outpaced the subscription business with year-over-year growth of 65%. Confluent also ended the year with 1,229 customers with annual-recurring revenue at or above $100,000, representing a 21% increase in that group of customers on a year-over-year basis.

One Wells Fargo analyst recently issued a 12-month price target for Confluent of $36 per share, which would represent roughly 20% upside from the stock's current trading price. No investment is without risk, and it takes a certain level of risk aptitude to buy into an unprofitable business in the early stages of its growth story.

The fact remains that the business has tremendous room to run in its industry and a pool of clients, including household names, relying on its platform to keep their operations running seamlessly. Long-term investors may be glad they bought in on a slice of the action in the next five-to-10 years.

2. Lululemon

Lululemon (LULU -0.72%) is a prime example of an ongoing success story in a time when many companies with exposure to discretionary spending are struggling mightily. The athleisure giant continues to go from strength to strength with its lineup of men and womens' apparel, footwear, and accessories.

The secret to Lululemon's success is multifaceted. The company was an early mover in the athleisure space, a multibillion-dollar industry that is on track to reach a valuation of more than half-a-trillion dollars by the start of the next decade. Despite the entrance of newer players to the space, Lululemon has maintained a considerable, dominant footprint here.

There's also the fact that Lululemon has built incredible brand authority and loyalty. Lululemon isn't so much of a brand choice as it is a lifestyle for many of its shoppers, who often use its products for the versatility that athleisure lends to daily life.

From going for a run to taking care of errands to going out for coffee, athleisure products are a multiuse category of apparel, and that is certainly true for many of Lululemon's shoppers. The all-purpose nature of these products creates a strong incentive for buyers in any market environment, including in one where consumers are sometimes spending more carefully than in periods past.

The company has also maintained a robust omnichannel presence through the years, with an assortment of stores that span the globe as well as a collection of location-specific e-commerce sites. Lululemon is raking in strong revenue growth and profits, has an impressive cash position, and continues to add new stores to its existing brick-and-mortar presence.

In 2023, Lululemon reported net revenue just shy of $10 billion, a 19% increase from the full-year 2022. Broken down by region, Americas net revenue was up 12% from the prior year, while international net revenue rose 54%. The company brought in $1.6 billion in net income in 2023, which was a notable year-over-year increase of 81%. At the end of 2023, Lululemon had 711 open stores and opened 56 net-new company-operated stores just last year.

Investors seem to still be worried about where the trajectory of consumer spending might fall, at least in the near term. The stock is trading down by about 30% since the start of 2024 despite its stellar financials. Lululemon is currently trading at a price-to-sales (P/S) ratio of around 5, so now might be the time to consider scooping up some shares of the company at a serious discount.