What happened 

Apple's (AAPL -1.06%) stock, like most other technology stocks, has taken investors on a roller-coaster ride this year. While the company's share price was volatile in the first few months of 2022, a significant downward trend began after the company reported second-quarter results in late April. 

The stock hasn't recovered since. Year to date, Apple is down 17%, according to data provided by S&P Global Market Intelligence. This is mostly because investors are concerned that Apple won't escape the effects of supply chain shortages and a potentially slowing economy. 

So what 

Investors fell into a pessimistic mode in late April after Apple released its second-quarter financial results. Apple beat analysts' consensus estimates for both top and bottom lines, but investors latched on to comments made by the company's management. 

Two smartphones.

Image source: Apple.

On the company's earnings call, CEO Tim Cook said that Apple was "not immune" to supply chain problems caused by COVID-19, chip shortages, and the war in Ukraine. 

Apple's chief financial officer, Luca Maestri, spoke more specifically about the company's supply chain problems and said they could hurt Apple's sales in the third quarter by as much as $8 billion. 

"Supply constraints caused by COVID-related disruptions and industrywide silicon shortages are impacting our ability to meet customer demand for our products. We expect these constraints to be in the range of $4 billion to $8 billion, which is substantially larger than what we experienced during the March quarter," Maestri said. 

Clearly, investors didn't want to hear that Apple's sales could be affected to this degree and sent the stock on a downward path. 

Now what 

Apple investors will want to keep a close eye on the company's third-quarter results, which will be released on July 28. The results should shed some light on how bad supply chain difficulties have become for Apple and if the company has experienced any pullback in consumer demand. 

With inflation still at its highest level in nearly 40 years and the Federal Reserve focused on hiking the federal funds rate in order to bring it back down, it's likely that Apple investors could experience some more short-term volatility from the stock as the market reacts to a potential economic slowdown. 

But long-term investors should also consider that while temporary supply constraints could affect the company, Apple still has the potential to be a great investment. First off, the company still generates tons of cash -- $28 billion in operating cash flow in the recent quarter -- which will help it weather any potential economic slowdown better than other companies. 

And while Apple's stock isn't necessarily cheap right now, its shares trading at 23 times the company's forward earnings, the recent stock sell-off does give investors an opportunity to add some shares of this immensely profitable company at a relative discount. 

Lastly, Apple continues to both add value to shareholders through buybacks and invest in new products. The company added $90 billion to its share repurchase program in the most recent quarter and could enter a new product segment within the next year. 

With Apple's shares down this year -- and the company still in a very strong financial position -- investors may want to consider snatching up some shares of Apple right now.