Probably the most outstanding single quality that smart investors share is patience. The best-known smart investor of them all, Warren Buffett, famously doesn't try to time the market. Instead, his core strategy is to buy quality stocks at reasonable valuations -- and his holdings include positions in the first two companies discussed here.

In the case of each of these three stocks, the buy thesis now pretty much requires investors to overlook their near-term negatives in favor of their long-term positives. Apple (AAPL -1.04%), UPS (UPS -0.20%), and Alphabet (GOOG 1.44%) (GOOGL 1.89%) all face earnings headwinds in 2023, but they will likely emerge stronger from any recession that coult potentially kick off this year. Here's why.

1. Apple is improving its earnings quality 

A combination of supply chain disruptions, a weakening environment for consumer discretionary spending, and adverse foreign currency exchange movements hit Apple in calendar 2022, and some of those issues are likely to extend well into 2023. That said, Apple's dominant position in the U.S. smartphone market and its opportunity to grow sales and market share worldwide as the number of smartphone users increases haven't gone away. Moreover, the underlying growth of its higher-margin services business is improving the quality of its earnings. 

While product revenue fell 8% year over year in its recently reported first quarter of fiscal 2023, its services revenue rose 6.4%. It would have increased by closer to 13% without the negative impact of foreign currency exchange rates. The growth of Apple's services revenue (which comes with a gross margin of nearly 71% compared to around 36% for its products segment) is improving Apple's long-term margin profile. Moreover, services now provide about 20% of Apple's total revenue (based on its fiscal 2022 results).

Finally, as CFO Luca Maestri noted during the fiscal Q1 2023 earnings call, "our installed base of active devices grew double digits and achieved all-time records in each geographic segment and in each major product category." That's likely to improve Apple's potential to grow its service revenue.

2. United Parcel Service is focusing on more-profitable deliveries

Another example of a company that is facing near-term headwinds but also significantly improving its business is UPS. The company's revenue declined 2.7% in the fourth quarter of 2022, and CFO Brian Newman said he expects that in 2023, average daily volume in its U.S. domestic segment will be "down slightly," and average daily volume and revenue in its international segment will decline by low single-digit percentages.

Still, note that Newman also said U.S. domestic segment revenue would increase by a low single-digit percentage despite that declining volume. That projection speaks to the underlying operational improvements UPS has been making. In a nutshell, management's transformational strategy to grow revenue from targeted end markets such as small and medium-sized businesses (SMBs) and the healthcare industry is working. 

Meanwhile, the company's emphasis on focusing on more-profitable deliveries -- which also entails reducing its lower-margin deliveries for Amazon.com -- means continuing "a mutually agreed path to glide that business down in 2023," according to Newman. 

As such, UPS should continue to improve its underlying profitability even if a recession in 2023 leads to a revenue decline. 

Management's guidance for $8 billion in free cash flow (FCF) in 2023 would put UPS on a price-to-forward-FCF ratio of almost 21. That's a reasonable multiple if the company's earnings hit a trough this year and recover in the coming years, driven by underlying growth in SMBs, healthcare, and more-profitable e-commerce deliveries. 

3. Alphabet's wins will come from the cloud

The case for buying Alphabet is relatively simple. Solid but slowing growth in its Google services (Search, YouTube ads, and Google Network) will be balanced by the ongoing growth of Google Cloud as it marches toward profitability -- a business in which Alphabet has "really been investing ahead of our revenues," CFO Ruth Porat said on its recent Q4 earnings call.

The Google Cloud strategy makes perfect sense considering the potential for long-term cash generation from recurring revenue from customers that are likely to stay with Google Cloud on a multiyear basis. 

As for Google's other services, if there's a recession, that will hurt advertising revenue across the board, and the headline figure of a 2% decline in search revenue in the fourth quarter doesn't look good. Still, in that quarter, Alphabet's earnings were also pressured by adverse foreign exchange movements. Excluding the impact of those currency exchange headwinds, search revenues "delivered moderate underlying growth in Q4," according to Porat. Moreover, Google's overall revenue growth of just 1% was 7% in constant currency.

All told, Alphabet can look ahead to a year of solid but unspectacular growth. At the same time, Google Cloud is moving toward profitability, and Wall Street expects an incredible $70 billion in FCF, putting it on a forward-price-to-FCF multiple of 19. That's a good multiple for a company with Alphabet's long-term growth prospects.