The bear market may not be officially over, but it's looking like the bears are going back into hibernation.

After its worst first half of a year in more than 50 years, the S&P 500 is up 13% since June 30, putting up an 18% since it hit bottom on June 17. There are a number of reasons for the recovery. Inflation and oil prices are coming down. The job market remains strong. Consumer confidence is rebounding, and corporate earnings were solid in the second quarter.

Among the recent winners in the rebound is Amazon (AMZN -0.66%), which is up more than 40% from its bottom in June, helped by a stock split, improving consumer sentiment, a strong second-quarter earnings report, and two surprise acquisitions, One Medical and iRobot.

After falling nearly 50% from its peak last year, investors may be wondering if the FAANG stock can keep up that momentum. From its current price, climbing to $200 would imply another 40% gain.

The road to $200

Amazon's second-quarter earnings report helped make the case for the stock to return to $200 as a number of tailwinds are emerging for it to keep gaining. After revenue growth slowed in the first half of the year due to difficult comparisons with 2021 when e-commerce growth was strong, the company expects revenue growth to accelerate to 13%-17% in the third quarter from 7% growth in the first half. On a constant currency basis, it's calling for 17% to 21% top-line growth in the current quarter.

Through the first half of the year, Amazon has posted an operating loss of $5.2 billion in its e-commerce segments, but it has generally been profitable in recent years and should return to overall profitability, especially with the help of Prime Day in the third quarter and the holiday season in the fourth and as the company grows into excess capacity it built out during the pandemic. The company is also charging an incremental $0.35 for every item it ships for sellers on its marketplace, which is likely to flow straight to the bottom line as sellers have little alternative but to pay it. That also shows that Amazon has pricing power in e-commerce both with its customer base and the millions of sellers who do business on its platform.

While e-commerce gets much of the attention in the media and among customers, its cloud infrastructure business, Amazon Web Services (AWS) has been the primary profit driver for years and continues to grow at an impressive pace. In the second quarter, AWS revenue rose 33% to $19.7 billion with a 29% operating margin. Demand for cloud services remains strong and should continue to propel Amazon's profits forward, which makes it the most important number for investors to watch.

A question of when, not if

Considering its expected profit growth from e-commerce and cloud computing, as well as businesses like advertising, Amazon will almost certainly reach $200 a share. However, the key question facing investors is when, and that will depend on how the broad market behaves. If the rebound we saw in recent weeks continues, Amazon could hit $200 before the end of the year. After all, this stock traded as high as $188 last year, so $200 would only represent a slight gain from its previous peak.

If inflation persists, interest rates continue to climb, and consumer sentiment wanes, Amazon stock is likely to remain under pressure. It's a cyclical business and directly exposed to consumer discretionary spending and the health of the overall economy.

Regardless of what happens in the short term though, Amazon should eventually reach $200. The company continues to gain market share in retail, build leverage in its marketplace, grow its cloud business, and innovate with new technologies. It's a good bet to beat the market at the current price.