Apple's (AAPL -1.22%) incredible financial strength has allowed it to weather the current bear market better than many other tech stocks. Yet its shares are still down about 17% year to date. The tech titan, in turn, has lost a staggering $500 billion in market value.

Could this be an opportunity for investors to buy Apple's stock at a bargain price?

The bull case for Apple's stock 

A couple of years ago, Warren Buffett called Apple "probably the best business I know in the world." That's high praise from the legendary investor.

Incredibly, Apple has only grown stronger since then. The technology leader generated a staggering $99.8 billion in net income and $111.4 billion in free cash flow over the trailing 12 months. That's up from $57.4 billion and $73.4 billion, respectively, in 2020.

This breathtaking financial performance is derived from a relatively simple business model. Apple makes and sells its popular iPhones, Macs, iPads, and wearable devices. It then sells an array of services to its massive base of users.

Together, these devices and services form a vast ecosystem that tends to be quite sticky. Once a person buys an Apple product, they tend to remain a loyal customer. This is why investors are increasingly viewing Apple as a utility-like business -- one with dependable, recurring revenue and reliable cash flow. Like the best utility stocks, Apple is rewarding its shareholders with a steadily rising dividend stream and bountiful stock buybacks, both of which help to bolster its share price.

AAPL Chart

AAPL data by YCharts

Moreover, Apple's robust cash flow generation and fortress-like balance sheet -- which contained over $169 billion in cash and investments as of Sept. 24 -- allow it not just to survive but thrive during difficult economic environments. Apple also tends to outperform its less financially sound rivals during these times. Many investors have thus come to view Apple's stock as a safe haven during the current market downturn, which is one of the reasons why it has performed better than many other tech stocks this year. The defensive nature of its business should continue to serve Apple well in the coming years.

Apple's stock is reasonably priced

Apple's shares can currently be had for less than 22 times analysts' earnings estimates for the year ahead. That's slightly less expensive than the forward price-to-earnings (P/E) ratio of the Nasdaq-100 index, which stands at about 22.5. Apple is arguably the best business in that index. But rather than paying a premium for quality, as is typically required, you can buy Apple's stock at a slight discount today.

The tech giant may have a lower projected growth rate than some of the Nasdaq-100 index's more rapidly expanding constituents, but Apple is still expected to increase its earnings per share by roughly 9% annually over the next half-decade. Its P/E ratio thus seems quite reasonable, particularly when considering its powerful competitive advantages and unrivaled financial fortitude.

Risks for investors to consider

Individuals and businesses spent heavily on laptops and other mobile devices during the early stages of the pandemic, as the work-from-home trend gained steam. But those purchases pulled forward some sales that would otherwise be taking place today, and the personal computer (PC) industry is now experiencing a sharp pullback in demand.

PC shipments fell 15% year over year in the third quarter, according to research firm IDC. The phone industry is experiencing a similar dynamic, with smartphone sales down 9.7% in the same period. These trends could dampen Apple's results if they persist.

That said, Apple was able to generate higher Mac and iPhone sales in the third quarter despite the downturn, due in part to its unmatched customer loyalty. Mac sales jumped 25% to $11.5 billion, while its iPhone revenue rose 10% to a whopping $42.6 billion.

Yet even if demand for its devices remains strong, Apple could find it difficult to produce enough of its products in the coming quarters. China continues to respond to new COVID-19 outbreaks by instituting strict lockdowns. With some of its most important manufacturing sites in China, Apple may face supply shortages for key products like the iPhone. These challenges should, however, abate when the pandemic eventually subsides.

So, is Apple's stock a buy?

With its popular products continuing to sell well, and its utility-like cash flows helping to bolster its already awe-inspiring financial strength, Apple could be the bastion you're seeking in the current economic storm. With near-term risks likely already reflected in its discounted share price, Apple's stock is a solid buy today for long-term investors.