The S&P 500 index just posted its worst performance during the first half of the year since 1970, dropping 20.6%. While this sent many short-term investors running for the hills, long-term investors realize that buying high-quality businesses at these depressed prices can be an opportunity of a lifetime. 

Therefore, if you're looking to find some bargains, look no further than Etsy (ETSY -0.19%), Atlassian (TEAM -0.08%), and DigitalOcean Holdings (DOCN -2.71%). These three high-quality companies have stocks trading down between 44% and 60% year to date, which could be a buying opportunity. Let's find out a bit more about these beaten-down stocks.

1. Etsy

Etsy's stock price has dropped almost 60% since the start of 2022. This e-commerce site for handmade goods saw a lot of business during COVID-19 as it became the hub for creative virus-protection mask purchases, but even as the demand for masks faded, Etsy continued to deliver steady results. In the first quarter of 2022, for example, Etsy saw revenue reach $579.3 million, which increased even compared to a stellar year-ago quarter. 

Etsy enabled almost 5.5 million active sellers to deliver handmade crafts and goods to consumers in the first quarter, totaling $3.3 billion in gross merchandise sales (GMS). However, most of these goods are discretionary, and with a potential recession looming, investors fear that activity on Etsy's platform could dwindle as consumer budgets tighten.

That said, the long-term opportunity for Etsy still looks bright. The International Trade Administration sees global e-commerce sales in 2024 reaching $6.4 trillion, representing 22% of global retail sales, compared to only 18% in 2020. Etsy facilitated $13.6 billion in GMS during the trailing 12 months, meaning that there's still plenty of room for it to drive higher activity. 

With shares trading at 24.5 times free cash flow -- an all-time low since coming public in 2015 -- Etsy looks too cheap to ignore given its immense potential in the e-commerce industry. 

2. Atlassian 

Atlassian grew its quarterly revenue by 30% year over year to $740.5 million while generating $312.3 million in free cash flow during its fiscal 2022 third quarter (ending March 31). On top of that, this business anticipates a 28% year-over-year increase in fiscal fourth-quarter revenue. So why is this stock trading down about 44% year to date?

Atlassian helps teams thrive by providing work-management tools for IT service management teams, agile software-development teams, or any team within an enterprise that needs them. Most of its rivals focus on just one of those spaces, making Atlassian's suite of tools unique (and attractive to over 234,500 customers). Combined, the company believes its total addressable market is currently worth $29 billion.

What's most impressive about Atlassian is that it can underspend on sales and marketing as a percentage of revenue compared to its rivals, yet still see robust top-line expansion. That allows the company the option to invest more into research and development, rather than sales and marketing, to build the best products in the industry. 

Because of this gold-standard product offering, shares of Atlassian trade at 20 times sales. This isn't cheap, but it is the company's lowest valuation since late 2018. With the winds of a lucrative market at its back, continuous innovation as its engine, and a wide-reaching tool kit as its sails, Atlassian could sail to success over the long term. Investors might want to jump on board.

3. DigitalOcean

For many independent developers or small businesses, large cloud platforms like Amazon Web Services are too complex and provide little support, which this demographic needs when it comes to operating in the cloud.

DigitalOcean is addressing these problems by providing a cloud solution designed specifically for small and medium-sized businesses (SMBs). It focuses on transparent pricing, offering simpler-to-use products, and developing an unrivaled community for customers to learn about cloud development and grow together.

As a result, DigitalOcean has seen amazing adoption. In the first quarter of 2022, the company saw a 36% year-over-year jump in revenue to $127 million and reached a customer count of 623,000. Despite this, shares have slumped alongside most emerging tech stocks. Unlike many emerging tech stocks, however, DigitalOcean is free-cash-flow positive and has reached operating profitability: The company generated $5 million in free cash flow and reached an 11% adjusted operating margin in the first quarter.

The company trades at 10.4 times sales, which is 15% lower than the valuation it came public at in early 2021. DigitalOcean believes this industry will be worth $145 billion by 2025, and with its products gaining traction among thousands of SMBs, it has a good chance of capturing market share over the long term.