A bear market is defined by a decline in the value of a financial asset or index of 20% (or more). Right now, the Nasdaq-100 technology index is down by 29% in 2022 so far, and if the year ended here, that would be its worst performance in the last decade. In fact, it would be the steepest annual drop since the 2008 global financial crisis. 

But it doesn't have to be all bad news for investors. Bear markets tend to result in broad-based selling, which means many quality stocks get tossed aside -- and that spells opportunity for investors willing to put money to work, especially with the long term in mind.

A panel of Motley Fool contributors have identified Datadog (DDOG -0.57%), Pinterest (PINS 0.89%), and Arista Networks (ANET 0.08%) as three stocks to buy in the thick of this bear market. Here's why. 

A critical cloud monitoring tool, and an optimistic tone

Anthony Di Pizio (Datadog): When it comes to trawling this bear market for quality opportunities, a company that has raised its 2022 sales guidance for three straight quarters might be a great place to start. Cloud computing has opened countless doors for businesses small and large, because it enables them to shift their operations online and it creates more touch points with customers without the need for additional physical stores.

But a business might find it challenging to monitor the performance of, or draw insights from, its expansive online presence. That's where Datadog comes in -- whether it's entertainment, healthcare, gaming, or retail, Datadog's platform is designed to rapidly alert businesses to technical issues for the fastest possible resolution.

Some problems might be almost invisible under normal circumstances; a particular webpage might be loading too slowly, or a specific customer segment in one geographic location might have trouble accessing the business's website. In any case, it's Datadog's job to shine a light on those glitches so they're quickly picked up. 

The company just reported its financial results for the third quarter (ended Sept. 30). It grew its revenue by an eyewatering 61% to $437 million, prompting a raise in its full-year guidance to $1.654 billion at the high end of the range. It follows upward revisions in the first and second quarters, and Datadog is one of only a few companies with such an optimistic tone in this difficult economic environment. Many companies are actually slashing their forecasts instead.

Much of Datadog's growth is coming from large organizations, which makes sense because the bigger the business, the more reliant it would be on cloud-based infrastructure. In Q3, Datadog had 2,600 customers spending a minimum of $100,000 annually, marking a 44% jump year over year. 

With Datadog stock down 61% from its all-time high, this might be one that was prematurely thrown out. That's an opportunity for investors who buy now. 

A superior social media stock down big

Jamie Louko (Pinterest): Investors have smashed the dislike button on social media stocks, as many are struggling to retain users and have seen advertising revenue fall off a cliff. Take Meta Platforms (META -1.41%), for example. In Q3, revenue fell 4% year over year, and monthly active users increased by just 2% over the same period.

Pinterest, however, is bucking this trend. It has struggled over the past year, but the company looks like it's coming out the other side of the tunnel. The social media platform saw sequential user growth of 12 million in Q3, to 445 million monthly active users.

The company also grew monetization faster than its social media rivals in Q3. Snap (SNAP -0.25%) saw global average revenue per user (ARPU) drop 11% compared to the year-ago quarter, to $3.11. Comparatively, Pinterest increased its global ARPU by 11% over the same period, to $1.56. Snap's ARPU excluding North America and Europe also fell 9%, but Pinterest's ARPU in the same region skyrocketed 38% to $0.11. 

How can Pinterest continue to attract ad spending while rivals are struggling? CEO Bill Ready said it best on the company's Q3 earnings call

Pinterest is a unique place for advertisers because our users seek inspiration and discovery with intent and purpose. This has a number of implications. To begin with, we have on-platform, first-party signals like searches, saves, and board curation that translate into highly valuable and monetizable customer insights for advertisers.

This isn't coming at the expense of profits, however. The company has generated $61 million in net income and $591 million in free cash flow over the past 12 months.

Despite this competitive outperformance, Pinterest is trading at just 26 times free cash flow -- far below Snap's valuation of 120.5 times free cash flow. With Pinterest's fall alongside the Nasdaq, it might be the right time to buy a few shares of this superior social media stock.

The technology that powers modern data centers

Trevor Jennewine (Arista Networks): Arista specializes in data center networking. It provides the switches, routers, and wireless access points needed to create and connect networks, and adjacent software for network automation, telemetry, and security. Arista first brought its technology to the cloud, but it has since expanded into enterprise data centers and campus workspaces.

Management says its principal innovation is the Extensible Operating System (EOS), software that leans on artificial intelligence to keep networks performing and secure. A single version of EOS runs across every Arista switch  and router, enabling customers to integrate their entire IT ecosystem -- from public clouds and private data centers to enterprise campus workspaces -- into a unified network.

That differentiates Arista from legacy vendors like Cisco, which tend to  complicate network management by using different operating  systems in different environments. Arista removes that complexity. EOS runs everywhere, which makes it easier for IT teams to upgrade software, test new features, and automate  workflows. That lowers the total cost of network ownership for customers.

Arista has capitalized on that advantage to become the leader in high-speed data center networking. It currently holds 41.5%  market share in 100G, 200G, and 400G switches (the fastest widely adopted switches on the market), while second-place Cisco holds 22.5% market share. That leaves Arista well positioned for the future. Trends like cloud computing and data-intensive applications (such as artificial intelligence and 5G) will continue to strain data centers, creating a need for faster networking solutions.

In spite of economic headwinds, Arista recently reported jaw-dropping financial results in Q3. Revenue soared 57% to $1.2 billion  , and GAAP earnings climbed 61% to $1.13 per diluted share. But Arista still has plenty of room to run. Management puts its market opportunity at $35 billion  by 2025, and that figure should continue to grow as data centers require faster networking solutions to keep pace with the ever-evolving IT world. That's why this growth stock is worth buying today.