Don't look now, but the S&P 500 is a fraction of a percentage gain away from exiting the longest bear market run since 1948. A close above 4,292 will mark a new bull market. While this short-term bit of news might be exciting for some, it's really more important for investors to look past current headlines and consider the long-term implications. After all, trying to invest based on the news du jour will send you into a tizzy and often ends up being counterproductive.

Consider how short-lived market events tend to be. Do you make stock-buying decisions today based on Brexit? Does the collapse of FTX affect your investment calculations for most stocks? It's very unlikely. It won't be long before the same will be said of the recent debt-ceiling "crisis."

It's also important to keep the recent bear market in perspective. The S&P 500 is still 33% higher than it was at the start of 2020 (right before COVID-19 hit the U.S.). And that's despite a retreat from highs set in January 2022. 

^SPX Chart

^SPX data by YCharts.

What's the point of all this? Most of the financial news that seems so crucial on any given day isn't really a big deal over the long haul. What is crucial is to invest in quality companies and stay invested long enough to truly benefit. 

Take Amazon (AMZN 1.49%), for instance. The company has been besieged on all sides by macroeconomic challenges over the past 18 months or so. But there are changes afoot, and many of the headwinds are already slackening, pointing to a better future for the tech giant. Let's take a look and why this stock is one to consider before the bull market gets underway.

What happened?

The pandemic promised to be a boon for Amazon initially. Consumers flocked to e-commerce, and businesses flush with cash flocked to the Amazon Web Services (AWS) cloud platform. Good times rolled, with total revenue and operating income skyrocketing 67% and 71%, respectively, in 2020 and 2021.

But then those macroeconomic tailwinds turned into headwinds as Amazon was challenged by:

  • Clogged ports affecting product delivery.
  • Rising labor costs and inflation.
  • Falling consumer sentiment.
  • A potential recession limiting what businesses will spend on cloud data.

Sales still rose in 2022, but at a lower rate. Operating income plummeted 50% to just $12 billion, while free cash flow went deep in the red. The stock price fell further from its high than at any time in the last decade and it still trades about 33% off its recent high (see below).

AMZN Chart

AMZN data by YCharts.

And yet all these headwinds really just represent a tremendous opportunity for long-term investors.

What's next for Amazon?

Many extremely bullish secular opportunities were forgotten as the market sold Amazon stock based on current challenges. Opportunities like:

  • E-commerce: Amazon is still king with 38% of the U.S. market share. Walmart is second with a paltry 6%. Statista forecasts the total U.S. e-commerce market to grow more than 80% by 2027 to $1.6 trillion, offering Amazon an expansive runway for growth.
  • Prime: Over 200 million people globally subscribe to Amazon Prime. This massive customer base spends double what non-Prime members do each year on Amazon products. It accounted for $35 billion in membership fees in 2022, and it opens up a plethora of opportunities. Amazon's Buy With Prime initiative, which offers third-party logistics services to other online retailers, is one example. Now, rumors that Amazon is considering offering cell service to Prime members are in the news. Stay tuned.
  • Digital advertising: Amazon is a major player in advertising now, with $38 billion in 2022 sales (up 91% since 2020). Advertising on the platform through promoted products and placement is highly efficient since customers searching the site are ready to buy. In an economy where advertisers are focused on doing more with less, the company should benefit.
  • AWS: Cloud services spending will take a step back in 2023 (growth slowed to 16% year over year in the first quarter). In fact, Amazon is actively assisting its clients in lowering their bills. Why? Because this is how to forge lasting customer relationships. It hurts a bit when times are tough, but when things turn around, Amazon will benefit. The segment is tracking to exceed $80 billion in revenue again this year. And, with a 24% operating margin last quarter, it is highly profitable.
  • Artificial intelligence: It wouldn't be 2023 if I didn't mention AI. For years, Amazon has used AI to optimize logistics, tailor the shopping experience to users, and in digital advertising. It is introducing Amazon Bedrock, allowing users to customize existing AI models for their needs. And the AI boom will increase data needs, meaning more revenue for AWS.

It's impractical to value Amazon stock on a price-to-earnings (P/E) basis now because the headwinds have really crimped profits. If you believe profits are permanently impaired, the stock isn't a buy; but it is a bargain if management capitalizes on the opportunities above. We need to look back to 2016 to find it trading for a lower price-to-sales (P/S) ratio (see below).

AMZN PS Ratio Chart

AMZN PS ratio, data by YCharts.

First-quarter results were better than many expected. Total sales increased 9% to $127 billion, net income turned positive, and cash flow metrics improved. This could be a sign that management is righting the ship. If so, then the market's focus on the short term has left patient investors with a terrific opportunity.