With rising interest rates, fears of a recession, and consumer spending weakening, the stock market's outlook is grim, and many growth stocks are selling off hard. However, most of the market is concerned with shorter time frames, and stock prices tend to reflect an outlook of only a few months. This gives individual investors a key advantage versus investment firms, as we can afford to take a longer view.

Zooming out with a three- to five-year investment mindset reveals many stocks selling for bargain prices. Two I have my eye on are The Trade Desk (TTD -4.88%) and Datadog (DDOG -3.93%). Both stocks are trading down more than 50% from their all-time highs, yet have experienced little to no business slowdown. This sustained growth makes them excellent candidates to outperform as the market recovers. Let's find out a bit more about these two stocks and why you might regret not buying them during this current downturn.

Person with an exasperated expression looking at a computer.

Image source: Getty Images.

1. The Trade Desk

The advertising industry is massive. The International Data Co., a marketing intelligence firm, estimates global ad spending in 2019 was around $750 billion. Even though it is a massive market, the business is simple: One entity sells ad space (whether a billboard, TV commercial, or a website), and another buys it to promote a product or service. The Trade Desk's software analyzes these opportunities for its customers to ensure they are reaching their intended audience and choosing the best ad placement for a given viewer.

The Trade Desk is focused on digital ad spaces like connected TV, mobile, and podcast audio. With its internal, third-party, and first-party data inputs, its software can decide how much to pay for an ad for a given user. Because of this, advertisers see better conversion rates while spending less on ads that aren't relevant.

Companies have to gather information about their users to buy a targeted ad. But this data tracking is controversial as some of the information that companies collect can be too revealing. The Trade Desk's solution is its proprietary unified ID 2.0 (UID2) software. It gathers all the relevant information about consumers while also maintaining their privacy.

The Trade Desk saw solid 43% year-over-year revenue growth in the first quarter and an adjusted margin of 38% in earnings before interest, taxes, depreciation, and amortization (EBITDA). It would have been profitable for the quarter, but a $66 million bonus to its CEO for long-term performance caused The Trade Desk to lose $15 million. Without it, The Trade Desk would have posted a 16% net income margin based on generally accepted accounting principles (GAAP).

Advertising spending has historically dropped during recessions, causing investors to sell the stock. But with The Trade Desk transforming how digital ads are bought, it will instead see smaller growth during a hypothetical recession. Investors can pick up a great company with a vast growth opportunity trading at 66 times free cash flow (down from more than 160 six months ago) by taking a long-term view with The Trade Desk.

Even though Snap issued some warnings about ad revenue, investors need to realize Snap doesn't speak for the entire market. Just because one platform (whose ad delivery is very annoying to users) sees some issues doesn't mean every advertisement company does.

Person on their phone in bed.

Image source: Getty Images.

2. Datadog

As more businesses move into the cloud and use different software programs, it becomes crucial that the programs interact well with one another. Monitoring this manually would be a nightmare, and the only way to know something is wrong is if there are multiple complaints. Datadog allows its users to see how these programs interact while also fixing problems automatically.

While many software-as-a-service companies have seen growth slow, Datadog has not. It grew first quarter revenue 83% year over year to $363 million while generating a 36% free-cash-flow (FCF) margin. FCF is crucial if economic conditions continue to worsen, as it allows a company's operations to fund the business without outside help.

Datadog stock is a bit more expensive than The Trade Desk, with a price-to-FCF ratio of 93. However, it is also growing quicker than The Trade Desk.

Management expects to grow its 2022 revenue by 56% over 2021's totals. With many businesses tightening up their spending, investors will need to pay attention to the second-quarter report in a few months to see if Datadog's business is being affected. But spending on its product is unlikely to be cut with how much functionality Datadog brings to IT teams.

IT person at work.

Image source: Getty Images.

Datadog is in the early innings in its industry. It and The Trade Desk both have massive market opportunities. Investors shouldn't become shortsighted due to fear of being in a bear market. These two companies should be long-term winners; you just have to hold the stocks until the businesses are no longer executing at a high level.