The stock market has been hit hard over the past year, and technology stocks overall were hit even harder. Difficult macroeconomic conditions -- including historically high inflation and rising interest rates -- weighed on investor sentiment, dragging most growth stocks to multiyear lows.

There's no way to know exactly when the current downturn will reverse, but history shows that every downturn has eventually ceded ground to a bull market. Most importantly, investors that back winning companies during a lull tend to be rewarded over the long run.

With that in mind, I went on a buying spree last week, stocking up on companies that I expect to prosper for years to come. In fact, there were two stocks I actually doubled down on. While they still represent a small part of my portfolio, I believe they could be big winners years from now.

Thoughtful person looking at graphs on a tablet computer,

Image source: Getty Images.

Cloudflare is reaching for the clouds

Let's face it: Few things are more annoying than going to a website and watching the icon spin while the site slowly loads, buckling under the weight of network congestion, throttled bandwidth, and slow internet speeds.

Cloudflare (NET -1.05%) helps solves this problem with its state-of-the-art content delivery network (CDN), which uses strategically placed servers and cached data to supercharge the process -- but that's just the beginning. The company provides a cloud-based global network that helps secure websites and applications, protect corporate networks and devices, and run programs and applications at the edge.

Don't take my word for it. Cloudflare was named a leader in the 2022 Gartner Magic Quadrant for web application and application programming interface (API) protection. The company was also recognized as a leader by Forrester Research in the area of web application firewalls. 

Business is booming. In the fourth quarter, Cloudflare's revenue grew to $275 million, up 42% year over year, despite macroeconomic headwinds. This resulted in record adjusted earnings per share (EPS) of $0.06. Perhaps as importantly, Cloudflare delivered record operating cash flow of $78.1 million, equaling 28% of revenue, and record free cash flow of $33.7 million, or about 12% of revenue. 

Strong customer metrics helped fuel the financial results as Cloudflare customers spending more than $100,000 annually climbed to 2,042, up 44% year over year and outpacing its overall customer gains.  Furthermore, the company inked a record number of deals worth $500,000 or more. 

Cloudflare's combination of sector leading technology, impressive customer metrics, and strong financial growth should provide fuel for the company's stock price. Furthermore, its impressive growth should continue as it has barely scratched the surface of its total addressable market (TAM), which management estimates at $125 billion. 

Datadog could be an investor's best friend

The digital transformation is ongoing with more businesses adopting cloud computing than ever before. In the midst of this sea change, keeping a handle on customer-facing systems has never been more important. In the simplest terms, if customers can't connect, companies lose business, so it's crucial to keep those systems up and running.

That's where cloud-based observability pioneer Datadog (DDOG -1.43%) comes in. The company's platform provides a single dashboard that monitors the performance and security of infrastructure and cloud applications, notifying developers of problems before they become critical. Perhaps as importantly, the system detects anomalies that can be harbingers of future issues.

The proof is in the pudding. Datadog was named a leader in the 2022 Gartner's Magic Quadrant for application monitoring and observability, achieving the highest position for its ability to execute. The company was similarly identified as a leader in a Forrester report for providing best-in-class artificial intelligence for IT operations, cited for its data insights and visualization capability. 

Even as market conditions deteriorated, Datadog's business has held up remarkably well. In the fourth quarter, Datadog's revenue grew 44% year over year to $469 million, while its adjusted earnings per share of $0.26 climbed 30%. Though the company isn't delivering profits according to generally accepted accounting principles (GAAP) yet, it does generate both operating and free cash flow, so profitability is likely just a matter of time, unlike many other young upstarts. 

Its customer metrics are equally compelling as Datadog's most lucrative customers -- those generating $1 million in annual recurring revenue (ARR) -- climbed 47% year over year, which speaks to the mission-critical nature of its services.

Additionally, the company should have no problems sustaining its growth trajectory. Datadog's full-year 2022 revenue of $1.68 billion is a drop in the bucket compared to the company's market opportunity, which management estimates will top $62 billion by 2026. 

A word on valuation

Eagle-eyed investors will notice a similarity between Cloudflare and Datadog, namely their lofty valuations. Neither stock has ever been cheap when evaluated with traditional valuation metrics. Cloudflare and Datadog are currently selling for about 13 and 10 times forward revenue estimates, respectively, while a typical price-to-sales ratio falls between 1 and 2. However, given their above-average growth rates in the face of various headwinds, their industry leadership, and the significant remaining market opportunities, these stocks have more than earned their premium.