Bear markets come and go, but great stocks can outlast these periods and thrive in a wide variety of markets. While investors are eagerly awaiting a prolonged bull market, it's still a great time to invest in quality businesses for the long term.

Whenever the next bull market does present itself, here are two companies you may want to already have in your basket of stocks. Let's get started. 

1. Apple 

Apple (AAPL -0.60%) faced some mixed sentiment from investors in 2023 as its top and bottom lines decelerated slightly amid ongoing economic volatility and fluctuating consumer spending. Still, the stock is trading up 46% from the start of this year as it has continued to report a record installed base of devices, generous profits, and impressive results from its rapidly growing services segment. 

Looking back at Apple's results for the first half of its fiscal 2023 (ended April 1), the company generated total net sales of $212 billion on net income of $54 billion. Of that net-sales total, $117 billion was derived from iPhone sales. In short, smartphones -- a space in which Apple retains a global market share of around 21% -- still account for more than half of Apple's top line.

However, the second-largest driver of its results in the six-month window was its services segment, which includes services like Apple Music, Apple Pay, and iCloud, as well as its advertising wing. Apple's services segment brought in total net sales of $42 billion in that period.  

Given the rise and popularity of subscription-based services along with other digital-based offerings, Apple has a lot of room to grow this wing of its business even as it remains heavily reliant on hardware sales. This segment also includes its recently launched, high-yield savings account as well as the buy now, pay later service it rolled out this past spring. 

Even as consumer-spending patterns shifted from things to experiences over the recent quarters given the resurgence of options like cross-border travel, these are dynamics that naturally shift with the passage of time. Demand for Apple's products isn't going anywhere even if some consumers are reining in spending on big-ticket items right now. 

The company's market leadership and impressive balance sheet backed by considerable profits and cash are all green flags for investors. With the introduction of its Vision Pro headset in 2024, which represents Apple's first launch of an entirely new hardware product in close to a decade, the next era of growth for this tech behemoth could be just around the corner. 

2. Airbnb 

Airbnb (ABNB -1.52%) saw shares rocket up 63% since the start of 2023. The company hit a number of record financial goalposts recently as a surge in bookings, as well as listings available on the platform, is driving historical revenue and profits.

This year, Airbnb reported its highest first-quarter revenue ever. This was also the inaugural time that Airbnb generated a Q1 profit. During the three-month period, the company raked in revenue of $1.8 billion, while net income came in at $117 million.  

That revenue figure represented an increase of 20% from the year-ago period. Taking a step back, Airbnb's revenue for Q1 was up by a notable 117% from the same quarter in 2019. A surge in both short and long-term bookings drove gross booking value to more than $20 billion for Q1 2023, up 105% on a four-year basis.  

As one of many strategies to keep this momentum going, Airbnb is continuing to roll out upgrades to its platform to make stays more accessible and affordable, an important point given the ongoing economic concerns many consumers have. The company launched Airbnb Rooms recently, where the average nightly price is $67, and more than 80% of stays in this segment are under $100 a night. CEO Brian Chesky said the following about this new stay offering:  

 [W]hat we wanted to do is offer a product that we thought could capture this affordability segment that we think more and more people are going to be interested in in this economy and also launch a product that would be very relevant to the next generation of travelers. And essentially, I wanted to launch a product that the 26-year-old me would have wanted.  

Currently, 45% of all bookings on Airbnb are for stays of seven nights or more. And 18% of all stays booked are long-term stays, which are 28 days or more. Clearly, travelers are looking to Airbnb to serve a variety of accommodation use cases. This fact also offers a measure of resilience to the business, which can enhance Airbnb's growth potential and differentiate it from other travel-facing brands over the long term.