The S&P 500 had its worst first half since 1970, as soaring inflation dragged the broad-based index into a bear market. The S&P 500 has since rebounded to some extent but still trades 11% below its high. That creates a buying opportunity for patient investors.

Of course, market timing is impossible, but investors don't need a crystal ball to be successful. Every past downturn has ended in a new bull market, meaning a rebound is almost certainly on the way. Better yet, historical data suggests that market downturns are the best time to invest.

Here are two growth stocks to buy now and hold forever.

1. Amazon: A leader in e-commerce and cloud computing

Amazon (AMZN 0.22%) has battled a number of headwinds over the past year, including rising fuel and labor costs and excess fulfillment capacity. A deceleration in online shopping has amplified the impact of those headwinds as the pandemic's social effects have faded and inflation has skyrocketed. As a result, Amazon saw revenue rise just 10% to $485.9 billion over the past year, while profits plunged 61% to $1.12 per diluted share.

Those figures have left many investors feeling bearish, sending Amazon's share price tumbling -- the stock currently sits 23% off its all-time high. But I think those investors are missing the big picture. Amazon is a key player in e-commerce and cloud computing, and both industries are expected to grow quickly in the coming years.

According to Statista, Amazon accounts for nearly 38% of all e-commerce sales in the U.S., more than the next 14 retailers combined. More importantly, the company is unlikely to lose its edge anytime soon. Amazon is the epitome of convenience for merchants and consumers, largely due to its expansive logistics network. Given that, management expects to grow into its excess fulfillment capacity in the second half of the year. According to eMarketer, U.S. e-commerce sales are expected to grow 12% per year to reach $1.7 trillion by 2026.

Additionally, Amazon Web Services (AWS) captured a 34% market share in cloud infrastructure services during the second quarter, up from 31% in the same quarter last year. That's more than Alphabet's Google Cloud and Microsoft Azure combined -- the implications of that dominance are tremendous.

Over the past year, AWS achieved an operating margin of 31%. That's several times higher than the rest of its business's operating margin in the best of times. In other words, Amazon's profitability should accelerate as AWS becomes a larger portion of total revenue, and shareholders have good reason to believe that will happen. The cloud computing market is expected to grow at nearly 16% per year to reach $1.6 trillion by 2030, according to Grand View Research.

With that in mind, shares currently trade at three times sales, a discount compared to the three-year average of 3.8 times sales. That's why this stock is a screaming buy.

2. The New York Times: A time-tested media brand

Iconic media company The New York Times (NYT -0.04%) has successfully pivoted to a digital-first business model. Its Pulitzer Prize-winning journalists cover a broad range of topics -- news, games, cooking, sports, and product recommendations. The company also monetizes its print and digital content through subscription fees and advertising.

In the second quarter, The New York Times newspaper grew its subscriber base 31% to 9.17 million, despite a 7% decline in print subscribers. Additionally, total subscriptions jumped 32% to 10.56 million as multiproduct adoption continued to rise, due in large part to bundled offerings. Those trends have translated into solid financial results over the past year. Revenue climbed 15% to $2.2 billion, and earnings rose 38% to $1.13 per diluted share.

Management expects three trends to be tailwinds for the company. First, the number of individuals with college or advanced degrees in the U.S. is rising. Second, survey data suggests 21% of the U.S. population is willing to pay for digital news, up from 9% in 2016. And third, younger generations prefer to consume news on digital devices.

The New York Times believes it can reach 15 million subscribers by 2027, representing roughly 15% growth on an annualized basis over the next 3.5 years. But the company currently has over 135 million registrations -- a metric that includes non-paying users with limited access to content -- meaning its total addressable market is much larger.

Currently, shares trade at a reasonable 2.6 times sales, a discount compared to the three-year average of 3.7 times sales. That's why this growth stock is a buy.